Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ services:
expose:
- "3001"
volumes:
- ./data:/app/data
# Named volume (not a relative bind mount): Coolify resolves it under the
# resource's managed storage and it survives redeploys without the
# convert-to-directory bind-mount pitfalls.
- b2b_data:/app/data
environment:
- NODE_ENV=production
# SQLite file inside the mounted volume so data survives redeploys.
Expand Down Expand Up @@ -51,28 +54,25 @@ services:
mem_limit: 128m
cpus: "0.5"
healthcheck:
# nginx:alpine has busybox wget.
test: ["CMD", "wget", "--spider", "-q", "http://localhost:80/"]
# nginx:alpine has busybox wget. Use 127.0.0.1 (not localhost): localhost
# resolves to ::1 first and nginx listens IPv4-only, so wget would fail
# forever, the container would never go healthy, and Traefik would drop it
# from the load balancer (503 "no available server").
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:80/"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
networks:
- default
- coolify
labels:
- traefik.enable=true
- "traefik.http.routers.b2b-web.rule=Host(`b2b.nxssie.dev`)"
- traefik.http.routers.b2b-web.entrypoints=websecure
- traefik.http.routers.b2b-web.tls=true
- traefik.http.routers.b2b-web.tls.certresolver=letsencrypt
- traefik.http.services.b2b-web.loadbalancer.server.port=80
# No custom networks and no hardcoded Traefik labels: Coolify auto-creates
# the per-stack network, attaches its proxy, and generates the correct
# routers/TLS when you set this service's domain (https://b2b.nxssie.dev) in
# the Coolify UI. Declaring our own network or labels here would multi-home
# the container (intermittent 504s) and collide with Coolify's generated set.
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"

networks:
coolify:
external: true
volumes:
b2b_data:
Loading