-
Notifications
You must be signed in to change notification settings - Fork 34
/
docker-compose.yml
50 lines (47 loc) · 1.24 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
version: '3'
services:
# Runs the Python server process:
# Runs the JS client build and serve process:
web:
build:
context: .
dockerfile: Dockerfile
depends_on:
- postgres
- redis
links:
- redis
environment:
DJANGO_SETTINGS_MODULE: config.settings.local
DATABASE_URL: postgres://metecho:sample_db_password@postgres:5432/metecho
REDIS_URL: redis://redis:6379
REDIS_HOST: redis
volumes:
- .:/app:cached
- /app/node_modules
ports:
- '8080:8080'
- '8000:8000'
# Storybook server
- '6006:6006'
# Open this port to attach to remote debuggers in the Python process,
# if need-be:
- '33284:33284' # Spells "DEBUG" in phone-number
stdin_open: true
tty: true
# Wait for Postgres DB to be ready before running server
command:
bash -c 'while !</dev/tcp/postgres/5432; do sleep 1; done;
/app/start-server.sh'
# Runs the database process:
postgres:
image: postgres:12.9
restart: always
environment:
POSTGRES_USER: metecho
POSTGRES_PASSWORD: sample_db_password
volumes:
- ./postgres:/var/lib/postgresql/data:delegated
# Runs the queue process:
redis:
image: redis:6.2