1+ services :
2+ nginx :
3+ image : " laravel-docker:nginx"
4+ depends_on :
5+ - php
6+ volumes :
7+ - " ./nginx/app.conf:/etc/nginx/conf.d/default.conf"
8+ ports :
9+ - " 80:80"
10+ php :
11+ image : " laravel-docker:php"
12+ depends_on :
13+ - postgres
14+ - redis
15+ - minio
16+ environment :
17+ APP_NAME : " Laravel Docker"
18+ APP_ENV : " production"
19+ APP_KEY : " base64:Avm4zs1yLfogxHpwBZRZhKZJ0EC6/7IX0FcVSyQQlLU="
20+ APP_DEBUG : " false"
21+ APP_URL : " http://localhost"
22+ LOG_CHANNEL : " stderr"
23+ # Postgres configuration
24+ DB_CONNECTION : " pgsql"
25+ DB_HOST : " postgres"
26+ DB_DATABASE : " laravel-app"
27+ DB_USERNAME : " laravel"
28+ DB_PASSWORD : " password"
29+ # Redis configuration
30+ REDIS_HOST : " redis"
31+ REDIS_PORT : " 6379"
32+ BROADCAST_DRIVER : " redis"
33+ CACHE_DRIVER : " redis"
34+ QUEUE_CONNECTION : " redis"
35+ SESSION_DRIVER : " redis"
36+ # Minio configuration
37+ FILESYSTEM_DISK : " s3"
38+ AWS_ACCESS_KEY_ID : " laravel"
39+ AWS_SECRET_ACCESS_KEY : " password"
40+ AWS_DEFAULT_REGION : " us-east-1"
41+ AWS_BUCKET : " local"
42+ AWS_URL : " http://localhost:9000"
43+ AWS_ENDPOINT : " http://minio:9000"
44+ AWS_USE_PATH_STYLE_ENDPOINT : " true"
45+ postgres :
46+ image : " postgres:15"
47+ environment :
48+ PGPASSWORD : " password"
49+ POSTGRES_DB : " laravel-app"
50+ POSTGRES_USER : " laravel"
51+ POSTGRES_PASSWORD : " password"
52+ volumes :
53+ - " postgres-data:/var/lib/postgresql/data"
54+ healthcheck :
55+ test : [ "CMD", "pg_isready", "-q", "-d", "laravel-app", "-U", "laravel" ]
56+ retries : 3
57+ timeout : 5s
58+ redis :
59+ image : " redis:alpine"
60+ volumes :
61+ - " redis-data:/data"
62+ healthcheck :
63+ test : [ "CMD", "redis-cli", "ping" ]
64+ retries : 3
65+ timeout : 5s
66+ minio :
67+ image : " minio/minio:latest"
68+ environment :
69+ MINIO_ROOT_USER : " laravel"
70+ MINIO_ROOT_PASSWORD : " password"
71+ ports :
72+ - " 9000:9000"
73+ - " 8900:8900"
74+ volumes :
75+ - " minio-data:/data/minio"
76+ command : " minio server /data/minio --console-address ':8900'"
77+ healthcheck :
78+ test : [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
79+ retries : 3
80+ timeout : 5s
81+ volumes :
82+ postgres-data : { }
83+ redis-data : { }
84+ minio-data : { }
0 commit comments