its 7am i havent slept i have no idea
All checks were successful
CI (Gitea) / php-tests (push) Successful in 10m5s
CI (Gitea) / docker-image (push) Successful in 2m22s

This commit is contained in:
2025-11-28 06:40:10 +00:00
parent 336dcc4d3a
commit f77f3a9e40
34 changed files with 1142 additions and 183 deletions

View File

@@ -4,93 +4,110 @@
## - db: Postgres database for Doctrine
## - pgadmin: Optional UI to inspect the database
services:
php:
# Build multi-stage image defined in docker/php/Dockerfile
build:
context: .
dockerfile: docker/php/Dockerfile
target: dev
args:
- APP_ENV=dev
container_name: php
# php:
# # Build multi-stage image defined in docker/php/Dockerfile
# build:
# context: .
# dockerfile: docker/php/Dockerfile
# target: dev
# args:
# - APP_ENV=dev
# container_name: php
# restart: unless-stopped
# #environment:
# # Doctrine DATABASE_URL consumed by Symfony/Doctrine
# #DATABASE_URL: ${DATABASE_URL:-postgresql://${POSTGRES_USER:-symfony}:${POSTGRES_PASSWORD:-symfony}@db:5432/${POSTGRES_DB:-symfony}?serverVersion=16&charset=utf8}
# volumes:
# # Mount only source and config; vendors are installed in-container
# - ./bin:/var/www/html/bin
# - ./config:/var/www/html/config
# - ./migrations:/var/www/html/migrations
# - ./public:/var/www/html/public
# - ./templates:/var/www/html/templates
# - ./src:/var/www/html/src
# - ./var:/var/www/html/var
# - ./.env:/var/www/html/.env:ro
# - ./vendor:/var/www/html/vendor
# # Keep composer manifests on host for version control
# - ./composer.json:/var/www/html/composer.json
# - ./composer.lock:/var/www/html/composer.lock
# - ./symfony.lock:/var/www/html/symfony.lock
# # Speed up composer installs by caching download artifacts
# - composer_cache:/tmp/composer
# healthcheck:
# test: ["CMD-SHELL", "php -v || exit 1"]
# interval: 10s
# timeout: 3s
# retries: 5
# depends_on:
# - db
tonehaus:
image: tonehaus/tonehaus:dev-arm64
container_name: tonehaus
restart: unless-stopped
#environment:
# Doctrine DATABASE_URL consumed by Symfony/Doctrine
#DATABASE_URL: ${DATABASE_URL:-postgresql://${POSTGRES_USER:-symfony}:${POSTGRES_PASSWORD:-symfony}@db:5432/${POSTGRES_DB:-symfony}?serverVersion=16&charset=utf8}
volumes:
# Mount only source and config; vendors are installed in-container
- ./bin:/var/www/html/bin
- ./config:/var/www/html/config
- ./migrations:/var/www/html/migrations
- ./public:/var/www/html/public
- ./templates:/var/www/html/templates
- ./src:/var/www/html/src
- ./var:/var/www/html/var
- ./.env:/var/www/html/.env:ro
- ./vendor:/var/www/html/vendor
# Keep composer manifests on host for version control
- ./composer.json:/var/www/html/composer.json
- ./composer.lock:/var/www/html/composer.lock
- ./symfony.lock:/var/www/html/symfony.lock
# Speed up composer installs by caching download artifacts
- composer_cache:/tmp/composer
healthcheck:
test: ["CMD-SHELL", "php -v || exit 1"]
interval: 10s
timeout: 3s
retries: 5
depends_on:
- db
nginx:
image: nginx:alpine
container_name: nginx
- sqlite_data:/var/www/html/var/data
ports:
- "8000:80"
volumes:
# Serve built assets and front controller from Symfony public dir
- ./public:/var/www/html/public
# Custom vhost with PHP FastCGI proxy
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
- "8085:8080"
env_file:
- .env
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/healthz"]
interval: 10s
timeout: 3s
retries: 5
# nginx:
# image: nginx:alpine
# container_name: nginx
# ports:
# - "8000:80"
# volumes:
# # Serve built assets and front controller from Symfony public dir
# - ./public:/var/www/html/public
# # Custom vhost with PHP FastCGI proxy
# - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
# depends_on:
# - tonehaus
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:80/healthz"]
# interval: 10s
# timeout: 3s
# retries: 5
db:
image: postgres:16-alpine
container_name: postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-symfony}
POSTGRES_USER: ${POSTGRES_USER:-symfony}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-symfony}
ports:
- 5432:5432
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-symfony} -d ${POSTGRES_DB:-symfony}"]
interval: 10s
timeout: 5s
retries: 10
# db:
# image: postgres:16-alpine
# container_name: postgres
# restart: unless-stopped
# environment:
# POSTGRES_DB: ${POSTGRES_DB:-symfony}
# POSTGRES_USER: ${POSTGRES_USER:-symfony}
# POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-symfony}
# ports:
# - 5432:5432
# volumes:
# - db_data:/var/lib/postgresql/data
# healthcheck:
# test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-symfony} -d ${POSTGRES_DB:-symfony}"]
# interval: 10s
# timeout: 5s
# retries: 10
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-admin@example.com}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-password}
ports:
- "8081:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
- db
# pgadmin:
# image: dpage/pgadmin4
# container_name: pgadmin
# environment:
# PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-admin@example.com}
# PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-password}
# ports:
# - "8081:80"
# volumes:
# - pgadmin_data:/var/lib/pgadmin
# depends_on:
# - db
volumes:
db_data:
composer_cache:
pgadmin_data:
sqlite_data:
# composer_cache:
# pgadmin_data: