-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (48 loc) · 1.21 KB
/
docker-compose.yml
File metadata and controls
51 lines (48 loc) · 1.21 KB
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
51
services:
db:
image: postgres:18.3-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: wytui
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
migrate:
build: .
environment:
- DATABASE_URL=postgresql://postgres:password@db:5432/wytui?schema=public
depends_on:
db:
condition: service_healthy
command: sh -c "npx prisma migrate deploy"
app:
build: .
ports:
- "3000:3000"
environment:
- DATABASE_URL=postgresql://postgres:password@db:5432/wytui?schema=public
- AUTH_SECRET=${AUTH_SECRET:-your-auth-secret-change-in-production}
- AUTH_TRUST_HOST=true
- ORIGIN=${ORIGIN:-http://localhost:3000}
- NODE_ENV=production
- ADMIN_USERNAME=${ADMIN_USERNAME:-}
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
volumes:
- downloads:/downloads
- library:/media
depends_on:
db:
condition: service_healthy
migrate:
condition: service_completed_successfully
volumes:
pgdata:
downloads:
library: