-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
43 lines (30 loc) · 875 Bytes
/
README
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# STACKER
To start the api and frontend use docker compose up in main dir
To play start the main.py
1 Install Rasbian
2 Install Docker
3 Install Python, Pip and Requirements
4 Clone Repo
5 Start Backend and Webview with docker compose up
6 run python script
Api Backend: :9090/highscore
Webview: :5000
For automation:
Create Service for Backend:
sudo nano /etc/systemd/system/stacker.service
[Unit]
Description=Stacker Docker Compose and Main Script
After=network.target docker.service
Requires=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=path to project dir
ExecStart=/usr/local/bin/docker compose up -d
ExecStartPost=/usr/bin/python3 path to main.py
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable stacker.service
sudo systemctl start stacker.service
sudo systemctl status stacker.service