forked from MIT-LCP/physionet-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
86 lines (80 loc) · 1.82 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: '3.9'
x-backend: &default-backend
image: physionet:latest
depends_on:
- db
stdin_open: true
tty: true
entrypoint: ./docker/dev-entrypoint.sh
volumes:
dev_data:
test_data:
db_data:
networks:
dev:
test:
x-env: &default-env
DJANGO_SETTINGS_MODULE: physionet.settings.settings
DB_HOST: db
GCS_HOST: gcs
MEDIA_ROOT: /data/pn-media
STATIC_ROOT: /data/pn-static
services:
dev:
<<: *default-backend
build: .
ports:
- '8000:8000'
environment:
<<: *default-env
DB_NAME: physionet_dev
env_file: .env
command: ['python', '/code/physionet-django/manage.py', 'runserver', '0.0.0.0:8000']
volumes:
- ./pyproject.toml:/code/pyproject.toml:rw
- ./poetry.lock:/code/poetry.lock:rw
- ./docker:/code/docker:rw
- ./physionet-django:/code/physionet-django:rw
- dev_data:/data:rw
networks:
- dev
test:
<<: *default-backend
environment:
<<: *default-env
DB_NAME: physionet_test
env_file: .env.example
command: ['sleep']
volumes:
- ./pyproject.toml:/code/pyproject.toml:rw
- ./poetry.lock:/code/poetry.lock:rw
- ./docker:/code/docker:rw
- ./physionet-django:/code/physionet-django:rw
- test_data:/data:rw
networks:
- test
depends_on:
- gcs
db:
image: postgres:13-alpine
environment:
POSTGRES_USER: physionet
POSTGRES_PASSWORD: password
DEV_DB: physionet_dev
TEST_DB: physionet_test
volumes:
- db_data:/var/lib/postgres/data:rw
- ./docker/init.sh:/docker-entrypoint-initdb.d/init.sh
networks:
- dev
- test
ports:
- 5432:5432
gcs:
image: fsouza/fake-gcs-server
command: ["-scheme", "http", "-backend", "memory"]
networks:
- dev
- test
ports:
- 4443:4443