-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
141 lines (132 loc) · 3.43 KB
/
docker-compose.yaml
File metadata and controls
141 lines (132 loc) · 3.43 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
# SPDX-License-Identifier: Apache-2.0
# This docker-compose file is used to run the application localy in containarized environment.
# ensure to set .env file accordingly
networks:
openfga:
services:
heureka-db:
image: mariadb:latest
container_name: mariadb
restart: always
command: --lower_case_table_names=1
profiles:
- db
environment:
MARIADB_USER: ${DB_USER}
MARIADB_PASSWORD: ${DB_PASSWORD}
MARIADB_DATABASE: ${DB_NAME}
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
# Uncomment the following lines and comment the MARIADB_ROOT_PASSWORD line to use other options
# - MARIADB_ROOT_PASSWORD_HASH=*HASHED_PASSWORD
# - MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=yes
# - MARIADB_RANDOM_ROOT_PASSWORD=yes
healthcheck:
test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
volumes:
- ./.db/data:/var/lib/mysql
ports:
- "3306:3306"
heureka-app:
build: .
container_name: heureka-app
profiles:
- heureka
environment:
DB_ADDRESS: heureka-db
DB_PORT: 3306
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
DB_NAME: ${DB_NAME}
SEED_MODE: ${SEED_MODE}
depends_on:
heureka-db:
condition: service_healthy
ports:
- "80:80"
valkey:
image: valkey/valkey:7.2
container_name: heureka-valkey
profiles:
- heureka
ports:
- "${VALKEY_PORT:-6379}:6379"
command: ["valkey-server", "--appendonly", "yes"]
volumes:
- valkey-data:/data
restart: always
ui:
build:
context: ./ui/
dockerfile: Dockerfile
args:
UI_GIT_REPO: https://github.com/cloudoperators/juno/
UI_GIT_DIR: ./ui/juno/
container_name: juno-ui
profiles:
- ui
ports:
- "3000:3000"
restart: unless-stopped
postgres:
image: postgres:17
container_name: postgres
profiles:
- openfga
networks:
- openfga
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
migrate:
depends_on:
postgres:
condition: service_healthy
image: openfga/openfga:latest
container_name: migrate
profiles:
- openfga
command: migrate
environment:
- OPENFGA_DATASTORE_ENGINE=postgres
- OPENFGA_DATASTORE_URI=postgres://postgres:password@postgres:5432/postgres?sslmode=disable
networks:
- openfga
heureka-openfga:
depends_on:
migrate:
condition: service_completed_successfully
image: openfga/openfga:latest
container_name: openfga
profiles:
- openfga
environment:
- OPENFGA_DATASTORE_ENGINE=postgres
- OPENFGA_DATASTORE_URI=postgres://postgres:password@postgres:5432/postgres?sslmode=disable
- OPENFGA_LOG_FORMAT=json
- OPENFGA_AUTHN_METHOD=preshared
- OPENFGA_AUTHN_PRESHARED_KEYS=${AUTHZ_FGA_API_TOKEN}
command: run
networks:
- openfga
ports:
# HTTP server
- "8080:8080"
# GRPC server
- "8081:8081"
# Playground
- "3000:3000"
volumes:
valkey-data: