-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.debugger.yml
More file actions
40 lines (39 loc) · 1.45 KB
/
docker-compose.debugger.yml
File metadata and controls
40 lines (39 loc) · 1.45 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
# A copy of the docker compose, specifically for debuggers.
# Will not run django by default, your debugger needs to run ``manage.py``.
services:
db:
container_name: mapdb-postgres-debugger
image: postgres:18
volumes:
- ${POSTGRES_DATA_DIR}/debugger-db/:/var/lib/postgresql
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
env_file:
- .env
# necessary for rootless containers because postgres makes a new user if running as uid=0, and subuid will make the
# container uid 0 by default. The `postgres` user won't have the necessary permissions for the volume path.
userns_mode: keep-id
ports:
- "127.0.0.1:${POSTGRES_PORT}:${POSTGRES_PORT}"
command: -p ${POSTGRES_PORT}
debugger-django:
container_name: mapdb-django-debugger
build:
context: .
dockerfile: docker/Dockerfile
target: debugger
volumes:
- .:/cncnet-map-api
- ${HOST_MEDIA_ROOT}:/data/cncnet_silo # django will save user-uploaded files here. MEDIA_ROOT
- ${HOST_STATIC_ROOT}:/data/cncnet_static # django will gather static files here. STATIC_ROOT
- ./data/tmp:/tmp/pytest-of-root # For inspecting files during pytests
ports:
- "8000:8000"
env_file:
- .env
environment:
POSTGRES_TEST_HOST: db # Necessary to connect to docker db. Overrides the .env setting.
depends_on:
- db