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

Docker setup difference. #3954

Closed
samuelcastro opened this issue Feb 25, 2020 · 2 comments
Closed

Docker setup difference. #3954

samuelcastro opened this issue Feb 25, 2020 · 2 comments

Comments

@samuelcastro
Copy link

samuelcastro commented Feb 25, 2020

This might be a dumb question, but what's the difference and why there are 2 difference Docker setup?

1 - https://docs.hasura.io/1.0/graphql/manual/getting-started/docker-simple.html#step-1-get-the-docker-compose-file (docker-compose)
2 - https://docs.hasura.io/1.0/graphql/manual/deployment/docker/index.html (docker-run.sh)

Would the docker-run.sh setup be more recommend for a production environment? If so why?

Thanks!

@toddheslin
Copy link
Contributor

Not a dumb question @samuelcastro

Option one - docker compose - works really well for simple local setups and deploying on a single server like Digital Ocean. Basically, you'll have Hasura, Postgres + any other containers all wrapped up in a single docker-compose.yml file which can be brought up by using docker-compose up -d.

The second option is just a shell script wrapping the raw docker run command. If you're using a hosted environment, like Heroku, Kubernetes on Google/AWS etc, then they already provide all the stuff that docker-compose does and expect you to just provide a container with environment variables.

Personally, I love using docker-compose. It's just so darn simple and works a treat for the types of apps I build. I use it when working with Docker containers locally, and sometimes in production if I realistically don't need to worry about multiple-containers running on multiple servers with a separate database / load balancer etc etc.

Hope this helps a bit!

@samuelcastro
Copy link
Author

Thanks @toddheslin helped a lot! :)

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