-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-dev.yaml
45 lines (45 loc) · 1.84 KB
/
docker-compose-dev.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
version: '3.7'
services:
postgres:
env_file: [./app/.env, .env]
image: postgres:14
restart: unless-stopped
volumes:
- ./data/pgsql_data:/data
- ./data/pgsql_backup:/backup
environment:
PGDATA: "/data"
phpfpm:
build:
context: .
dockerfile: ./etc/docker/php-fpm-dev/Dockerfile
depends_on: [postgres]
env_file: [./app/.env, .env]
user: "${UID}:${GID}"
working_dir: /var/www/html
environment:
PHP_IDE_CONFIG: ${PHP_IDE_CONFIG:-serverName=docker}
XDEBUG_CONFIG: "client_host=host.docker.internal client_port=9000 log=/tmp/xdebug/xdebug.log output_dir=/tmp/xdebug start_with_request=trigger"
XDEBUG_MODE: "${XDEBUG_MODE:-debug,profile}"
# XDEBUG_TRIGGER: 1
extra_hosts:
- host.docker.internal:${HOST_IP:-172.17.0.1}
volumes:
- ./app:/var/www/html:ro
- ./data/xdebug:/tmp/xdebug
- ./etc/dev/php/conf.d/opcache.ini:/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini:ro
- ./etc/dev/php/conf.d/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini:ro
- ./etc/php/php.ini:/usr/local/etc/php/php.ini:ro
nginx:
depends_on: [phpfpm]
env_file: [.env]
image: nginx:1.23
ports: ["${HTTP_PORT:-8080}:80"]
volumes:
- ./data/logs/nginx:/var/log/nginx
- ./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
# Docker default image spawn worker processes with UID 101 (nginx)
# which means that it cannot read bind mounted volume. Root user is
# restored from within the nginx.conf file.
- ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./html:/usr/share/nginx/html:ro