Use docker-compose to manage containers. #19

Merged
merenber merged 3 commits from docker-compose into docker 2021-09-15 17:30:50 -04:00
Owner

Use docker-compose to manage the containers, and start ceod automatically. The service can be restarted with SIGHUP sent by docker/docker-compose.

Use docker-compose to manage the containers, and start ceod automatically. The service can be restarted with SIGHUP sent by docker/docker-compose.
r345liu added 2 commits 2021-09-13 19:21:54 -04:00
merenber requested changes 2021-09-14 19:20:24 -04:00
merenber left a comment
Owner

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?

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
Owner

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.

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:/// ||:
Owner

Why are we ignoring the error? Are you trying to make the script idempotent?

Why are we ignoring the error? Are you trying to make the script idempotent?
Author
Owner

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.

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
Owner

Same comment as above.

Same comment as above.
@ -20,4 +20,1 @@
# sync with phosphoric-acid
nc -l 0.0.0.0 9000
sleep infinity
Owner

Same comment as above.

Same comment as above.
README.md Outdated
@ -27,0 +23,4 @@
```sh
docker-compose exec phosphoric-acid bash
su ctdalek # optional, to run as normal user
kinit ctdalek # password is krb5
Owner

Logging in as ctdalek will automatically acquire a Kerberos ticket (via libpam-krb5).

Logging in as ctdalek will automatically acquire a Kerberos ticket (via libpam-krb5).
Author
Owner

Ah, good to know.

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
Owner

The venv should be installed on the host - this will save a lot of disk space.

The venv should be installed on the host - this will save a lot of disk space.
docker.sh Outdated
@ -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
Owner

I don't see this anywhere in your docker-compose.yml? (the docker network)

I don't see this anywhere in your docker-compose.yml? (the docker network)
Author
Owner

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.

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.
Author
Owner

You can start docker-compose in the foreground (and have Ctrl-C working) by not using the -d flag.

You can start docker-compose in the foreground (and have Ctrl-C working) by not using the `-d ` flag.
r345liu added 1 commit 2021-09-14 19:58:18 -04:00
merenber merged commit f873d04139 into docker 2021-09-15 17:30:50 -04:00
merenber deleted branch docker-compose 2021-09-15 17:30:59 -04:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: public/pyceo#19
No description provided.