1
0
Fork 0
cms11/docker-compose.yml

112 lines
3.2 KiB
YAML

services:
base_laravel.test:
build:
context: ./vendor/laravel/sail/runtimes/${PHP_VERSION}
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: sail-${PHP_VERSION}/app
command: /bin/true
laravel.test:
build:
context: ./docker
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
PHP_VERSION: ${PHP_VERSION}
image: custom-sail-${PHP_VERSION}/app
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- '${APP_PORT:-80}:80'
- '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
environment:
WWWUSER: '${WWWUSER}'
LARAVEL_SAIL: 1
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
IGNITION_LOCAL_SITES_PATH: '${PWD}'
volumes:
- '.:/var/www/html'
- '../contenu:/content'
- '~/.ssh:/home/sail/.ssh:ro'
networks:
- sail
depends_on:
- pgsql
- redis
- selenium
- nu-validator
- base_laravel.test
- libretranslate
pgsql:
image: 'postgres:15'
ports:
- '${FORWARD_DB_PORT:-5432}:5432'
environment:
PGPASSWORD: '${DB_PASSWORD:-secret}'
POSTGRES_DB: '${DB_DATABASE}'
POSTGRES_USER: '${DB_USERNAME}'
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
volumes:
- 'sail-pgsql:/var/lib/postgresql/data'
- './vendor/laravel/sail/database/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
networks:
- sail
healthcheck:
test:
- CMD
- pg_isready
- '-q'
- '-d'
- '${DB_DATABASE}'
- '-U'
- '${DB_USERNAME}'
retries: 3
timeout: 5s
redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- 'sail-redis:/data'
networks:
- sail
healthcheck:
test:
- CMD
- redis-cli
- ping
retries: 3
timeout: 5s
selenium:
image: seleniarm/standalone-chromium
extra_hosts:
- 'host.docker.internal:host-gateway'
volumes:
- '/dev/shm:/dev/shm'
networks:
- sail
nu-validator:
image: ghcr.io/validator/validator:latest
extra_hosts:
- 'host.docker.internal:host-gateway'
networks:
- sail
libretranslate:
image: libretranslate/libretranslate
extra_hosts:
- 'host.docker.internal:host-gateway'
environment:
- DBUS_SESSION_BUS_ADDRESS=/dev/null
networks:
- sail
networks:
sail:
driver: bridge
volumes:
sail-pgsql:
driver: local
sail-redis:
driver: local