Collection of my docker-compose configs for multiple applications.
https://software-berater.net/2020/meine-docker-sammlung/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
776 B
31 lines
776 B
[Unit]
|
|
Description=%i service with docker compose
|
|
Requires=docker.service
|
|
After=docker.service
|
|
|
|
[Service]
|
|
Restart=always
|
|
TimeoutStartSec=1200
|
|
|
|
WorkingDirectory=/opt/dockerfiles/%i
|
|
|
|
# Remove old containers, images and volumes and update it
|
|
ExecStartPre=/usr/local/bin/docker-compose down -v
|
|
ExecStartPre=/usr/local/bin/docker-compose rm -fv
|
|
ExecStartPre=/usr/local/bin/docker-compose pull
|
|
|
|
# Compose up
|
|
ExecStart=/usr/local/bin/docker-compose up
|
|
|
|
# Compose down, remove containers and volumes
|
|
ExecStop=/usr/local/bin/docker-compose down -v
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
ExecStartPre=/usr/local/bin/docker-compose pull
|
|
|
|
# Compose up
|
|
ExecStart=/usr/local/bin/docker-compose up
|
|
|
|
# Compose down, remove containers and volumes
|
|
ExecStop=/usr/local/bin/docker-compose down -v
|