b2in/.devcontainer/docker-compose.dev.yml
2026-05-07 13:03:01 +00:00

131 lines
3.1 KiB
YAML

services:
laravel.test:
build:
context: '../vendor/laravel/sail/runtimes/8.4'
dockerfile: Dockerfile
args:
# Führen Sie in Ihrem normalen Terminal `id -u` aus und tragen Sie die Zahl hier ein.
WWWUSER: '501'
# Führen Sie in Ihrem normalen Terminal `id -g` aus und tragen Sie die Zahl hier ein.
WWWGROUP: '20'
image: 'sail-8.4/app'
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- '5174:5174'
- '5175:5175'
environment:
# Laravel Sail Environment Variables
WWWUSER: '501'
WWWGROUP: '20'
LARAVEL_SAIL: 1
XDEBUG_MODE: 'develop,debug'
XDEBUG_CONFIG: 'client_host=host.docker.internal'
IGNITION_LOCAL_SITES_PATH: '/var/www/html'
# Database Configuration
DB_CONNECTION: mysql
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: b2in
DB_USERNAME: sail
DB_PASSWORD: password
# Application Configuration
APP_NAME: B2in
APP_ENV: local
APP_DEBUG: true
APP_URL: http://localhost
# Mail Configuration
MAIL_MAILER: smtp
MAIL_HOST: mailpit
MAIL_PORT: 1025
MAIL_USERNAME: null
MAIL_PASSWORD: null
MAIL_ENCRYPTION: null
MAIL_FROM_ADDRESS: hello@example.com
MAIL_FROM_NAME: B2in
# Redis Configuration
REDIS_HOST: redis
REDIS_PASSWORD: null
REDIS_PORT: 6379
# Vite Configuration
VITE_PORT: 5174
VITE_WEB_PORT: 5175
# Forward Ports
FORWARD_VITE_PORT: 5174
FORWARD_VITE_WEB_PORT: 5175
FORWARD_DB_PORT: 33067
FORWARD_REDIS_PORT: 6381
FORWARD_MAILPIT_PORT: 1026
FORWARD_MAILPIT_DASHBOARD_PORT: 8026
# MySQL Extra Options
MYSQL_EXTRA_OPTIONS: --default-authentication-plugin=mysql_native_password
volumes:
- '../:/var/www/html'
- './php-upload-limits.ini:/etc/php/8.4/cli/conf.d/99-upload-limits.ini:ro'
networks:
- sail
depends_on:
- mysql
- redis
- mailpit
mysql:
image: 'mysql/mysql-server:8.0'
ports:
- '33067:3306'
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_ROOT_HOST: '%'
MYSQL_DATABASE: b2in
MYSQL_USER: sail
MYSQL_PASSWORD: password
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_EXTRA_OPTIONS: --default-authentication-plugin=mysql_native_password
volumes:
- 'sail-mysql:/var/lib/mysql'
- '../docker/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
networks:
- sail
healthcheck:
test:
- CMD
- mysqladmin
- ping
- '-ppassword'
retries: 3
timeout: 5s
redis:
image: 'redis:alpine'
ports:
- '6380:6379'
volumes:
- 'sail-redis:/data'
networks:
- sail
healthcheck:
test:
- CMD
- redis-cli
- ping
retries: 3
timeout: 5s
mailpit:
image: 'axllent/mailpit:latest'
ports:
- '1025:1025'
- '8025:8025'
networks:
- sail
networks:
sail:
driver: bridge
volumes:
sail-mysql:
driver: local
sail-redis:
driver: local