diff --git a/app/Makefile b/app/Makefile index 9d733bf..f93f8c9 100644 --- a/app/Makefile +++ b/app/Makefile @@ -92,6 +92,9 @@ build: start: docker compose up --detach +start-debug: + docker compose -f docker-compose.debug.yml -f docker-compose.yml up --detach + run-logs: start docker compose logs --follow --no-color $(APP_NAME) diff --git a/docker-compose.debug.yml b/docker-compose.debug.yml new file mode 100644 index 0000000..cda9797 --- /dev/null +++ b/docker-compose.debug.yml @@ -0,0 +1,21 @@ +version: "3.8" + +# run with `docker compose -f` +# combines ports and env vars with main docker-compose.yml mass-pfml-api service +services: + main-app: + build: + context: ./app + target: dev + args: + - RUN_UID=${RUN_UID:-4000} + - RUN_USER=${RUN_USER:-app} + command: ["poetry", "run", "flask", "--app", "src.app", "run", "--host", "0.0.0.0", "--port", "8080", "--reload"] + container_name: main-app + env_file: ./app/local.env + ports: + - 5678:5678 + environment: + - DEBUG_ADAPTER_PROTOCOL_ENABLE=true + volumes: + - ./app:/app