ESID icon indicating copy to clipboard operation
ESID copied to clipboard

Make docker volume paths configurable.

Open JonasGilg opened this issue 1 year ago • 6 comments

Description

It is now possible to specify the docker volume path via the .env file.

JonasGilg avatar Aug 27 '24 08:08 JonasGilg

You say it is possible to set the VOLUME_DIR in the .env file. This is not clear to me. Can you adapt the .env template?

annawendler avatar Aug 27 '24 15:08 annawendler

Test Results

39 tests  ±0   39 :white_check_mark: ±0   11s :stopwatch: ±0s 17 suites ±0    0 :zzz: ±0   1 files   ±0    0 :x: ±0 

Results for commit 6d38a122. ± Comparison against base commit d7dd9b8a.

github-actions[bot] avatar Aug 28 '24 09:08 github-actions[bot]

You say it is possible to set the VOLUME_DIR in the .env file. This is not clear to me. Can you adapt the .env template?

Yes, I updated the .env templates. You can give a path, where docker should store all the data. It is required that the folder exists with the 3 subfolders mentioned in the comment in the .env template. It is not required anymore to create docker volumes with docker volume create!

JonasGilg avatar Aug 28 '24 09:08 JonasGilg

Thank you. I created a folder with the specified three subfolders and set the VOLUME_DIR in .env.docker and backend/.env. When running "USER_ID=$(id -u) GROUP_ID=$(id -g) docker-compose -f docker-compose.dev.yml up -d" I get "KeyError: 'ContainerConfig'". Do you have an idea where this is coming from?

annawendler avatar Aug 28 '24 09:08 annawendler

Thank you. I created a folder with the specified three subfolders and set the VOLUME_DIR in .env.docker and backend/.env. When running "USER_ID=$(id -u) GROUP_ID=$(id -g) docker-compose -f docker-compose.dev.yml up -d" I get "KeyError: 'ContainerConfig'". Do you have an idea where this is coming from?

I am not quite sure. If I remember correctly we had issues with the docker-compose files in the backend folder and just used the docker-compose file in the root folder. There you should also create an .env file with the same values.

Run this in the root folder: USER_ID=$(id -u) GROUP_ID=$(id -g) docker-compose -f docker-compose.yaml up -d

JonasGilg avatar Aug 28 '24 10:08 JonasGilg

I think the issue was some interference with the old volumes which I could solve. Now, when I want to run "USER_ID=$(id -u) GROUP_ID=$(id -g) docker-compose -f docker-compose.dev.yml run --rm backend python manage.py import_rki rki.zip" I get the error "django.db.utils.OperationalError: could not translate host name "db" to address: Name or service not known". I also noticed that I can't reach pgAdmin via the browser. Is there another path that needs to be adapted regarding the docker volumes? I couldn't solve this.

annawendler avatar Aug 28 '24 14:08 annawendler

This is outdated now no?

NXXR avatar Mar 11 '25 16:03 NXXR