DockerProject/docker-compose.service

13 lines
420 B
SYSTEMD
Raw Permalink Normal View History

2024-04-22 13:04:31 +04:00
[Unit]
Description=Some personal Docker containers
After=docker.service
Requires=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes # чтобы считать службу активной после завершения процесса
ExecStart=docker compose -f /opt/project/docker-compose.yml up --detach
ExecStop=docker compose -f /opt/project/docker-compose.yml stop
[Install]
WantedBy=multi-user.target