Skip to content

Commit 0f4e9f5

Browse files
authored
ci: Complete env configure (#175)
* Add opt to gitignore (keycloak output) * Add configurability for redis and keycloak ports * Fix compute_worker trying to connect amqp on forwarded port
1 parent 64694a6 commit 0f4e9f5

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ lib64/
2020
parts/
2121
sdist/
2222
var/
23+
opt/
2324
wheels/
2425
*.egg-info/
2526
.installed.cfg

evaluation/docker-compose-demo.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
redis:
2222
image: redis
2323
ports:
24-
- 6379:6379
24+
- ${REDIS_PORT:-6379}:6379
2525
restart: unless-stopped
2626
logging:
2727
options:
@@ -124,7 +124,7 @@ services:
124124
- ./compute_worker/tasks_docker_compose.py:/app/tasks.py
125125
env_file: .env
126126
environment:
127-
- BROKER_URL=pyamqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@${RABBITMQ_HOST}:${RABBITMQ_PORT}//
127+
- BROKER_URL=pyamqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@${RABBITMQ_HOST}:5672//
128128
- REDIS_IP=redis://redis:6379
129129
- HOST_DIRECTORY=${PWD}
130130
- BENCHMARKING_NETWORK=${COMPOSE_PROJECT_NAME}_flatland-benchmarks

evaluation/docker-compose.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ services:
4040
redis:
4141
image: redis
4242
ports:
43-
- 6379:6379
43+
- ${REDIS_PORT:-6379}:6379
4444
restart: unless-stopped
4545
logging:
4646
options:
@@ -144,7 +144,7 @@ services:
144144
- ./compute_worker/tasks_docker_compose.py:/app/tasks.py
145145
env_file: .env
146146
environment:
147-
- BROKER_URL=pyamqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@${RABBITMQ_HOST}:${RABBITMQ_PORT}//
147+
- BROKER_URL=pyamqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@${RABBITMQ_HOST}:5672//
148148
- REDIS_IP=redis://redis:6379
149149
- HOST_DIRECTORY=${PWD}
150150
- BENCHMARKING_NETWORK=${COMPOSE_PROJECT_NAME}_flatland-benchmarks
@@ -168,10 +168,10 @@ services:
168168

169169
keycloak:
170170
image: quay.io/keycloak/keycloak:23.0
171-
# as we need to access keycloak from backend Docker container under docker internal port, we need to start Keycloak on 8081, port forwarding in Docker run is not enough
172-
command: start-dev --import-realm --http-port 8081 --hostname localhost
171+
# as we need to access keycloak from backend Docker container under docker internal port, we need to start Keycloak on configured port, port forwarding in Docker run is not enough
172+
command: start-dev --import-realm --http-port ${KEYCLOAK_PORT:-8081} --hostname localhost
173173
ports:
174-
- 8081:8081
174+
- ${KEYCLOAK_PORT:-8081}:${KEYCLOAK_PORT:-8081}
175175
volumes:
176176
# TODO can we avoid copying the realm config? Download in an init container from the repo....?
177177
- ./keycloak/netzgrafikeditor-realm.json:/opt/keycloak/data/import/netzgrafikeditor-realm.json

0 commit comments

Comments
 (0)