forked from ownz-network/ownz
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (35 loc) · 879 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
37 lines (35 loc) · 879 Bytes
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
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ownz
POSTGRES_PASSWORD: ownz
POSTGRES_DB: ownz
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ownz -d ownz"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
app:
build:
context: .
dockerfile: ./Dockerfile
restart: unless-stopped
depends_on:
db:
condition: service_healthy
env_file: .env
# Inside Compose the database is reachable at host "db", so override DATABASE_URL here
# (the .env value is for running the app on your host machine).
environment:
DATABASE_URL: postgres://ownz:ownz@db:5432/ownz
ports:
- "3000:3000"
volumes:
- ./data:/app/server/data
volumes:
db-data: