Files
Starseed/docker-compose.yml
Matthieu 93cbd48bf5
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
chore : rename Coltura to Starseed
- Rename project name across code, configs, docs, dev/prod infra
- Dev: DOCKER_APP_NAME + POSTGRES_DB switched to starseed, containers become php-starseed-fpm / nginx-starseed / starseed-db-1
- Dev: mount nginx.conf on default.conf instead of starseed.conf to avoid alphabetical-order clash with image's default site
- Makefile: export CURRENT_UID/CURRENT_GID at top level so docker compose builds (db-reset etc.) get them
- Prod: image registry path, container_name, volumes, vhost server_name + paths, DATABASE_URL, CORS, CI workflow
- Add doc/prompt-rename-prod.md with the migration runbook for the prod server (DB rename, FS move, vhost, Let's Encrypt)
2026-05-19 08:24:19 +02:00

64 lines
2.2 KiB
YAML

services:
php:
container_name: php-${DOCKER_APP_NAME}-fpm
build:
context: ./infra/dev
dockerfile: Dockerfile
args:
DOCKER_PHP_VERSION: ${DOCKER_PHP_VERSION}
DOCKER_NODE_VERSION: ${DOCKER_NODE_VERSION}
CURRENT_UID: ${CURRENT_UID}
CURRENT_GID: ${CURRENT_GID}
environment:
PHP_IDE_CONFIG: serverName=${DOCKER_APP_NAME}-docker
XDEBUG_CLIENT_HOST: ${XDEBUG_CLIENT_HOST:-host.docker.internal}
XDEBUG_CONFIG: client_host=${XDEBUG_CLIENT_HOST:-host.docker.internal} client_port=9003
DATABASE_URL: "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${POSTGRES_PORT}/${POSTGRES_DB}?serverVersion=16&charset=utf8"
COMPOSER_HOME: /tmp/composer
COMPOSER_CACHE_DIR: /tmp/composer/cache
volumes:
- ./:/var/www/html
- ~/.cache:/var/www/.cache
- ~/.config:/var/www/.config
- ~/.composer:/var/www/.composer
- ./infra/dev/php.ini:/usr/local/etc/php/php.ini
- ./infra/dev/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- ./LOG:/var/www/html/LOG
- uploads_data:/var/www/html/var/uploads
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- db
ports:
- "3004:3004"
restart: unless-stopped
nginx:
image: nginx:1.27-alpine
container_name: nginx-${DOCKER_APP_NAME}
depends_on:
- php
ports:
- "8083:80"
volumes:
- ./:/var/www/html:ro
- ./infra/dev/nginx.conf:/etc/nginx/conf.d/default.conf:ro
restart: unless-stopped
db:
image: postgres:16-alpine
# max_connections eleve (defaut PG=100) pour absorber la suite de tests :
# ~220 tests * kernel reboot par test * 2 connexions (default + audit)
# peut saturer le pool, meme avec idle_connection_ttl court cote Doctrine.
command: -p ${POSTGRES_PORT:-5436} -c max_connections=300
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- pg_data:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT:-5436}:${POSTGRES_PORT:-5436}"
restart: unless-stopped
volumes:
pg_data:
uploads_data: