83 lines
1.6 KiB
YAML
83 lines
1.6 KiB
YAML
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
|
|
- "${DB_IMPORTE_FILE}:/docker-entrypoint-initdb.d/reha.sql"
|
|
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}
|
|
- "${PROJECT_ROOT}:/var/www/reha"
|
|
- "${LOG_ROOT}/php:/var/log:rw"
|
|
- "${XDEBUG_INI}:/usr/local/etc/php/conf.d/xdebug.ini"
|
|
working_dir: "/var/www/reha/"
|
|
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:
|
|
- "${PROJECT_ROOT}:/var/www/reha"
|
|
- "${LOG_ROOT}:/var/log:rw"
|
|
networks:
|
|
- server
|
|
depends_on:
|
|
- php
|
|
|
|
volumes:
|
|
db-data:
|
|
redis-data:
|
|
php-user-data:
|
|
|
|
networks:
|
|
database:
|
|
redis:
|
|
server:
|