- Symfony 8.1 webapp skeleton on PHP 8.5 (AssetMapper/importmap, no Node)
- Form-login gate: User entity, security.yaml, SecurityController,
app:user:create command, initial migration (user + messenger_messages)
- Bootstrap 5 + DataTables layout (base/login/home templates); any
table.datatable is auto-initialised
- trusted_proxies/headers wired for the shared Nginx Proxy Manager
- Docker (servers only): docker-compose.yml (php:8.5-fpm-alpine,
nginx:1.30-alpine, mariadb:12.3; host ports 8085/3310; external
docker_default network) + docker/{Dockerfile,php.ini,nginx,setup.sh,restart.sh}
- .env with CHANGEME placeholders (no secrets), .gitattributes enforces
LF so the deploy scripts stay runnable on Linux
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
76 lines
2.0 KiB
YAML
76 lines
2.0 KiB
YAML
# dmtools stack - servers only (testing + live). Not used locally.
|
|
#
|
|
# Reached only through the shared Nginx Proxy Manager, which terminates TLS for
|
|
# dmtools.fvandenberg.nl and forwards to the `nginx` container by name over the
|
|
# external `docker_default` 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
|
|
networks:
|
|
- default
|
|
- proxy
|
|
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_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:
|
|
|
|
networks:
|
|
# Pre-existing network the server's Nginx Proxy Manager uses to reach backend
|
|
# containers. Created outside this stack - must already exist on the host.
|
|
proxy:
|
|
name: docker_default
|
|
external: true
|