-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
77 lines (72 loc) · 2.16 KB
/
Copy pathcompose.yaml
File metadata and controls
77 lines (72 loc) · 2.16 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
services:
rabbitmq:
image: rabbitmq:3.11-management
container_name: rabbitmq
ports:
- "5672:5672" # AMQP
- "15672:15672" # Management UI
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
healthcheck:
test: [ "CMD", "rabbitmqctl", "status" ]
interval: 10s
timeout: 5s
retries: 10
wiremock:
image: wiremock/wiremock:2.35.0
container_name: wiremock
ports:
- "8089:8080" # host:container -> admin UI at http://localhost:8089/__admin
volumes:
- ./wiremock/mappings:/home/wiremock/mappings:ro
- ./wiremock/__files:/home/wiremock/__files:ro
command: [ "--verbose", "--global-response-templating" ]
healthcheck:
test: [ "CMD", "curl", "-s", "http://localhost:8080/__admin/mappings" ]
interval: 10s
timeout: 5s
retries: 6
h2:
image: oscarfonts/h2
container_name: h2
ports:
- "1521:1521" # TCP server (JDBC)
- "81:81" # Web console
environment:
H2_OPTIONS: "-tcp -tcpAllowOthers -web -webAllowOthers -ifNotExists"
H2_USER: sa
H2_PASSWORD: ""
healthcheck:
test: [ "CMD", "sh", "-c", "sleep 1; wget -q -O - http://localhost:81 || true" ]
interval: 10s
timeout: 5s
retries: 6
app:
build: .
container_name: insurance-app
depends_on:
rabbitmq:
condition: service_healthy
wiremock:
condition: service_healthy
h2:
condition: service_healthy
ports:
- "8081:8081"
environment:S
SPRING_AUTOCONFIGURE_EXCLUDE: org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration
SPRING_SQL_INIT_MODE: never
SPRING_DATASOURCE_DRIVER_CLASS_NAME: org.h2.Driver
SPRING_JPA_HIBERNATE_DDL_AUTO: update
SPRING_JACKSON_PROPERTY_NAMING_STRATEGY: SNAKE_CASE
SPRING_RABBITMQ_HOST: rabbitmq
SPRING_RABBITMQ_PORT: 5672
SPRING_RABBITMQ_USERNAME: guest
SPRING_RABBITMQ_PASSWORD: guest
FRAUD_API_BASE_URL: http://wiremock:8080
SPRING_INTEGRATION_JDBC_INITIALIZE_SCHEMA: "true"
restart: on-failure
networks:
app-network:
driver: bridge