-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
49 lines (47 loc) · 1.33 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
44
45
46
47
version: '3.4'
services:
php:
build:
context: ./
# for production target must be php_final
target: php_final_for_dev_team
# Comment out these volumes in production
volumes:
- ./:/srv/app
working_dir: /srv/app
env_file:
- .env.docker
nginx:
build:
context: ./
target: nginx_final
volumes:
- ./:/srv/app
- ./docker/nginx/conf.d/symfony-development.conf.template:/etc/nginx/conf.d/symfony-development.conf.template:ro
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
working_dir: /srv/app
environment:
PHP_UPSTREAM_HOST: php
DOLLAR: "$$"
ports:
- "10012:80"
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/symfony-development.conf.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
db:
image: postgres:12
restart: always
env_file:
- ./.env.docker
volumes:
#- "./.data/postgres:/var/lib/postgresql/data"
- "./docker/postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d"
- "./docker/postgres/postgres-healthcheck.sh:/usr/local/bin/postgres-healthcheck.sh"
healthcheck:
test: ["CMD", "postgres-healthcheck.sh"]
interval: 1m
timeout: 10s
retries: 3
start_period: 5s
ports:
- 5432:5432
volumes:
db-data: {}