You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1018 B
Django/Jinja
27 lines
1018 B
Django/Jinja
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
image: {{ project_slug | replace('_', '-') }}:local
|
|
environment:
|
|
APP_ENV: ${APP_ENV:-prod}
|
|
SECRET_KEY: ${SECRET_KEY:-change-me}
|
|
JWT_SECRET_KEY: ${JWT_SECRET_KEY:-change-me}
|
|
MYSQL_HOST: ${MYSQL_HOST:-host.docker.internal}
|
|
MYSQL_PORT: ${MYSQL_PORT:-3306}
|
|
MYSQL_DATABASE: ${MYSQL_DATABASE:-app}
|
|
MYSQL_USER: ${MYSQL_USER:-app}
|
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-change-me}
|
|
LOG_FILE_ENABLED: ${LOG_FILE_ENABLED:-true}
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
ports:
|
|
- "${APP_PORT:-8000}:8000"
|
|
volumes:
|
|
- ./runtime:/app/runtime
|
|
command: >
|
|
sh -c "{% if include_system %}uv run iti-system migrations sync --target migrations/versions &&
|
|
{% endif %}uv run alembic -c migrations/alembic.ini upgrade head &&
|
|
{% if include_system %}PYTHONPATH=. uv run iti-system seed system app:create_app &&
|
|
{% endif %}uv run uvicorn main:app --host 0.0.0.0 --port 8000"
|