-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (40 loc) · 1.26 KB
/
docker-compose.yml
File metadata and controls
42 lines (40 loc) · 1.26 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
services:
subspace-api:
build: ./
image: ghcr.io/subtype-space/subspace-api:latest
container_name: subspace-api
restart: always
ports:
- 9595:9595
env_file: .env
# healthcheck can be too chatty in logs
# healthcheck:
# test: ["CMD", "node", "-e", "fetch('http://localhost:9595/health').then(r => { if (!r.ok) process.exit(1) }).catch(() => process.exit(1))"]
# interval: 30s
# timeout: 5s
# start_period: 10s
# retries: 3
# For Prod, do not modify this env var unless you REALLLY need to
environment:
TRMNL_DB_PATH: /opt/api/subspace-db/trmnl.sqlite
# Ensure ./data exists
volumes:
- ./data:/opt/api/subspace-db
networks:
- proxy
- api
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.subspace-api.rule=Host(`api.subtype.space`)'
- 'traefik.http.routers.subspace-api.entrypoints=websecure'
- 'traefik.http.routers.subspace-api.tls=true'
- 'traefik.http.routers.subspace-api.tls.certresolver=cloudflare'
- 'traefik.docker.network=proxy'
- 'traefik.http.routers.subspace-api.middlewares=secureHeaders@file, generic-csp@file'
volumes:
subspace_api_data:
networks:
proxy:
external: true
api:
external: true