forked from FF-RGB/ansible
29 lines
514 B
Plaintext
29 lines
514 B
Plaintext
|
[Unit]
|
||
|
Description=speedtest service using docker compose
|
||
|
Requires=docker.service
|
||
|
After=docker.service
|
||
|
Before=nginx.service
|
||
|
|
||
|
[Service]
|
||
|
Type=simple
|
||
|
|
||
|
User=speedtest
|
||
|
Group=speedtest
|
||
|
|
||
|
Restart=always
|
||
|
TimeoutStartSec=1200
|
||
|
|
||
|
WorkingDirectory=/opt/speedtest
|
||
|
|
||
|
# 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
|