-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (47 loc) · 1.28 KB
/
Copy pathdocker-compose.yml
File metadata and controls
49 lines (47 loc) · 1.28 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
# OrderFlow — single-server deployment with automatic HTTPS.
#
# Caddy terminates TLS (free Let's Encrypt certificate for your domain) and
# proxies to the OrderFlow app. Everything runs on one rented server.
#
# Quick start (see docs/DEPLOYMENT.md for the full runbook):
# 1) point your domain's DNS A record at the server IP
# 2) cp .env.server.example .env (and fill it in)
# 3) docker compose up -d --build
services:
app:
build: .
restart: unless-stopped
env_file: .env
environment:
- PORT=3000
- DB_PATH=/data/orderflow.db
- PRINTER_TYPE=none
volumes:
- orderflow_data:/data
expose:
- "3000"
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3000/healthz').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
interval: 30s
timeout: 5s
retries: 3
caddy:
image: caddy:2
restart: unless-stopped
depends_on:
- app
ports:
- "80:80"
- "443:443"
environment:
# Set these in .env: your domain and an email for Let's Encrypt.
- DOMAIN=${DOMAIN}
- ACME_EMAIL=${ACME_EMAIL}
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
volumes:
orderflow_data:
caddy_data:
caddy_config: