docker-compose: service ist jetzt zusaetzlich am externen netzwerk "proxy-net" (fest), das bei jedem `docker compose up` automatisch verbunden wird - neben dem bisherigen env-konfigurierbaren NPM-netzwerk. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
services:
|
|
license-backend:
|
|
build: .
|
|
image: license-backend:latest
|
|
container_name: license-backend
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
- PORT=8080
|
|
- DATA_DIR=/data
|
|
# No public port mapping: Nginx Proxy Manager reaches the container over the
|
|
# shared Docker network as "license-backend:8080". (For a quick local test
|
|
# without NPM, uncomment the ports block below.)
|
|
# ports:
|
|
# - "127.0.0.1:8080:8080"
|
|
expose:
|
|
- "8080"
|
|
volumes:
|
|
# Named volume → data (SQLite DB) survives container recreation/redeploy.
|
|
- license-data:/data
|
|
networks:
|
|
# Always join the reverse-proxy network automatically on every deploy,
|
|
# plus the (optional) env-configurable NPM network.
|
|
- proxy-net
|
|
- npm
|
|
|
|
networks:
|
|
# Shared reverse-proxy network. The container is attached automatically by
|
|
# `docker compose up`. It must already exist (your proxy stack creates it);
|
|
# if not, create it once: docker network create proxy-net
|
|
proxy-net:
|
|
external: true
|
|
name: proxy-net
|
|
# The network Nginx Proxy Manager already runs on. Find it with:
|
|
# docker network ls
|
|
# then set NPM_NETWORK in .env (e.g. NPM_NETWORK=npm_default).
|
|
# If you only use proxy-net, you can delete this block and the "npm" entry above.
|
|
npm:
|
|
external: true
|
|
name: ${NPM_NETWORK:-npm_default}
|
|
|
|
volumes:
|
|
license-data:
|