forked from embassynetwork/modernomad
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
48 lines (43 loc) · 1.18 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
services:
django:
build: .
command: ["./manage.py", "runserver", "0.0.0.0:8000"]
ports:
- "8000:8000"
environment:
# See docker-compose.override.example.yml on how to to override these
DJANGO_SETTINGS_MODULE: modernomad.settings
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
STRIPE_PUBLISHABLE_KEY: ${STRIPE_PUBLISHABLE_KEY}
MAILGUN_API_KEY: ${MAILGUN_API_KEY}
stdin_open: true
tty: true
volumes:
- "./:/app"
env_file:
- .env
client:
build:
context: client # Dockerfile is inside client dir
command: ["node", "server.js"]
ports:
- "3000:3000"
volumes:
- "./:/app"
- "/app/client/node_modules"
postgres:
image: postgres:15
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata: