-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
109 lines (103 loc) · 2.67 KB
/
Copy pathdocker-compose.yml
File metadata and controls
109 lines (103 loc) · 2.67 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
networks:
coopcredit-network:
driver: bridge
services:
# PostgreSQL Database service
postgres:
image: postgres:15-alpine
container_name: coopcredit-postgres-db
restart: unless-stopped
networks:
- coopcredit-network
env_file:
- .env
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "${DB_PORT}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}" ]
interval: 10s
timeout: 5s
retries: 5
# Risk Central Mock Service (EXTERNAL SERVICE)
risk-service:
container_name: risk-service
build:
context: ./risk-central-mock-service # <-- Points to project 2 folder
dockerfile: Dockerfile
ports:
- "8081:8081"
networks:
- coopcredit-network
# Credit Application Backend service (MAIN APPLICATION)
credit-service:
build:
context: ./credit-application-service
dockerfile: Dockerfile
container_name: credit-service
networks:
- coopcredit-network
depends_on:
postgres:
condition: service_healthy
ports:
- "8080:8080"
env_file:
- .env
environment:
SPRING_PROFILES_ACTIVE: docker
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
JWT_EXPIRATION: ${JWT_EXPIRATION}
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/${DB_NAME}
RISK_CENTRAL_URL: http://risk-service:8081
MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE: "*"
MANAGEMENT_ENDPOINT_PROMETHEUS_ENABLED: "true"
MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED: "true"
restart: unless-stopped
# Angular Frontend
# frontend:
# build:
# context: ./frontend
# dockerfile: Dockerfile
# args:
# VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:8080/api}
# container_name: coopcredit-frontend
# networks:
# - coopcredit-network
# ports:
# - "80:80"
# depends_on:
# - credit-service
# restart: unless-stopped
# Prometheus
prometheus:
image: prom/prometheus
container_name: coopcredit-prometheus
restart: unless-stopped
networks:
- coopcredit-network
volumes:
- ./credit-application-service/prometheus:/etc/prometheus
ports:
- "9090:9090"
# Grafana
grafana:
image: grafana/grafana
container_name: coopcredit-grafana
restart: unless-stopped
networks:
- coopcredit-network
ports:
- "3000:3000"
depends_on:
- prometheus
volumes:
postgres_data: