-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
57 lines (53 loc) · 1.54 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
57 lines (53 loc) · 1.54 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
52
53
54
55
56
57
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-stash}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-stash}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-stash}"]
interval: 10s
timeout: 5s
retries: 5
api:
image: ghcr.io/${GH_REPOSITORY_OWNER:-eigger}/stash-api:latest
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
command: sh -lc "npx prisma migrate deploy --schema apps/api/prisma/schema.prisma --config apps/api/prisma.config.ts && node apps/api/dist/index.js"
volumes:
- uploads:/app/uploads
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-stash}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-stash}
JWT_SECRET: ${JWT_SECRET}
NODE_ENV: production
PORT: "8080"
APP_PUBLIC_URL: ${APP_PUBLIC_URL:-http://localhost}
UPCITEMDB_API_KEY: ${UPCITEMDB_API_KEY:-}
INVENTORY_WEBHOOK_URL: ${INVENTORY_WEBHOOK_URL:-}
COOKIE_SECURE: ${COOKIE_SECURE:-}
web:
image: ghcr.io/${GH_REPOSITORY_OWNER:-eigger}/stash-web:latest
restart: unless-stopped
depends_on:
- api
environment:
NODE_ENV: production
caddy:
image: caddy:2
restart: unless-stopped
ports:
- "80:80"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
depends_on:
- api
- web
volumes:
pgdata:
uploads: