File: /var/www/heifetz/heifetz-app/docker-compose.yml
services:
web:
image: nginx:alpine
build: docker/nginx
volumes:
- "./docker/nginx/files/default.conf:/etc/nginx/conf.d/default.conf:delegated"
- ".:/var/www/html:delegated"
ports:
- "80:80"
- "8080:8080"
restart: always
depends_on:
- php
php:
build: docker/php
restart: always
volumes:
- ".:/var/www/html:delegated"
ports:
- "9001:9000"
links:
- postgres
# - centrifugo
- redis
environment:
PHP_IDE_CONFIG: serverName=framework
XDEBUG_SESSION: docker-server
XDEBUG_MODE: ${XDEBUG_MODE}
XDEBUG_CONFIG: "client_host=${XDEBUG_CLIENT_HOST}"
postgres:
image: postgres:14.12
restart: always
env_file:
- .env
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
- "postgres_data:/var/lib/postgresql/data:delegated"
# centrifugo:
# image: centrifugo/centrifugo
# environment:
# - CENTRIFUGO_ADMIN_PASSWORD=${CENTRIFUGO_ADMIN_PASSWORD}
# - CENTRIFUGO_ADMIN_SECRET=${CENTRIFUGO_ADMIN_SECRET}
# volumes:
# - "./docker/centrifugo:/centrifugo"
# command: centrifugo -c config.json --admin
# ports:
# - "8000:8000"
redis:
image: redis:6.0.10-alpine
command:
- 'redis-server'
- '--loglevel warning'
- '--databases 2'
- '--maxmemory 50mb'
- '--maxmemory-policy noeviction'
volumes:
- "redis_data:/data"
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- "6379:6379"
volumes:
postgres_data:
redis_data: