-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.fpm-nginx.yml
More file actions
40 lines (37 loc) · 989 Bytes
/
docker-compose.fpm-nginx.yml
File metadata and controls
40 lines (37 loc) · 989 Bytes
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
version: '2'
services:
nginx:
build:
dockerfile: Dockerfile-${DOCKERFILE_FLAVOUR}
context: 'nginx'
args:
- NGINX_BASE_IMAGE_VERSION=${NGINX_BASE_IMAGE_VERSION}
image: ${NGINX_IMAGE_NAME}:${NGINX_BASE_IMAGE_VERSION}${NGINX_IMAGE_VERSION_SUFFIX}
depends_on:
- php
environment:
- FASTCGI_PASS_HOST=php
- FASTCGI_PASS_PORT=9000
- WEB_HOST_NAME
ports:
- "80:80"
- "443:443"
volumes:
# Application volume
- ./_host-volumes/app/web:/app/web:delegated
# logs volume
- ./_host-volumes/app/runtime:/app/runtime:delegated
command: >
/bin/bash -c "
envsubst '$$FASTCGI_PASS_HOST, $$FASTCGI_PASS_PORT, $$WEB_HOST_NAME' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf
&& nginx -g 'daemon off;'"
networks:
appnet:
aliases:
- ${WEB_HOST_NAME}
php:
networks:
- appnet
networks:
appnet:
external: true