-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
117 lines (112 loc) · 4.11 KB
/
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
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
services:
database:
build:
context: "."
dockerfile: ./database/Dockerfile
tags:
- benjaminpochat/viandeendirect-database:latest
- benjaminpochat/viandeendirect-database:${DOCKER_IMAGE_TAG}
image: benjaminpochat/viandeendirect-database:${DOCKER_IMAGE_TAG}
volumes:
- ${postgres_datafile_path:-./data}:/var/lib/postgresql/data/pgdata
healthcheck:
test: ["CMD-SHELL", "pg_isready -U viandeendirect"]
interval: 5s
timeout: 5s
retries: 5
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${postgres_password:-p4ssw0rd}
- VIANDEENDIRECT_PASSWORD=${backend_database_password:-vndndrct-db-p4ssw0rd}
- IDENTITY_PASSWORD=${identity_database_password:-dntt-db-p4ssw0rd}
- PGDATA=/var/lib/postgresql/data/pgdata
ports:
- ${postgres_port:-5432}:5432
network_mode: "host"
identity:
build:
context: "."
dockerfile: ./identity/Dockerfile
tags:
- benjaminpochat/viandeendirect-identity:latest
- benjaminpochat/viandeendirect-database:${DOCKER_IMAGE_TAG}
image: benjaminpochat/viandeendirect-identity:${DOCKER_IMAGE_TAG}
depends_on:
database:
condition: service_healthy
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=${keycloak_admin_password:-admin}
- KC_DB=postgres
- KC_DB_URL=jdbc:postgresql://database:5432/identity
- KC_DB_USERNAME=identity
- KC_DB_PASSWORD=${identity_database_password:-dntt-db-p4ssw0rd}
- KC_HOSTNAME_URL=${identity_url:-http://localhost:8180}
- KC_HOSTNAME_ADMIN_URL=${identity_url:-http://localhost:8180}
- KC_HEALTH_ENABLED=true
- KC_PROXY=edge
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:8080/health || exit 1" ]
interval: 5s
timeout: 60s
retries: 5
command: start-dev
ports:
- ${identity_port:-8180}:8080
network_mode: "host"
backend:
build:
context: "."
dockerfile: ./backend/Dockerfile
tags:
- benjaminpochat/viandeendirect-backend:latest
- benjaminpochat/viandeendirect-database:${DOCKER_IMAGE_TAG}
image: benjaminpochat/viandeendirect-backend:${DOCKER_IMAGE_TAG}
environment:
- SERVER_PORT=8080
- SPRING_DATASOURCE_URL=jdbc:postgresql://database:5432/viandeendirect
- SPRING_DATASOURCE_USERNAME=viandeendirect
- SPRING_DATASOURCE_PASSWORD=${backend_database_password:-vndndrct-db-p4ssw0rd}
- SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_KEYCLOAK_ISSUER_URI=${identity_url:-http://localhost:8180}/realms/viandeendirect
- SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI=${identity_url:-http://localhost:8180}/realms/viandeendirect
- SPRING_PROFILES_ACTIVE=oauth,postgre
depends_on:
database:
condition: service_healthy
identity:
condition: service_healthy
ports:
- ${backend_port:-8080}:8080
network_mode: "host"
frontend-producer:
build:
context: "."
dockerfile: ./frontend/Dockerfile
tags:
- benjaminpochat/viandeendirect-frontend-producer:latest
- benjaminpochat/viandeendirect-database:${DOCKER_IMAGE_TAG}
args:
REACT_APP_MODE: PRODUCER
REACT_APP_VERSION: ${DOCKER_IMAGE_TAG}
image: benjaminpochat/viandeendirect-frontend-producer:${DOCKER_IMAGE_TAG}
volumes:
- ${frontend_producer_config_path:-./frontend-producer-config}:/usr/local/apache2/htdocs/config
ports:
- ${frontend_producer_port:-81}:80
network_mode: "host"
frontend-customer:
build:
context: "."
dockerfile: ./frontend/Dockerfile
tags:
- benjaminpochat/viandeendirect-frontend-customer:latest
- benjaminpochat/viandeendirect-database:${DOCKER_IMAGE_TAG}
args:
REACT_APP_MODE: CUSTOMER
REACT_APP_VERSION: ${DOCKER_IMAGE_TAG}
image: benjaminpochat/viandeendirect-frontend-customer:${DOCKER_IMAGE_TAG}
volumes:
- ${frontend_customer_config_path:-./frontend-customer-config}:/usr/local/apache2/htdocs/config
ports:
- ${frontend_customer_port:-80}:80
network_mode: "host"