-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (43 loc) · 1.25 KB
/
docker-compose.yml
File metadata and controls
45 lines (43 loc) · 1.25 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
services:
db:
container_name: mapdb-postgres-dev
image: postgres:18
volumes:
- ${POSTGRES_DATA_DIR}:/var/lib/postgresql
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
env_file:
- .env
ports:
- "127.0.0.1:${POSTGRES_PORT}:${POSTGRES_PORT}"
command: -p ${POSTGRES_PORT}
django:
container_name: mapdb-django-dev
build:
context: .
dockerfile: docker/Dockerfile
target: dev
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
ports:
- "8000:8000"
env_file:
- .env
depends_on:
- db
nginx-server:
# nginx proxies requests to django via gunicorn.
container_name: mapdb-nginx-dev
image: nginx:latest
volumes:
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
- ${HOST_STATIC_ROOT}:/usr/share/nginx/html/static # website static assets.
- ${HOST_MEDIA_ROOT}:/usr/share/nginx/html/silo # website user-uploaded files.
ports:
- "80:80"
depends_on:
- django