28 lines
595 B
Plaintext
28 lines
595 B
Plaintext
|
[Unit]
|
||
|
Description=WorkAdventure service using docker compose
|
||
|
Requires=docker.service
|
||
|
After=docker.service
|
||
|
|
||
|
[Service]
|
||
|
Type=simple
|
||
|
|
||
|
User=workadventure
|
||
|
Group=workadventure
|
||
|
|
||
|
Restart=always
|
||
|
TimeoutStartSec=1200
|
||
|
|
||
|
WorkingDirectory=/opt/workadventure/source/
|
||
|
|
||
|
# Make sure no old containers are running
|
||
|
ExecStartPre=/usr/bin/docker-compose -f docker-compose.bk.yaml down -v
|
||
|
|
||
|
# Compose up
|
||
|
ExecStart=/usr/bin/docker-compose -f docker-compose.bk.yaml up
|
||
|
|
||
|
# Compose down, remove containers and volumes
|
||
|
ExecStop=/usr/bin/docker-compose -f docker-compose.bk.yaml down -v
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|