diff --git a/examples/eo-services.service b/examples/eo-services.service new file mode 100644 index 0000000..25be4a3 --- /dev/null +++ b/examples/eo-services.service @@ -0,0 +1,17 @@ +[Unit] +Description=eo-services +Requires=docker.service +After=docker.service +[Service] +Restart=always +User=root +Group=docker +WorkingDirectory=/opt/em/projects/current/demo/eo-services +# Shutdown container (if running) when unit is started +ExecStartPre=/usr/bin/docker compose down +# Start container when unit is started +ExecStart=/usr/bin/docker compose up +# Stop container when unit is stopped +ExecStop=/usr/bin/docker compose down +[Install] +WantedBy=multi-user.target \ No newline at end of file