ThinkR-open / golem

A Framework for Building Robust Shiny Apps
https://thinkr-open.github.io/golem/
Other
902 stars 132 forks source link

Add more deploy destinations #317

Open ColinFay opened 4 years ago

ColinFay commented 4 years ago

We should add more destinations for {golem} deployment.

For example:

MarkEdmondson1234 commented 4 years ago

Cloud Run?

berkorbay commented 4 years ago

Personally, I would love to see AWS Elastic Beanstalk: All automatic scaling from a Docker container. Game changer for Shiny scalability. Ultimately failed to run Shiny Server on EB though 😕

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/single-container-docker.html

ColinFay commented 4 years ago

@berkorbay I'm not fully familiar with AWS, I successfully deploy to Amazon Elastic Container Service once, could you pitch me on how Beanstalk differs from ECS ?

berkorbay commented 4 years ago

@ColinFay Very good question! I had a hard time to differentiate, so I searched for the answer. It turns out to be the no-brainer version of ECS. I had experience with EC2 + autoscaling but it was not a smooth experience tbh.

https://aws.amazon.com/ecs/faqs/

Q: How is Amazon ECS different from AWS Elastic Beanstalk?

AWS Elastic Beanstalk is an application management platform that helps customers easily deploy and scale web applications and services. It keeps the provisioning of building blocks (e.g., EC2, RDS, Elastic Load Balancing, Auto Scaling, CloudWatch), deployment of applications, and health monitoring abstracted from the user so they can just focus on writing code. You simply specify which container images are to be deployed, the CPU and memory requirements, the port mappings, and the container links.

Elastic Beanstalk will automatically handle all the details such as provisioning an Amazon ECS cluster, balancing load, auto-scaling, monitoring, and placing your containers across your cluster. Elastic Beanstalk is ideal if you want to leverage the benefits of containers but just want the simplicity of deploying applications from development to production by uploading a container image. You can work with Amazon ECS directly if you want more fine-grained control for custom application architectures.

berkorbay commented 4 years ago

Ok, it turned out that I made things a bit complicated (thanks to some tutorials on the wild internet). Below is a very basic Dockerfile that will get people started with EB. Perhaps Golem can facilitate Github+S3+Docker with Dockerrun files flow in the future. If I crack that, I will definitely send a pull request.

FROM rocker/shiny:3.6.3

USER shiny
EXPOSE 3838
CMD ["/usr/bin/shiny-server.sh"]