You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

54 lines
1.5 KiB

version: "3"
services:
mysql:
image: mysql:5.7
restart: on-failure
environment:
MYSQL_USER: ${MYSQL_USER}
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${COMPOSE_PROJECT_NAME}
ports:
- "3$PROJECT_ID:3306"
redis:
image: redis:6.0.10-alpine
volumes:
- ./devops/docker/redis/redis.conf:/redis.conf
command: [ "redis-server", "/redis.conf" ]
ports:
- "6$PROJECT_ID:6379"
php:
build:
context: devops/docker/php
args:
HOME: "$HOME"
USER: "$USER"
UID: "$UID"
GID: "$GID"
restart: unless-stopped
depends_on:
- mysql
- redis
environment:
- COMPOSER_MEMORY_LIMIT=-1
- PHP_IDE_CONFIG=serverName=${COMPOSE_PROJECT_NAME}
- PROJECT_PORT="8$PROJECT_ID"
volumes:
- ./:/var/www/localhost/htdocs/current
- ${HOME}/.composer:${HOME}/.composer
- ${HOME}/.ssh:${HOME}/.ssh
expose:
- "9000"
nginx:
image: nginx:1.19
restart: unless-stopped
depends_on:
- php
volumes:
- ./:/var/www/localhost/htdocs/current
- ./devops/docker/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
ports:
- "8$PROJECT_ID:80"