-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
126 lines (117 loc) · 3.01 KB
/
docker-compose.yml
File metadata and controls
126 lines (117 loc) · 3.01 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
version: '3.4'
x-cache-from:
- &api-cache-from
cache_from:
- ${NGINX_IMAGE:-quay.io/api-platform/nginx}
- ${PHP_IMAGE:-quay.io/api-platform/php}
services:
php:
build:
context: ./api
target: api_platform_php
<<: *api-cache-from
image: ${PHP_IMAGE:-quay.io/api-platform/php}
healthcheck:
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
depends_on:
- db
- dev-tls
volumes:
- /tmp:/tmp
- ./api:/srv/api:rw,cached
- ./api/docker/php/conf.d/api-platform.dev.ini:/usr/local/etc/php/conf.d/api-platform.ini
# if you develop on Linux, you may use a bind-mounted host directory instead
# - ./api/var:/srv/api/var:rw
- dev-certs:/certs:ro,nocopy
api:
build:
context: ./api
target: api_platform_nginx
<<: *api-cache-from
image: ${NGINX_IMAGE:-quay.io/api-platform/nginx}
depends_on:
- php
volumes:
- ./api/public:/srv/api/public:ro
vulcain:
image: dunglas/vulcain
environment:
- CERT_FILE=/certs/localhost.crt
- KEY_FILE=/certs/localhost.key
- UPSTREAM=http://api
depends_on:
- api
- dev-tls
volumes:
- dev-certs:/certs:ro,nocopy
ports:
- target: 443
published: 8443
protocol: tcp
db:
image: mysql:5.7
command: mysqld --default-authentication-plugin=mysql_native_password
volumes:
- db-data:/var/lib/mysql
- ./api/docker/db:/docker-entrypoint-initdb.d/
environment:
MYSQL_USER: api-platform
MYSQL_ROOT_PASSWORD: api-platform
MYSQL_PASSWORD: api-platform
MYSQL_DATABASE: yotime
ports:
- target: 3306
published: 3308
protocol: tcp
mercure:
image: dunglas/mercure
environment:
- ALLOW_ANONYMOUS=1
- CERT_FILE=/certs/localhost.crt
- CORS_ALLOWED_ORIGINS=*
- DEMO=1
- JWT_KEY=!ChangeMe!
- KEY_FILE=/certs/localhost.key
- PUBLISH_ALLOWED_ORIGINS=https://localhost:1337 # required for publishing from the demo page
depends_on:
- dev-tls
volumes:
- dev-certs:/certs:ro,nocopy
ports:
- target: 443
published: 1337
protocol: tcp
# client:
# build:
# context: ./auto-client
# target: api_platform_client_development
# cache_from:
# - ${CLIENT_IMAGE:-quay.io/api-platform/auto}
# image: ${CLIENT_IMAGE:-quay.io/api-platform/client}
# tty: true # https://github.com/facebook/create-react-app/issues/8688
# environment:
# - API_PLATFORM_CLIENT_GENERATOR_ENTRYPOINT=http://api
# depends_on:
# - dev-tls
# volumes:
# - ./auto-client:/usr/src/client:rw,cached
# - dev-certs:/usr/src/client/certs:rw,nocopy
# ports:
# - target: 3000
# published: 443
# protocol: tcp
dev-tls:
build:
context: ./docker/dev-tls
volumes:
- dev-certs:/certs:rw
ports:
- target: 80
published: 80
protocol: tcp
volumes:
db-data: {}
dev-certs: {}