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

Deployment & configuration seems unnecessarily complex #609

Open
ixxie opened this issue Aug 15, 2023 · 5 comments
Open

Deployment & configuration seems unnecessarily complex #609

ixxie opened this issue Aug 15, 2023 · 5 comments

Comments

@ixxie
Copy link

ixxie commented Aug 15, 2023

Just dropping this to team as a perspective, since I recently deployed Semapps.

The process outlined in the deploy readme is roughly as follows:

  1. Copy the deploy folder somewhere on your server
  2. Edit the docker-compose.yml files as well as 3 seperate .env.local to set various deployment parameters
  3. Run docker compose build and docker compose up -d

I understood from @srosset81 that part of the motivation here was to allow the loading of custom files to the containers from the folders.

It feels like a weird way to deploy an app. As a simple step from the current setup towards a more streamlined and - in my opinion - idiomatic way of deploying compose apps, I would suggest the following changes:

  1. Centralize all deployment parameters into env vars that are loaded centrally through docker-compose.yml into containers
  2. To deploy the app, the user needs to only copy the docker-compose.yml file
  3. The user can then pass all parameters through a single .env file or by setting environment variables in the host system
  4. If additional data needs to be passed into containers, the user could mount volumes to them, possibly configurable through environment variables
  5. Running the app is done as before: docker compose up -d (docker compose build can be removed from the readme since this happens automatically in compose anyway if needed).

This is a matter of taste and experience of course, but this approach is more in line with deployment strategies I've personally seen so far.

@srosset81
Copy link
Collaborator

srosset81 commented Aug 17, 2023

Personnally, I create a (private) repo for all my deployments.
So I copy the deploy folder (only), make the changes, and then push everything to the repo. I then clone it on the server.
I don't think it's a good practice to edit the env variables directly on the server, because if the server disappears, you lose all your configurations.

@ixxie
Copy link
Author

ixxie commented Aug 18, 2023

This is true, but it doesn't invalidate my argument that configuration is needlessly complex. The simplifications I propose work equally well when stored in a git repository.

@Tonfa
Copy link
Contributor

Tonfa commented Sep 8, 2023

@srosset81 how complex would it be to do that? I'm thinking it might bring a good Return on Investment before Regen4All deployment.

@srosset81
Copy link
Collaborator

@Tonfa It's not complex but it will take some time. If you want to apply Matan suggestions, go for it :-)

@Tonfa
Copy link
Contributor

Tonfa commented Sep 11, 2023

@Tonfa It's not complex but it will take some time. If you want to apply Matan suggestions, go for it :-)

Sounds exactly like the internationalization 😁
If someone give me one example for a file I can replicate @srosset81 @VincentFarcy

@Tonfa Tonfa added this to the v4.0 milestone Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants