Use docker-compose to manage containers. #19
No reviewers
Labels
No Label
priority
high
priority
low
priority
medium
priority
very high
BUG
Feature
High Priority
Low Priority
Medium Priority
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: public/pyceo#19
Loading…
Reference in New Issue
No description provided.
Delete Branch "docker-compose"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Use docker-compose to manage the containers, and start ceod automatically. The service can be restarted with SIGHUP sent by docker/docker-compose.
Hm, I don't know...I personally prefer my shell script since it only has two commands (up and down),
and it's easy to stop a process (with Ctrl-C).
Maybe we can include both?
@ -104,3 +103,2 @@
nc -l 0.0.0.0 9002 &
fi
sleep infinity
This is necessary for Drone, since service containers exit after the last command.
If you don't want this in the shell script, then you need to add it back into .drone.yml.
@ -47,3 +47,3 @@
ldapadd -c -f .drone/data.ldif -Y EXTERNAL -H ldapi:///
if [ -z "$CI" ]; then
ldapadd -c -f .drone/uwldap_data.ldif -Y EXTERNAL -H ldapi:///
ldapadd -c -f .drone/uwldap_data.ldif -Y EXTERNAL -H ldapi:/// ||:
Why are we ignoring the error? Are you trying to make the script idempotent?
Yeah. This is actually not the optimal setup with Docker with these setup scripts running every time it starts. But this is the minimal change for a running Docker setup without recreating and rerunning everything everytime.
@ -54,4 +54,1 @@
# sync with phosphoric-acid
nc -l 0.0.0.0 9000
sleep infinity
Same comment as above.
@ -20,4 +20,1 @@
# sync with phosphoric-acid
nc -l 0.0.0.0 9000
sleep infinity
Same comment as above.
@ -27,0 +23,4 @@
```sh
docker-compose exec phosphoric-acid bash
su ctdalek # optional, to run as normal user
kinit ctdalek # password is krb5
Logging in as ctdalek will automatically acquire a Kerberos ticket (via libpam-krb5).
Ah, good to know.
@ -0,0 +5,4 @@
if [ "$host" = auth1 ]; then
exec sleep infinity
else
python3 -m pip install -r requirements.txt -r dev-requirements.txt
The venv should be installed on the host - this will save a lot of disk space.
@ -8,4 +0,0 @@
docker run --rm -v "$PWD:$PWD" -w "$PWD" python:3.7-buster \
sh -c "python -m venv venv && . venv/bin/activate && pip install -r dev-requirements.txt && pip install -r requirements.txt"
fi
docker network create ceod
I don't see this anywhere in your docker-compose.yml? (the docker network)
docker-compose automatically creates a network using the project name for all services defined in the file, so we don't need to create one manually.
You can start docker-compose in the foreground (and have Ctrl-C working) by not using the
-d
flag.