Skip to content

docs: Docker deploy design doc #450

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

Merged
merged 2 commits into from
May 16, 2016
Merged

Conversation

cgmartin
Copy link
Contributor

@cgmartin cgmartin commented Apr 17, 2016

@cgmartin cgmartin changed the title docs: docker deploy design doc docs: Docker deploy design doc Apr 17, 2016

### Overview

Initialize Docker files and configuration for a default build and run environment:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we could have ng docker init, ng docker log, ng docker deploy, ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. This was just a straw man, based off of the github-pages:deploy convention.

@cgmartin
Copy link
Contributor Author

cgmartin commented Apr 21, 2016

One thing I am wrestling with is how to best keep things server agnostic. The Dockerfile in the design defaults to using a Node.js server. Users might like to have more of a choice between server tech or using different container types (ie. Go/Nginx servers, IIS windows server containers).

My original thought was to generate a simple Dockerfile that targets the "native" environment of the tool (Node.js). Maybe have an option like docker:init --server=iis or something that could generate different starter Dockerfiles for different server/container types. Users are perfectly free to change their Dockerfile completely with a different base image and server tech.

But since the artifact from an Angular project is typically just a set of static assets, an alternative idea is to generate a Dockerfile that copies the assets into a generic Data Volume (busybox). The docker-compose.yml files might allow users to more easily switch between different servers in a separate container, which would mount the Angular data volume (example).

@hansl
Copy link
Contributor

hansl commented Apr 21, 2016

I don't know much about Docker, but could you let the user either give you a container that works for him and you just do deployment, or if the user doesn't know what to do he can init a new container using ng docker init.

@hansl
Copy link
Contributor

hansl commented Apr 21, 2016

Deployment can be as simple as "copy the dist folder over".

@cgmartin
Copy link
Contributor Author

Could you let the user either give you a container that works for him and you just do deployment, or if the user doesn't know what to do he can init a new container using ng docker init.

Yes. The current design gathers some necessary info up front in the init, but I think it could be changed to support the case where init is not required (for those supplying their own Docker/docker-compose.yml files).

Deployment can be as simple as "copy the dist folder over".

Agreed. I reflect about some ways of setting this up for users in this comment.

@cgmartin
Copy link
Contributor Author

@hansl I've cleaned this up a bit more. I made changes based on your feedback (removed prompts), and cut some scope for an initial release (logs, exec).

For a default server, I'm going to start with a simple Nginx base image. Users are free to change their Dockerfile and employ different server tech.

Working now on a prototype.

@hansl
Copy link
Contributor

hansl commented May 16, 2016

LGTM.

@hansl hansl merged commit 88c77d6 into angular:master May 16, 2016
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants