From 584e15421a73550bf2a36983ef4ba3e242d80f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20S=C3=B6lch?= Date: Mon, 12 Aug 2024 13:16:06 +0200 Subject: [PATCH] Development: Remove deployments info from docker image and inject it via volumes during docker compose (#329) --- assessment_module_manager/Dockerfile | 4 ---- assessment_module_manager/deployments.docker.ini | 8 -------- assessment_module_manager/deployments.ini | 1 + docker-compose.prod.yml | 2 ++ docker-compose.yml | 2 ++ 5 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 assessment_module_manager/deployments.docker.ini diff --git a/assessment_module_manager/Dockerfile b/assessment_module_manager/Dockerfile index de89687fc..15ae1fcdc 100644 --- a/assessment_module_manager/Dockerfile +++ b/assessment_module_manager/Dockerfile @@ -29,9 +29,5 @@ COPY . ./ RUN cp ./modules.docker.ini ./modules.ini RUN rm ./modules.docker.ini -# Use deployments configuration file for docker -RUN cp ./deployments.docker.ini ./deployments.ini -RUN rm ./deployments.docker.ini - # poetry scripts don't work here CMD poetry run python -m assessment_module_manager diff --git a/assessment_module_manager/deployments.docker.ini b/assessment_module_manager/deployments.docker.ini deleted file mode 100644 index fdd65a619..000000000 --- a/assessment_module_manager/deployments.docker.ini +++ /dev/null @@ -1,8 +0,0 @@ -[schwind] -url = https://ma-schwind.ase.cit.tum.de - -[playground] -url = https://athena-test1.ase.cit.tum.de - -[localhost] -url = http://localhost:3000 diff --git a/assessment_module_manager/deployments.ini b/assessment_module_manager/deployments.ini index 05cca46bb..8b6ee2eac 100644 --- a/assessment_module_manager/deployments.ini +++ b/assessment_module_manager/deployments.ini @@ -1,5 +1,6 @@ # for local development only +# local LMS instance, i.e. Artemis [local] url = http://localhost:8080 diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index e9ffa5b75..3350ae018 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -21,6 +21,8 @@ services: depends_on: - postgres image: ls1tum/athena_assessment_module_manager:${ATHENA_TAG:-develop} + volumes: + - ./deployments.ini:/code/deployments.ini:ro module_example: hostname: module-example diff --git a/docker-compose.yml b/docker-compose.yml index 77722f264..7f9567a88 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,6 +14,8 @@ services: - athena ports: - "5100:5100" + volumes: + - ./assessment_module_manager/deployments.ini:/code/deployments.ini:ro module_example: hostname: module-example