-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcapital.service
More file actions
26 lines (23 loc) · 832 Bytes
/
Copy pathcapital.service
File metadata and controls
26 lines (23 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Capital — systemd unit. Brings the stack up on boot as a belt-and-suspenders
# guarantee alongside the containers' own `restart: unless-stopped` policy.
#
# Install:
# sudo cp capital.service /etc/systemd/system/capital.service
# sudo systemctl daemon-reload
# sudo systemctl enable --now capital.service
#
# Adjust WorkingDirectory to wherever the repository is checked out.
[Unit]
Description=Capital trading platform
Requires=docker.service
After=docker.service network-online.target
Wants=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/opt/capital
ExecStart=/usr/bin/docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
ExecStop=/usr/bin/docker compose -f docker-compose.yml -f docker-compose.prod.yml down
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target