Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.8'
- services:
- php:
- container_name: php
- build:
- context: .
- dockerfile: php-dockerfile
- volumes:
- - './public:/var/www/html'
- - './php-logging.conf:/usr/local/etc/php-fpm.d/zz-log.conf'
- environment:
- PHP_USER_ID: ${PHP_USER_ID:-0} # Set PHP user ID for correct file ownership
- depends_on:
- - mariadb
- nginx:
- container_name: web
- build:
- context: .
- dockerfile: nginx-dockerfile # Ensure NGINX Dockerfile name is correct
- ports:
- - 8080:80
- volumes:
- - './public:/var/www/html'
- - './nginx-conf:/etc/nginx/conf.d'
- - './uploads:/var/www/html/uploads' # Ensure uploads directory is mounted
- environment:
- PHP_USER_ID: ${PHP_USER_ID:-0} # Same user ID as PHP container
- depends_on:
- - php
- mariadb:
- container_name: db
- image: mariadb:10.9
- environment:
- MYSQL_ROOT_PASSWORD: 1234password
- volumes:
- - './mysqldata:/var/lib/mysql'
- adminer:
- image: adminer
- restart: always
- ports:
- - 8088:8080
- # Volumes
- volumes:
- mysqldata:
Add Comment
Please, Sign In to add comment