-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (41 loc) · 1.36 KB
/
Copy pathdocker-compose.yml
File metadata and controls
43 lines (41 loc) · 1.36 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
services:
web:
build: .
ports:
# Always publish the app on host :3000 (container listens on 3000)
- "3000:3000"
volumes:
- ./storage:/app/storage
# Persist admin settings (settings.json) across container restarts
- ./data:/app/data
# External SSD (STORAGE_REPLICA_PATH). Requires the drive mounted on the Mac
# and shared with Docker Desktop (Settings → Resources → File sharing).
# create_host_path: false — do not fake an empty /Volumes/1TB if unplugged.
- type: bind
source: /Volumes/1TB
target: /Volumes/1TB
bind:
create_host_path: false
env_file:
- .env
environment:
# Host .env uses localhost for `next dev` / tools on the Mac.
# Inside Compose, Postgres is reachable only as the service name "db".
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?schema=public
depends_on:
- db
restart: unless-stopped
db:
image: postgres:15
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
# Bind localhost only — do not expose Postgres on the LAN/internet
- "127.0.0.1:5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data: