forked from tovyblox/tovy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
36 lines (34 loc) · 952 Bytes
/
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
version: "3"
services:
tovy:
restart: "unless-stopped"
tty: true
build: "."
environment:
SESSION_SECRET: ${SESSION_SECRET}
DATABASE_URL: ${DATABASE_URL:-postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}}
depends_on:
db: # Disable this if you are using an external Postgres database
condition: service_healthy
ports:
- "3000:3000"
# Comment out everything below this point if you are using an external Postgres database
db:
image: "postgres:latest"
healthcheck:
test: pg_isready -U postgres -h localhost
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- ${POSTGRES_PORT:-5432}:5432
volumes:
- db:/var/lib/postgresql/data
volumes:
db:
driver: local