Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: use docker compose for deployment #49

Open
aayio opened this issue Jan 10, 2023 · 1 comment
Open

Idea: use docker compose for deployment #49

aayio opened this issue Jan 10, 2023 · 1 comment

Comments

@aayio
Copy link

aayio commented Jan 10, 2023

Hi,

Firstly, my sincere thanks to everyone who works on Cytomine. It is a fantastic project.

I would like to put forward an idea for discussion.

Would it be worth consolidating the Docker stack into a docker-compose.yml which is then started by the start_deploy.sh script with a simple docker compose up -d?

This seems to be the approach of most self-hosted projects that are deployed with Docker and require multiple containers.

Advantages that I can think of:

  • Takes care of all the docker create commands
  • Automatically creates a network for all of the containers, eliminating the need for --link in order to allow the containers to reach each other by their container name. (--link is also deprecated functionality, according to the Docker documentation.)
  • Configs can be mapped directly into containers, e.g.:
volumes:
  - ./configs/memcached/memcached.conf:/etc/memcached.conf 
  • Environment variables written by bash init.sh should still be accessible (see Environment variables in Compose)
  • We could specify container dependencies with depends_on:

I might be able to work on this when I have some time. I was interested to know what the development team thinks about this idea.

Thanks for reading!

@thakk
Copy link

thakk commented Jan 18, 2023

Hi,

I'm not in any way associated with Cytomine development team, but i thought i could chip in.

I'm running few instances using podman-compose. However this is not without problems. I had to modify configurations of several containers in a rather crude way. For example iipOff deploy.sh script modifies nginx configuration with sed and this is problematic when volume mounts are used to bring configuration files inside container. Also I think nginx (server software) needs to be updated so we could use environment variables which would be filled in, say, .env file of compose.

There are other modifications too which needs to be done in order to use compose. But anyways, it is possible to run Cytomine in non-root containers using selinux enabled system which is pretty much requirement nowadays in many organizations.

I should warn that my solution is not "release quality", and i think Cytomine bootstrap logic would benefit from some refactoring. It's quite a bit of work though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants