forked from coi-gov-pl/pomocua-ogloszenia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
142 lines (140 loc) · 3.37 KB
/
docker-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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
services:
ads-postgres:
profiles:
- db-only
- app-db-only
- all
environment:
- POSTGRES_APPLICATION_DATABASE
- POSTGRES_APPLICATION_USER
- POSTGRES_APPLICATION_USER_PASSWORD
- KEYCLOAK_DATABASE
- KEYCLOAK_DB_USER
- KEYCLOAK_DB_PASSWORD
- POSTGRES_PASSWORD
- POSTGRES_USER
- POSTGRES_HOST_AUTH_METHOD
container_name: ads-postgres
image: postgres:13.5-alpine
ports:
- mode: ingress
target: 5432
published: 5432
protocol: tcp
restart: always
volumes:
- type: volume
source: postgres
target: /var/lib/postgresql/data
- type: bind
source: ./docker/volumes/postgres-init
target: /docker-entrypoint-initdb.d
db-admin-pgadmin:
profiles:
- db-only
- app-db-only
- all
environment:
- PGADMIN_DEFAULT_EMAIL
- PGADMIN_DEFAULT_PASSWORD
container_name: ads-pgadmin
depends_on:
ads-postgres:
condition: service_started
image: dpage/pgadmin4:latest
ports:
- mode: ingress
target: 80
published: 8081
protocol: tcp
volumes:
- type: volume
source: pgadmin
target: /var/lib/pgadmin
- type: bind
source: ./docker/servers.json
target: /pgadmin4/servers.json
- type: bind
source: ./docker/pgpasswords
target: /pgpasswords
ads:
profiles:
- all
- app-db-only
environment:
- SPRING_DATASOURCE_URL
- SPRING_PROFILES_ACTIVE
- POSTGRES_APPLICATION_USER
- POSTGRES_APPLICATION_USER_PASSWORD
- MAIL_HOST
depends_on:
ads-postgres:
condition: service_started
container_name: ads
image: openjdk:17-jdk-bullseye
command: ["java", "-jar", "/build/libs/ogloszenia-0.0.1-SNAPSHOT.jar"]
ports:
- mode: ingress
target: 8080
published: 8080
protocol: tcp
volumes:
- type: bind
source: ./build
target: /build
proxy:
profiles:
- all
build:
context: ./docker/proxy/
container_name: proxy
#TODO: you can link to gui dist folder to have FE
#volumes:
# - ../gui-web-???/dist/gui-???:/usr/share/nginx/html
ports:
- 80:80
- 443:443
depends_on:
- ads
- iam
restart: unless-stopped
iam:
profiles:
- all
image: pomocua-iam
build:
context: ./docker/iam
container_name: iam
environment:
- IAM_HOSTNAME
- DB_VENDOR=${KEYCLOAK_DB_VENDOR:-POSTGRES}
- DB_ADDR=${KEYCLOAK_DB_ADDR:-ads-postgres}
- DB_PORT=${KEYCLOAK_DB_PORT:-5432}
- DB_DATABASE=${KEYCLOAK_DATABASE:-iam}
- DB_USER=${KEYCLOAK_DB_USER:-iam}
- DB_SCHEMA=${KEYCLOAK_DB_SCHEMA:-public}
- DB_PASSWORD=${KEYCLOAK_DB_PASSWORD:-admin}
- KEYCLOAK_USER=${KEYCLOAK_USER:-admin}
- KEYCLOAK_PASSWORD=${KEYCLOAK_PASSWORD:-admin}
- KEYCLOAK_LOGLEVEL=${KEYCLOAK_LOGLEVEL:-INFO}
- ROOT_LOGLEVEL=${KEYCLOAK_LOGLEVEL:-INFO}
- REINIT_KEYCLOAK=${REINIT_KEYCLOAK:-0}
- EXPORT_KEYCLOAK=${EXPORT_KEYCLOAK:-0}
depends_on:
ads-postgres:
condition: service_started
restart: unless-stopped
mailhog:
profiles:
- all
- mail-only
image: mailhog/mailhog:v1.0.1
logging:
driver: 'none'
ports:
- 1025:1025
- 8025:8025
restart: unless-stopped
volumes:
pgadmin: {}
postgres: {}