forked from jo-chemla/RiverREM_UI
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (52 loc) · 1.94 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (52 loc) · 1.94 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
name: riverrem
# Public / production stack. Builds both images from this repo on the Docker host;
# TLS is terminated by your existing Traefik via the external `traefik_proxy` network
# (+ a cert resolver named `leresolver` — rename to match yours). `web` (nginx) serves
# the SPA and same-origin-proxies the API/COGs to `api` on the internal network.
#
# Set as stack env vars (Portainer) or a .env file (see .env.example):
# DOMAIN = rem.example.com
# PUBLIC_BASE = https://rem.example.com (used to build COG + share URLs)
# VITE_API_BASE = (empty — same origin)
# GIT_SHA = short commit hash shown in the footer (optional)
#
# Prefer prebuilt images instead of building on the host? Point `image:` at your
# registry (e.g. ghcr.io/<org>/riverrem-api) and drop the `build:` blocks; CI in
# .github/workflows/build-and-push.yml publishes them on push to main.
services:
api:
build: ./backend
image: riverrem-api:latest
container_name: riverrem-api
environment:
PUBLIC_BASE: ${PUBLIC_BASE:-https://rem.example.com}
DATA_DIR: /data
MAX_COGS: ${MAX_COGS:-200}
volumes:
- cogs:/data # generated REM/DEM COGs persist here
networks: [internal]
restart: unless-stopped
web:
build:
context: ./frontend
args:
VITE_API_BASE: ${VITE_API_BASE:-}
VITE_GIT_SHA: ${GIT_SHA:-dev}
image: riverrem-web:latest
container_name: riverrem-web
depends_on: [api]
networks: [traefik_proxy, internal]
restart: unless-stopped
labels:
traefik.enable: "true"
traefik.http.routers.riverrem.rule: "Host(`${DOMAIN:-rem.example.com}`)"
traefik.http.routers.riverrem.entrypoints: websecure
traefik.http.routers.riverrem.tls.certresolver: leresolver
traefik.http.services.riverrem.loadbalancer.server.port: "80"
traefik.docker.network: traefik_proxy
networks:
traefik_proxy:
external: true
internal:
volumes:
cogs: