-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
57 lines (51 loc) · 1.46 KB
/
docker-compose.yaml
File metadata and controls
57 lines (51 loc) · 1.46 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
version: '3.7'
services:
api_php:
env_file: ./api/.env
image: ${CONTAINER_REGISTRY_BASE}/api_php
networks: [ api, database ]
build:
context: ./api
target: api_php
cache_from:
- ${CONTAINER_REGISTRY_BASE}/api_php
- ${CONTAINER_REGISTRY_BASE}/api_nginx
depends_on:
- database
api_nginx:
image: ${CONTAINER_REGISTRY_BASE}/api_nginx
ports: [ '${API_PORT}:80' ]
networks: [ api, front ]
build:
context: ./api
target: api_nginx
cache_from:
- ${CONTAINER_REGISTRY_BASE}/api_php
- ${CONTAINER_REGISTRY_BASE}/api_nginx
depends_on:
- api_php
database:
image: postgres:11-alpine
volumes: [ 'database-data:/var/lib/postgresql/data' ]
networks: [ database ]
environment:
- POSTGRES_DB=pwapoc
- POSTGRES_USER=pwapoc
- POSTGRES_PASSWORD=pwapoc
app:
env_file: ./app/.env
image: ${CONTAINER_REGISTRY_BASE}/app
ports: [ '${APP_PORT}:3001' ]
networks: [ api, front ]
build:
context: ./app
args:
- REACT_APP_API_ENTRYPOINT=${REACT_APP_API_ENTRYPOINT}
cache_from:
- ${CONTAINER_REGISTRY_BASE}/app
volumes:
database-data: ~
networks:
api: ~
database: ~
front: ~