|
@@ -1,12 +1,20 @@
|
|
|
# Docker startup helper scripts
|
|
|
|
|
|
-`startup.sh` starts/stops/pulls all containers expected to run on a docker host.
|
|
|
-The script expects a list of absolut paths to docker-compose.yml files in /opt/docker/startup/conf/$HOSTNAME.
|
|
|
+`startup.sh` brings containers up/down or pulls images with `docker compose`.
|
|
|
+The script looks for an environment variable named as per the hostname of the machine
|
|
|
+containing a list with absolute paths to `docker-compose.yml` files.
|
|
|
+Those variables can be defined in `.env`.
|
|
|
|
|
|
-`container-startup.service` is a oneshot systemd service which runs `startup.sh up` after boot. Stop/restart are explicitely not part of the service as those actions are [handled by the docker daemon](https://docs.docker.com/config/containers/start-containers-automatically/).
|
|
|
+`container-startup.service` is a one-shot systemd service which runs `startup.sh up` after boot.
|
|
|
+Stop and restart are explicitly not part of the service as those actions are
|
|
|
+[handled by the docker daemon](https://docs.docker.com/config/containers/start-containers-automatically/).
|
|
|
|
|
|
To install the service run:
|
|
|
```
|
|
|
+cp .env.template .env
|
|
|
+# add a variable named as per the hostname of the machine
|
|
|
+# with the list of your docker-compose.yml files
|
|
|
+vi .env
|
|
|
cp container-startup.service /etc/systemd/system/
|
|
|
systemctl enable container-startup.service
|
|
|
```
|