From 37e705a8b4a96edd32b8f85b56a7ee3eef72247f Mon Sep 17 00:00:00 2001 From: DoodleyJC Date: Wed, 3 Jul 2024 22:23:23 +0200 Subject: [PATCH 1/2] finally got things, using docker desktop and then running commands manually to start flask server, I am not using the vscode addon, is that recommended? --- .devcontainer/Dockerfile | 12 +++++++++++- .devcontainer/docker-compose.yml | 5 ++--- tasks.py | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 0a93e44..963fa35 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1 +1,11 @@ -FROM python:3.12 +FROM python:3.11 + +ENV PYTHONPATH "/workspaces/www/backend/src" + +RUN pip install invoke +RUN pip install flask + +EXPOSE 5000 + + + diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 3e6c7ae..af13304 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.8" - services: webapp: build: @@ -9,7 +7,8 @@ services: volumes: - ../..:/workspaces:cached command: sleep infinity - network_mode: service:db + ports: + - "5000:5000" db: image: postgres:16-alpine restart: unless-stopped diff --git a/tasks.py b/tasks.py index 9a7dab7..fb540f0 100644 --- a/tasks.py +++ b/tasks.py @@ -19,4 +19,4 @@ def update_combined_reqs(c): # Run @task def run_back(c): - get_api().run() + get_api().run(host="0.0.0.0") From 07ff0b07c0ac79e1d367f03208135719cd4320f9 Mon Sep 17 00:00:00 2001 From: DoodleyJC Date: Wed, 3 Jul 2024 22:26:08 +0200 Subject: [PATCH 2/2] changed python version --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 963fa35..2243a67 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11 +FROM python:3.12 ENV PYTHONPATH "/workspaces/www/backend/src"