[Unit]
Description=DeepFlow MySQL (Docker Compose)
After=docker.service network-online.target
Wants=docker.service network-online.target

[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory={{ deepflow_mysql_stack_dir }}
EnvironmentFile={{ deepflow_mysql_env_file }}
ExecStart=/usr/bin/docker compose --env-file {{ deepflow_mysql_env_file }} -f {{ deepflow_mysql_compose_file }} up -d
ExecStop=/usr/bin/docker compose --env-file {{ deepflow_mysql_env_file }} -f {{ deepflow_mysql_compose_file }} down
TimeoutStartSec=0
TimeoutStopSec=120

[Install]
WantedBy=multi-user.target
