build(docker): optimize image size and security
- add mysql client binaries for database operations - reduce php extensions to production essentials - bind mysql and phpmyadmin to localhost only - replace php-fpm.conf with php.ini for upload limits
This commit is contained in:
@@ -26,11 +26,10 @@ services:
|
||||
volumes:
|
||||
- ./:/var/www
|
||||
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
ports:
|
||||
- "${DB_PORT:-3306}:3306"
|
||||
- "127.0.0.1:${DB_PORT:-3306}:3306"
|
||||
environment:
|
||||
- MYSQL_DATABASE=${DB_DATABASE}
|
||||
- MYSQL_USER=${DB_USERNAME}
|
||||
@@ -44,9 +43,11 @@ services:
|
||||
image: phpmyadmin:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "127.0.0.1:8080:80"
|
||||
environment:
|
||||
- PMA_HOST=mysql
|
||||
- PMA_USER=root
|
||||
- PMA_PASSWORD=${DB_ROOT_PASSWORD}
|
||||
- PMA_PORT=${DB_PORT:-3306}
|
||||
- UPLOAD_LIMIT=100M
|
||||
depends_on:
|
||||
|
||||
Reference in New Issue
Block a user