Use docker-compose to manage containers. #19
Merged
merenber
merged 3 commits from docker-compose
into docker
1 year ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'docker-compose'
Deleting a branch is permanent. It CANNOT be undone. 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?
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.
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.
# sync with phosphoric-acid
nc -l 0.0.0.0 9000
sleep infinity
Same comment as above.
# sync with phosphoric-acid
nc -l 0.0.0.0 9000
sleep infinity
Same comment as above.
```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.
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.
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.f873d04139
into docker 1 year agoReviewers
f873d04139
.