2021-07-22 16:51:57 +02:00
|
|
|
[Unit]
|
|
|
|
Description=WorkAdventure service using docker compose
|
|
|
|
Requires=docker.service
|
|
|
|
After=docker.service
|
2022-01-18 23:43:44 +01:00
|
|
|
Before=nginx.service
|
2021-07-22 16:51:57 +02:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
|
|
|
|
User=workadventure
|
|
|
|
Group=workadventure
|
|
|
|
|
|
|
|
Restart=always
|
|
|
|
TimeoutStartSec=1200
|
|
|
|
|
|
|
|
WorkingDirectory=/opt/workadventure/source/
|
|
|
|
|
|
|
|
# Make sure no old containers are running
|
2022-01-18 23:43:44 +01:00
|
|
|
ExecStartPre=/usr/bin/docker-compose down -v
|
2021-07-22 16:51:57 +02:00
|
|
|
|
|
|
|
# Compose up
|
2022-01-18 23:43:44 +01:00
|
|
|
ExecStart=/usr/bin/docker-compose up
|
2021-07-22 16:51:57 +02:00
|
|
|
|
|
|
|
# Compose down, remove containers and volumes
|
2022-01-18 23:43:44 +01:00
|
|
|
ExecStop=/usr/bin/docker-compose down -v
|
2021-07-22 16:51:57 +02:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|