-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
62 lines (57 loc) · 1.28 KB
/
docker-compose.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
version: '3.8'
services:
pg_test:
image: ${COMPOSE_PROJECT_NAME}_pg_test_dev
container_name: ${COMPOSE_PROJECT_NAME}_pg_test_dev
build:
context: ./docker/postgres/test
env_file:
- postgres.env
tmpfs:
- /var/lib/postgresql/data
postgres:
image: ${COMPOSE_PROJECT_NAME}_postgres_dev
container_name: ${COMPOSE_PROJECT_NAME}_postgres_dev
build:
context: ./docker/postgres/dev
restart: always
env_file:
- dev.env
- .env
- postgres.env
volumes:
- type: volume
source: postgres_volume
target: /var/lib/postgresql/data
ports:
- '5432:5432'
networks:
- backend
web:
image: ${COMPOSE_PROJECT_NAME}_web_dev
container_name: ${COMPOSE_PROJECT_NAME}_web_dev
build:
dockerfile: ./docker/dev/web/Dockerfile
context: .
depends_on:
- postgres
restart: always
tty: true
env_file:
- dev.env
- .env
- postgres.env
volumes:
- .:/code
ports:
- '${WEB_PORT}:${WEB_PORT}'
- '${DEBUG_PORT}:${DEBUG_PORT}'
command: >
sh -c "python -Xfrozen_modules=off manage.py runserver 0.0.0.0:${WEB_PORT} --nostatic"
networks:
- backend
networks:
backend:
driver: bridge
volumes:
postgres_volume: