-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
64 lines (63 loc) · 1.72 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
64 lines (63 loc) · 1.72 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
58
59
60
61
62
63
64
services:
db:
image: postgres
logging:
driver: "json-file"
options:
max-size: "5m"
env_file: ./.env
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_USER=${DB_USER}
- POSTGRES_DB=${DB_NAME}
- POSTGRES_INITDB_ARGS=--auth-host=scram-sha-256 --auth-local=scram-sha-256
volumes:
- postgres_data_dev:/var/lib/postgresql
restart: always
web:
build:
context: .
target: base
image: ipl:latest
volumes:
- ./src:/usr/src/app # Mount source code for live reload
- ./tests:/usr/src/tests # Mount tests directory
- venv_cache:/usr/src/.venv # Preserve virtual environment
- ./media:/usr/src/app/media # Match prod media path
- ./webcam:/usr/src/app/webcam
- ./reports:/usr/src/app/reports
depends_on:
- db
ports:
- "8080:8080"
command: "sh -c 'chmod +x ./wait-for-it.sh && ./wait-for-it.sh db:5432 -- python manage.py runserver 0:8080'"
env_file: ./.env
environment:
- DJANGO_ENV=dev
- DJANGO_SETTINGS_MODULE=config.settings
- COVERAGE_RCFILE=/etc/pyproject.toml
- PYTEST_ADDOPTS=--cov=experiments --cov=config --cov-report=term-missing /usr/src/tests
logging:
driver: "json-file"
options:
max-size: "5m"
restart: always
pgadmin:
image: dpage/pgadmin4
env_file: ./.env
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
depends_on:
- db
ports:
- "5050:80"
volumes:
- ./pgadmin-servers.json:/pgadmin4/servers.json:ro
logging:
driver: "json-file"
options:
max-size: "5m"
volumes:
venv_cache:
postgres_data_dev: