ansible-role-swarm/files/docker-compose.service

11 lines
308 B
Desktop File

[Unit]
Description= Docker compose for %i
After=network.target docker.service
[Service]
Type=oneshot
ExecStart=/usr/bin/docker-compose up -d -f /etc/docker/compose/%i/docker-compose.yml
ExecStop=/usr/bin/docker-compose down -f /etc/docker/compose/%i/docker-compose.yml
[Install]
WantedBy=multi-user.target