+ python services and python nginx conf example

+ also example of Dockerfile for python project and needed to place onto your project directory
This commit is contained in:
WP Studio
2025-04-08 17:13:21 +03:00
parent cb5c989830
commit 537b5ad4be
6 changed files with 48 additions and 1 deletions

View File

@ -0,0 +1,16 @@
services:
python-someproject:
user: ${WORKSPACE_PUID}:${WORKSPACE_PGID}
build:
context: ${PYTHON_PROJECTS_DIR}/someproject
args:
- PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID}
- PYTHON_VERSION=3.9.20
volumes:
- ${PYTHON_PROJECTS_DIR}/someproject:/app
command: bash --init-file /venv/bin/activate -c "
python manage.py migrate
&& python manage.py collectstatic
&& uvicorn 'APP_NAME.asgi:application' --host 0.0.0.0
"