Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
122 lines (119 loc) · 3.29 KB
/
Copy pathdocker-compose.yml
File metadata and controls
122 lines (119 loc) · 3.29 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
110
111
112
113
114
115
116
117
118
119
120
121
122
volumes:
mysql_data:
pipeline_scripts:
pipeline_build_logs:
networks:
app:
services:
mysql-db:
image: mysql:8.0
container_name: mysql-db
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: pipeline
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
networks:
- app
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
timeout: 5s
retries: 10
auth-service:
image: quay.io/keycloak/keycloak:26.2.5
container_name: auth-service
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KC_DB: ${DB}
KC_DB_URL: ${DB_URL}
KC_DB_USERNAME: ${DB_USERNAME}
KC_DB_PASSWORD: ${DB_PASSWORD}
KC_HOSTNAME: http://localhost:8180
KC_HOSTNAME_STRICT: false
KC_HEALTH_ENABLED: true
KC_LOG_CONSOLE_FORMAT: "%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p %c trace_id=%X{traceId} span_id=%X{spanId} - %s%e%n"
ports:
- "8180:8080"
command: start-dev --import-realm
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/9000 && echo -e 'GET /health/ready HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n' >&3 && grep -q '\"status\": \"UP\"' <&3"]
interval: 10s
timeout: 5s
retries: 3
start_period: 20s
volumes:
- ./keycloak-realm.json:/opt/keycloak/data/import/realm.json
networks:
- app
depends_on:
mysql-db:
condition: service_healthy
flagd:
image: ghcr.io/open-feature/flagd:latest
container_name: flagd
command: start --uri file:./etc/flagd/feature-flags.json
volumes:
- ./flags/feature-flags.json:/etc/flagd/feature-flags.json
ports:
- "8016:8016"
networks:
- app
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/8014 && echo -e 'GET /readyz HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && grep -q 'HTTP/1.1 200' <&3"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
pipeline-app:
build:
context: .
dockerfile: pipeline/Dockerfile
image: pipeline-app
container_name: pipeline-app
environment:
SPRING_PROFILES_ACTIVE: demo
DB_URL: ${DB_URL}
DB_USER: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
AUTH_HOST: auth-service
AUTH_PORT: 8080
OTEL_SERVICE_NAME: pipeline-app
FEATURE_PROVIDER_URI: http://flagd:8016
ports:
- "8080:8080"
volumes:
- pipeline_scripts:/app/pipeline_scripts
- pipeline_build_logs:/app/pipeline_build_logs
networks:
- app
depends_on:
mysql-db:
condition: service_healthy
auth-service:
condition: service_healthy
flagd:
condition: service_healthy
pipeline-ui:
build:
context: ./pipeline-ui
dockerfile: Dockerfile
args:
VITE_API_BASE_URL: http://pipeline-app:8080/api/v1
VITE_IDP: keycloak
VITE_KC_URL: http://auth-service:8080
VITE_KC_REALM: SpringBootRealm
VITE_KC_CLIENTID: pipeline-app
image: pipeline-ui
ports:
- "3000:3000"
networks:
- app
depends_on:
pipeline-app:
condition: service_started