Files
dmtools/docker-compose.yml
T
FrankandClaude Sonnet 5 8406f06738 docker: NPM joins dmtools_default, not a shared proxy network
NPM (nginx_app_1) is connected to each stack's own default network by
hand, not to a shared docker_default. Drop the unused external `proxy`
network from the compose file; nginx just lives on dmtools_default.
setup.sh now connects NPM to it (no-op if already connected) and prints
the proxy-host settings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 21:32:10 +02:00

74 lines
2.0 KiB
YAML

# dmtools stack - servers only (testing + live). Not used locally.
#
# Reached through Nginx Proxy Manager, which terminates TLS for
# dmtools.fvandenberg.nl and forwards to the `nginx` container by name.
# NPM is not on a shared proxy network here - it is connected to each
# stack's own default network by hand. After the first `up`, run once:
#
# docker network connect dmtools_default nginx_app_1
#
# (NPM keeps that connection across restarts; only needed again after a
# `docker compose down` removes the network.)
#
# Published host ports are bound to loopback for local curl / DB-client
# access on the server itself.
#
# Bring up with docker/setup.sh (pins the compose project name to `dmtools`).
services:
php:
build:
context: .
dockerfile: docker/php/Dockerfile
container_name: dmtools-php
env_file:
- path: .env
- path: .env.local
required: false
volumes:
- .:/var/www/html:cached
- php_var:/var/www/html/var
depends_on:
database:
condition: service_healthy
restart: unless-stopped
nginx:
image: nginx:1.30-alpine
container_name: dmtools-nginx
ports:
- "127.0.0.1:${NGINX_PORT:-8085}:80"
volumes:
- .:/var/www/html:ro
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- php
restart: unless-stopped
database:
image: mariadb:12.3
container_name: dmtools-db
environment:
MARIADB_DATABASE: ${DB_NAME:-dmtools}
MARIADB_USER: ${DB_USER:-dmtools}
MARIADB_PASSWORD: ${DB_PASSWORD:-ChangeMe}
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-ChangeMeRoot}
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
ports:
- "127.0.0.1:${DB_HOST_PORT:-3310}:3306"
volumes:
- database_data:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
restart: unless-stopped
volumes:
database_data:
php_var: