mirror of
https://github.com/jkaninda/laravel-php-fpm.git
synced 2026-11-13 16:47:15 +00:00
Upgrade images to PHP 8.5 and fix php-fpm not starting as root
This commit is contained in:
1 parent
033c6b213f
commit
23f0145f0e
23 files changed
+704
-526
No files matched your search
+43
-39
@@ -1,41 +1,45 @@
|
||||
version: '3'
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
container_name: mysql
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_DATABASE: php
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
MYSQL_PASSWORD: password
|
||||
MYSQL_USER: php
|
||||
ports:
|
||||
- 3306:3306
|
||||
php-fpm:
|
||||
image: jkaninda/laravel-php-fpm:latest
|
||||
container_name: php-fpm
|
||||
restart: unless-stopped
|
||||
#user: www-data #Use www-data user production usage
|
||||
depends_on:
|
||||
- mysql
|
||||
environment:
|
||||
DB_HOST: mysql
|
||||
DB_PORT: 3306
|
||||
DB_DATABASE: php
|
||||
DB_USERNAME: php
|
||||
DB_PASSWORD: password
|
||||
volumes:
|
||||
- ./laravel:/var/www/html
|
||||
#Nginx server
|
||||
nginx-server:
|
||||
image: jkaninda/nginx-fpm:stable
|
||||
container_name: nginx-server
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 80:80
|
||||
volumes:
|
||||
mysql:
|
||||
image: mysql:8.4
|
||||
container_name: mysql
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_DATABASE: php
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
MYSQL_PASSWORD: password
|
||||
MYSQL_USER: php
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-ppassword"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
php-fpm:
|
||||
image: ${IMAGE:-jkaninda/laravel-php-fpm:latest}
|
||||
container_name: php-fpm
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DB_CONNECTION: mysql
|
||||
DB_HOST: mysql
|
||||
DB_PORT: 3306
|
||||
DB_DATABASE: php
|
||||
DB_USERNAME: php
|
||||
DB_PASSWORD: password
|
||||
volumes:
|
||||
- ./laravel:/var/www/html
|
||||
environment:
|
||||
- DOCUMENT_ROOT=/var/www/html/public
|
||||
- CLIENT_MAX_BODY_SIZE=20M
|
||||
- PHP_FPM_HOST=php-fpm:9000
|
||||
nginx-server:
|
||||
image: jkaninda/nginx-fpm:stable
|
||||
container_name: nginx-server
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- php-fpm
|
||||
ports:
|
||||
- "${HTTP_PORT:-80}:80"
|
||||
volumes:
|
||||
- ./laravel:/var/www/html
|
||||
environment:
|
||||
- DOCUMENT_ROOT=/var/www/html/public
|
||||
- CLIENT_MAX_BODY_SIZE=20M
|
||||
- PHP_FPM_HOST=php-fpm:9000
|
||||
Reference in new issue
Block a user