2022-12-17 20:28:41 +01:00
|
|
|
[Unit]
|
|
|
|
Description=23b service using docker compose
|
|
|
|
Requires=docker.service
|
|
|
|
After=docker.service
|
|
|
|
Before=nginx.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
|
|
|
|
User=23b
|
|
|
|
Group=23b
|
|
|
|
|
|
|
|
Restart=always
|
|
|
|
TimeoutStartSec=1200
|
|
|
|
|
2023-01-01 02:04:24 +01:00
|
|
|
WorkingDirectory=/opt/23b/23b/23b
|
2022-12-17 20:28:41 +01:00
|
|
|
|
|
|
|
# Make sure no old containers are running
|
|
|
|
ExecStartPre=/usr/bin/docker-compose down -v
|
|
|
|
|
|
|
|
# Compose up
|
|
|
|
ExecStart=/usr/bin/docker-compose up
|
|
|
|
|
|
|
|
# Compose down, remove containers and volumes
|
|
|
|
ExecStop=/usr/bin/docker-compose down -v
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|