Skip to content

Commit e7fadff

Browse files
committed
docs(getting-started): Add docker compose gestion
Add a docker compose gestion in the python file with a bash script
1 parent 9d861df commit e7fadff

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

docs/script/getting_started/start.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
from subprocess import call
12
import subprocess
23
import json
4+
import sys
5+
from time import sleep
36

47
# List of available processor architectures
58
# Template: "n - Arch name"
@@ -80,10 +83,8 @@ def start_demo():
8083

8184
print("Starting the demo...")
8285

83-
'''
84-
up = subprocess.run(["docker", "compose", "up", "--abort-on-container-exit"], text=True, capture_output=True)
85-
print(up.stdout)
86-
print(up.stderr)
87-
'''
86+
rc = call("./start.sh")
87+
88+
8889
if __name__ == '__main__':
8990
start_demo()
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
docker compose up -d
4+
5+
docker compose logs sensor -f &
6+
7+
docker compose logs formula -f &
8+
9+
sleep 60
10+
11+
docker compose down

0 commit comments

Comments
 (0)