-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
43 lines (41 loc) · 1.27 KB
/
docker-compose.yml
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
version: '3.8'
services:
php:
container_name: php
build:
context: .docker/php
networks:
- web-app-bridge
- proxy
volumes:
- ./:/var/www/symfony_docker
- ./.docker/php/conf.d/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- ./.docker/php/conf.d/error_reporting.ini:/usr/local/etc/php/conf.d/error_reporting.ini
- ./.docker/php/conf.d/docker-php-config.ini:/usr/local/etc/php/conf.d/docker-php-config.ini
nginx:
container_name: nginx
image: nginx:stable-alpine
networks:
- web-app-bridge
- proxy
environment:
- NGINX_HOST=${NGINX_HOST}
- NGINX_PORT=${NGINX_PORT}
volumes:
- ./:/var/www/symfony_docker
- ./.docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
labels:
- "traefik.enable=true"
- "traefik.http.routers.app_symfony.rule=HostRegexp(`$NGINX_HOST`)"
- "traefik.http.routers.app_symfony.entrypoints=websecure"
- "traefik.http.routers.app_symfony.tls=true"
- "traefik.http.routers.app_symfony.tls.certresolver=cloudflare"
- "traefik.http.routers.app_symfony.tls.domains[0].main=$NGINX_HOST"
networks:
web-app-bridge:
driver: bridge
proxy:
external:
name: "traefik_proxy"