-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
41 lines (38 loc) · 949 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
37
38
39
40
41
version: '3.8'
services:
db:
image: postgres:15-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-vpub}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-yourpassword}
POSTGRES_DB: ${POSTGRES_DB:-vpub}
volumes:
- db_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 5s
timeout: 5s
retries: 5
vpub:
build: .
env_file:
- .env
environment:
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?sslmode=disable
SESSION_KEY: ${SESSION_KEY}
CSRF_KEY: ${CSRF_KEY}
CSRF_SECURE: ${CSRF_SECURE}
PORT: ${PORT}
depends_on:
db:
condition: service_healthy
ports:
- "${HOST_PORT}:${PORT}"
restart: unless-stopped
develop:
watch:
- path: ./
action: rebuild
volumes:
db_data: