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