Fix compose: use default bridge network, match cashup service names

The frontend nginx proxies to 'backend:3001', so services must be named
backend/frontend. Drop the external hnf_net network (each app runs in its
own LXC) and add apparmor=unconfined for docker-in-LXC.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-02 14:03:33 +00:00
parent 4abae5eda1
commit 773d323060

View file

@ -1,31 +1,36 @@
services: services:
hk-planner-backend: backend:
build: ./backend build: ./backend
container_name: hk-planner-backend security_opt:
restart: unless-stopped - apparmor=unconfined
environment: environment:
DATABASE_URL: ${DATABASE_URL} - DATABASE_URL=${DATABASE_URL}
CENTRAL_AUTH_SECRET: ${CENTRAL_AUTH_SECRET} - CENTRAL_AUTH_SECRET=${CENTRAL_AUTH_SECRET}
SETTINGS_URL: ${SETTINGS_URL} - SETTINGS_URL=${SETTINGS_URL}
SETTINGS_SECRET: ${SETTINGS_SECRET} - SETTINGS_SECRET=${SETTINGS_SECRET}
APP_SLUG: hk-planner - APP_SLUG=hk-planner
networks: - OFFICE_IP_CHECK=${OFFICE_IP_CHECK:-disabled}
- hnf_net healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:3001/health || exit 1"]
interval: 10s
retries: 5
start_period: 20s
restart: unless-stopped
hk-planner-frontend: frontend:
build: build:
context: ./frontend context: ./frontend
args: args:
VITE_HOTEL_NAME: ${VITE_HOTEL_NAME} VITE_HOTEL_NAME: ${VITE_HOTEL_NAME}
container_name: hk-planner-frontend security_opt:
restart: unless-stopped - apparmor=unconfined
ports: ports:
- "${FRONTEND_PORT:-3080}:80" - "${FRONTEND_PORT:-3080}:80"
depends_on: depends_on:
- hk-planner-backend backend:
networks: condition: service_healthy
- hnf_net restart: unless-stopped
networks: networks:
hnf_net: default:
external: true driver: bridge