|
@@ -1,9 +1,6 @@
|
|
# Docker startup helper scripts
|
|
# Docker startup helper scripts
|
|
|
|
|
|
-`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`.
|
|
|
|
|
|
+`startup.sh` runs `docker compose` for a list of services to bring containers up/down or pulls images. The services must be defined as absolute paths to `docker-compose.yml` files in `/opt/docker/startup/services.conf`.
|
|
|
|
|
|
`container-startup.service` is a one-shot systemd service which runs `startup.sh up` after boot.
|
|
`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
|
|
Stop and restart are explicitly not part of the service as those actions are
|
|
@@ -11,9 +8,8 @@ Stop and restart are explicitly not part of the service as those actions are
|
|
|
|
|
|
To install the service run:
|
|
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
|
|
|
|
|
|
+cp services.conf services.conf.template
|
|
|
|
+# add absolute paths to your docker-compose.yml files
|
|
vi .env
|
|
vi .env
|
|
cp container-startup.service /etc/systemd/system/
|
|
cp container-startup.service /etc/systemd/system/
|
|
systemctl enable container-startup.service
|
|
systemctl enable container-startup.service
|