loom-spinner-cli/config/docker-compose.yml

38 lines
884 B
YAML
Raw Normal View History

version: "3.9"
services:
nginx:
build:
context: ./nginx
ports:
- ${NGINX_PORT}:80
volumes:
- ${PROJECT_DIRECTORY}:/var/www/html:cached
- ./nginx/conf.d:/etc/nginx/conf.d
php:
build:
context: ./php-fpm
working_dir: /var/www/html
extra_hosts:
- host.docker.internal:host-gateway
volumes:
- ${PROJECT_DIRECTORY}:/var/www/html:cached
ports:
- ${PHP_PORT}:9003
database:
image: mysql:8.0
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
ports:
- ${MYSQL_PORT}:3306
expose:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: docker
volumes:
- ./data/${PROJECT_NAME}/mysql:/var/lib/mysql:cached
cache:
image: redis:latest
ports:
- ${REDIS_PORT}:6379
volumes:
- ./data/${PROJECT_NAME}/redis:/data:cached