docker-erable/docker-compose.yml

83 lines
1.6 KiB
YAML
Raw Permalink Normal View History

2023-11-19 11:36:05 +01:00
version: "3.5"
services:
mysql:
image: mariadb:latest
volumes:
- db-data:/var/lib/mysql
- ./Docker/mysql/mysql.cnf:/etc/mysql/conf.d/custom.cnf:ro
2023-11-19 12:07:28 +01:00
- "${DB_IMPORTE_FILE}:/docker-entrypoint-initdb.d/erable.sql"
2023-11-19 11:36:05 +01:00
networks:
- database
environment:
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
MYSQL_DATABASE: "${DB_NAME}"
MYSQL_USER: "${DB_USERNAME}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
redis:
image: redis:6
volumes:
- redis-data:/data
networks:
- redis
ports:
- "6379"
php:
build: ./Docker/php-8.1-fpm/
user: ${USER_UID}:${USER_GID}
volumes:
- php-user-data:/home/${USER_UNAME}
2023-11-19 12:07:28 +01:00
- "${PROJECT_ROOT}:/var/www/erable"
2023-11-19 11:36:05 +01:00
- "${LOG_ROOT}/php:/var/log:rw"
- "${XDEBUG_INI}:/usr/local/etc/php/conf.d/xdebug.ini"
2023-11-19 12:07:28 +01:00
working_dir: "/var/www/erable/"
2023-11-19 11:36:05 +01:00
networks:
- database
- redis
- server
# for xdebug
# https://github.com/docker/for-linux/issues/264#issuecomment-965465879
extra_hosts:
- host.docker.internal:host-gateway
depends_on:
- mysql
- redis
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- 8981:80
networks:
- database
depends_on:
- mysql
environment:
PMA_HOSTS: mysql
nginx:
build: ./Docker/nginx/
ports:
- 8980:80
working_dir: "/var/www"
volumes:
2023-11-19 12:07:28 +01:00
- "${PROJECT_ROOT}:/var/www/erable"
2023-11-19 11:36:05 +01:00
- "${LOG_ROOT}:/var/log:rw"
networks:
- server
depends_on:
- php
volumes:
db-data:
redis-data:
php-user-data:
networks:
database:
redis:
server: