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

adding docker compose, making docker more production ready #232

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flammermann
Copy link

In this PR

  • Added more environment variables and build arguments.
  • Added example files for the usage of docker compose.
  • The docker implementation is now more production ready but each user still has to provide some values in the env file and then build the container.

Docker compatibility could be further improved by

  • Splitting containers, one for database, one for the server.
  • Get rid of build arguments and enable prebuilt docker container to be configured/initialized solely by environment variables.
  • POssibly also pre-building containers for each of the supported databases. And making them available on Docker Hub.

@bfabiszewski
Copy link
Owner

Thanks for the contribution. Sorry, I did not have time to look at it earlier.
I see you are using env values for storing passwords. I wanted to avoid it and only used build arguments for that. What do you think?
You mention example files for docker compose usage. Where are they? Also README should be updated to reflect new docker.
Introducing docker compose is nice and further splitting containers would be good.
To make it production ready it would require https support. Is there any nice way to implement it in docker, so that user can either supply their own certificates or maybe use let's encrypt? Inside the container or over external proxy? We should provide such configuration and document it in README.

@flammermann
Copy link
Author

Hi and no worries. ;)

  1. I used env values because it is one of the preparation steps towards having a pre-build container for this. Next step would be to move the db init out of the build step and into an init script that is executed upon running the container. At least for those parts of the init that should be configurable, like user names and passwords.
  2. The docker compose examples are in the hidden folder .docker-compose. There is also a .env file defining the environment variables that are also later used in the Dockerfile.
  3. You are right, the README should be adjusted.
  4. I myself have this docker container running behind a nginx reverse proxy with a acme letsencrypt companion container. With this setup, I only need to add a few env vars to the docker compose file, put the ulogger and nginx containers in the same network, and everything else happens by itself. See https://github.com/nginx-proxy/acme-companion/ and https://hub.docker.com/r/nginxproxy/acme-companion. I would not add a full explanation how to use this in this repository, because it might be subject to change, but a reference to the appropriate docs and a minimal explanation certainly does not hurt.

@bfabiszewski
Copy link
Owner

Nice, that sounds good.
I think your setup is simple enough for users to follow up if we document it properly.
Do you want to proceed with next steps that you listed?

I am currently restructuring the whole folder hierarchy. There won't hidden folders any more. But for now we can keep everything inside the .docker folder, .docker-compose folder is probably not necessary. When I finish restructuring I will just move files around and fix paths.

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

Successfully merging this pull request may close these issues.

2 participants