Use docker-compose to manage containers. #19

Merged
merenber merged 3 commits from docker-compose into docker 1 year ago
r345liu commented 1 year ago
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 1 year ago
merenber requested changes 1 year ago
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?
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.
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?
Poster
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.
# sync with phosphoric-acid
nc -l 0.0.0.0 9000
sleep infinity
Owner

Same comment as above.

Same comment as above.
# 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
```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).
Poster
Owner

Ah, good to know.

Ah, good to know.
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
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)
Poster
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.
Poster
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 1 year ago
merenber merged commit f873d04139 into docker 1 year ago
merenber deleted branch docker-compose 1 year ago

Reviewers

merenber requested changes 1 year ago
The pull request has been merged as f873d04139.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: public/pyceo#19
Loading…
There is no content yet.