forked from api-platform/api-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod-build.yml
More file actions
58 lines (52 loc) · 1.7 KB
/
Copy pathdocker-compose.prod-build.yml
File metadata and controls
58 lines (52 loc) · 1.7 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
version: '3.4'
x-cache-from:
- &api-cache-from
cache_from:
- ${NGINX_IMAGE:?NGINX_IMAGE is not set or empty}
- ${PHP_IMAGE:?PHP_IMAGE is not set or empty}
- ${VARNISH_IMAGE:?VARNISH_IMAGE is not set or empty}
services:
php:
build:
context: ./api
target: api_platform_php
<<: *api-cache-from
image: ${PHP_IMAGE:?PHP_IMAGE is not set or empty}
api:
build:
context: ./api
target: api_platform_nginx
<<: *api-cache-from
image: ${NGINX_IMAGE:?NGINX_IMAGE is not set or empty}
depends_on:
- php
cache-proxy:
build:
context: ./api
target: api_platform_varnish
<<: *api-cache-from
image: ${VARNISH_IMAGE:?VARNISH_IMAGE is not set or empty}
depends_on:
- api
client:
# in production, we may want to use a static website hosting service
# https://facebook.github.io/create-react-app/docs/deployment
build:
context: ./client
target: api_platform_client_nginx
args:
- REACT_APP_API_ENTRYPOINT=${REACT_APP_API_ENTRYPOINT:?REACT_APP_API_ENTRYPOINT is not set or empty}
cache_from:
- ${CLIENT_IMAGE:?CLIENT_IMAGE is not set or empty}
image: ${CLIENT_IMAGE:?CLIENT_IMAGE is not set or empty}
admin:
# in production, we may want to use a static website hosting service
# https://facebook.github.io/create-react-app/docs/deployment
build:
context: ./admin
target: api_platform_admin_nginx
args:
- REACT_APP_API_ENTRYPOINT=${REACT_APP_API_ENTRYPOINT:?REACT_APP_API_ENTRYPOINT is not set or empty}
cache_from:
- ${ADMIN_IMAGE:?ADMIN_IMAGE is not set or empty}
image: ${ADMIN_IMAGE:?ADMIN_IMAGE is not set or empty}