diff --git a/.github/workflows/flowzone.yml b/.github/workflows/flowzone.yml index 18d4871..da1598e 100644 --- a/.github/workflows/flowzone.yml +++ b/.github/workflows/flowzone.yml @@ -14,4 +14,3 @@ jobs: (github.event.pull_request.head.repo.full_name != github.repository && github.event_name == 'pull_request_target') uses: product-os/flowzone/.github/workflows/flowzone.yml@master secrets: inherit - with: {} diff --git a/Dockerfile.template b/Dockerfile.template index 2dc2f2b..82f88e5 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,11 +1,13 @@ FROM balenalib/%%RESIN_MACHINE_NAME%%-alpine:latest -RUN apk update && apk add bash py-pip lockfile-progs --no-cache && \ +WORKDIR /usr/src/app + +RUN apk update && apk add bash python3 lockfile-progs --no-cache && \ + python3 -m venv venv && \ + source venv/bin/activate && \ pip install --upgrade pip && \ pip install flask -WORKDIR /usr/src/app - COPY . ./ CMD ["bash", "start.sh"] diff --git a/start.sh b/start.sh index 2bc464f..35f05e6 100644 --- a/start.sh +++ b/start.sh @@ -1,4 +1,7 @@ #!/bin/bash + +source venv/bin/activate + python server.py & for ((i=1;i<=5;i++)); do