This repository has been archived by the owner on Oct 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
/
docker-compose.yaml
85 lines (78 loc) · 2.43 KB
/
docker-compose.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '3'
services:
php:
build:
context: ./symfony
container_name: php
depends_on:
- postgres
env_file:
- ./symfony/.env
# Comment out these volumes in production
volumes:
- ./symfony:/srv/symfony:rw,cached
# If you develop on Linux, comment out the following volumes to just use bind-mounted project directory from host
environment:
# If you develop on Windows change this to remote_host=docker.for.win.localhost
# If you develop on Linux change this to remote_host=172.17.0.1
XDEBUG_CONFIG: "remote_host=docker.for.mac.localhost idekey=IDE_XDEBUG"
BLACKFIRE_CLIENT_ID: ${BLACKFIRE_CLIENT_ID}
BLACKFIRE_CLIENT_TOKEN: ${BLACKFIRE_CLIENT_TOKEN}
symfony:
build:
context: ./symfony
dockerfile: Dockerfile.nginx
container_name: symfony
depends_on:
- php
ports:
- "8080:80"
volumes:
- ./symfony/public:/srv/symfony/public:ro
postgres:
# In production, you may want to use a managed database service
image: postgres:alpine
container_name: postgres
environment:
- POSTGRES_DB=symfony
- POSTGRES_USER=symfony
- POSTGRES_PASSWORD=symfony
- PGDATA=/var/lib/postgresql/data/db-files/
volumes:
- db-data:/var/lib/postgresql/data:rw
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/var/lib/postgresql/data:rw
ports:
- "5432:5432"
adminer:
image: adminer
container_name: adminer
depends_on:
- postgres
restart: always
ports:
- 2000:8080
blackfire:
image: blackfire/blackfire
container_name: blackfire
depends_on:
- php
environment:
BLACKFIRE_SERVER_ID: ${BLACKFIRE_SERVER_ID}
BLACKFIRE_SERVER_TOKEN: ${BLACKFIRE_SERVER_TOKEN}
BLACKFIRE_LOG_LEVEL: 4
ports:
- "8707:8707"
h2-proxy:
# Don't use this proxy in prod
build:
context: ./h2-proxy
dockerfile: ./Dockerfile
container_name: h2-proxy
depends_on:
- symfony
ports:
- "80:80"
- "443:443"
volumes:
db-data: {}