-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
50 lines (47 loc) · 1.49 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
50 lines (47 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# docker-compose.yaml — local development environment
# Run with: docker compose up --build (or: podman-compose up --build)
#
# Your existing local venv + SQLite workflow is NOT affected.
services:
db:
image: docker.io/library/postgres:18
environment:
POSTGRES_DB: ntx_dev
POSTGRES_USER: ntx_user
POSTGRES_PASSWORD: ntx_local_password
ports:
- "127.0.0.1:5432:5432"
volumes:
- pgdata:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ntx_user -d ntx_dev"]
interval: 5s
timeout: 3s
retries: 10
web:
build:
context: .
dockerfile: Containerfile
target: local
ports:
- "8000:8000"
volumes:
# Do not mount ./app:/app here: that would hide frontend/static assets
# produced during the image build. Mount source paths individually so
# Django reloads Python/templates without replacing built static files.
- ./app/manage.py:/app/manage.py
- ./app/ntx:/app/ntx
- ./app/ntx_users:/app/ntx_users
- ./app/ntxconfig:/app/ntxconfig
- ./app/templates:/app/templates
environment:
DJANGO_DEBUG: "True"
DJANGO_SECRET_KEY: "local-dev-insecure-key-change-in-production"
DJANGO_SETTINGS_MODULE: "ntxconfig.settings.container_local"
DATABASE_URL: "postgres://ntx_user:ntx_local_password@db:5432/ntx_dev"
ALLOWED_HOSTS: "localhost,127.0.0.1,0.0.0.0"
depends_on:
db:
condition: service_healthy
volumes:
pgdata: