-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (58 loc) · 1.84 KB
/
Copy pathdocker-compose.yml
File metadata and controls
62 lines (58 loc) · 1.84 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
58
59
60
61
62
# Vendor-neutral self-host: the app + Postgres. See docs/deployment.md.
#
# Before this works end-to-end you must swap the DB driver in src/db/index.ts
# (Neon HTTP -> node-postgres). File uploads additionally need an S3-compatible
# store (see the optional `minio` service below and the storage note in the docs).
services:
app:
build: .
ports:
- "3000:3000"
environment:
# Point at the db service. The migrations create the schema; see docs.
DATABASE_URL: postgres://app:app@db:5432/app
BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET}
BETTER_AUTH_URL: ${BETTER_AUTH_URL:-http://localhost:3000}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
# For document uploads after swapping storage.ts to an S3 client:
# S3_ENDPOINT: http://minio:9000
# S3_REGION: auto
# S3_BUCKET: documents
# S3_ACCESS_KEY_ID: minioadmin
# S3_SECRET_ACCESS_KEY: minioadmin
depends_on:
db:
condition: service_healthy
restart: unless-stopped
db:
image: postgres:17-alpine
environment:
POSTGRES_USER: app
POSTGRES_PASSWORD: app
POSTGRES_DB: app
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app -d app"]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
# Optional S3-compatible object store for document uploads.
# Uncomment, then adapt src/lib/storage.ts + the documents route to S3.
# minio:
# image: minio/minio
# command: server /data --console-address ":9001"
# ports:
# - "9000:9000"
# - "9001:9001"
# environment:
# MINIO_ROOT_USER: minioadmin
# MINIO_ROOT_PASSWORD: minioadmin
# volumes:
# - minio-data:/data
# restart: unless-stopped
volumes:
db-data:
# minio-data: