4cat icon indicating copy to clipboard operation
4cat copied to clipboard

database host specified in .env for docker container

Open anderscollstrup opened this issue 3 years ago • 4 comments

Hi,

I want to be able to specify a separate database host in the docker container /usr/src/app/docker/docker-entrypoint.sh users --host=db I want to specify a different --host so I can use a database hostet elsewhere.

Root problem The postgres db container cannot run with Azure Container Instances because of postgres ownership requirements on the storageaccount Database host is hardcoded in /usr/src/app/docker/docker-entrypoint.sh

It would be nice if our university could offer 4cat as an azure container to researchers and students. But we would like to use a managed postgres service instead of a container. Much cheaper than deploying standalone docker servers.

Regards Anders

anderscollstrup avatar Aug 18 '22 09:08 anderscollstrup

If you want to customize your version for your specific environment, you can certainly do so. The wiki has some steps on how to fairly easily make changes and deploy your own version.

You could link a fork here if you think it will help others. And we of course appreciate PR requests if you make changes that can be optionally used by others! Particularly new datasources and processors!

dale-wahl avatar Aug 18 '22 14:08 dale-wahl

I know I can fork the project, but it will be difficult to maintain. I am not a dev, I don't have automatet pipelines and so on. I was also thinking that being able to specify database host was a very small change and it could benefit others.

.... what is a PR request?

/Anders

anderscollstrup avatar Aug 19 '22 08:08 anderscollstrup

Hi @anderscollstrup , we are unfortunately not able to invest time in this at the moment as we do not use an infrastructure like the one you describe ourselves so there is no direct benefit for us in supporting this environment, and it would be difficult for us to test. We of course try to make 4CAT as easy to install by others as possible but we are a small team so we have to make choices in that regard.

Of course, if someone else comes along who can make the necessary tweaks to make this configurable we would be happy to integrate those. In that case they can open a Pull Request (PR) with the changes and we can review and integrate them in that way.

In the meantime, you can of course change the database address mentioned in the configuration files manually for your instance of 4CAT.

stijn-uva avatar Aug 19 '22 13:08 stijn-uva

Hi,

I hired someone to make the required changes, I am happy to see that Pull Request are welcome. I guess he already made one :-)

Changes; https://github.com/digitalmethodsinitiative/4cat/compare/master...alk-automize:4cat:master

Fork: https://github.com/alk-automize/4cat

anderscollstrup avatar Aug 25 '22 07:08 anderscollstrup