Skip to content
This repository was archived by the owner on Mar 22, 2025. It is now read-only.

(WIP) Feature/docker deploy prod #1

Closed
wants to merge 1 commit into from

Conversation

TheDonDope
Copy link
Owner

@TheDonDope TheDonDope commented Oct 11, 2016

Do not merge

Context: angular/angular-cli#885

Credits to @suchja for the base work (https://github.com/suchja/angular-cli-docker)

TODO:

Drawbacks:
Since the dist-build container and the nginx container are linked through networks, there is no guarantee on the startup order. Hence, you need to manually start the dist build first and wait for it to finish, and then start the nginx container:

$ docker-compose down # make sure no previous containers are running anymore
$ docker-compose build # build both containers
$ docker-compose up -d dist-build # start the dist-build container, check the logs with $ docker-compose logs dist-build to see when it is finished, or use Kitematic
$ docker-compose up -d nginx # start the nginx container

Now you should be able to visit the site at http://localhost

@TheDonDope TheDonDope added this to the 1.1.0 milestone Oct 11, 2016
@TheDonDope TheDonDope force-pushed the feature/docker-deploy-prod branch from a6e1416 to 9348ef6 Compare October 21, 2016 14:59
@TheDonDope TheDonDope force-pushed the feature/docker-deploy-prod branch 4 times, most recently from eb0ca56 to 7ee81ee Compare October 23, 2016 13:33
Setup a docker environment to provide production deployments.
The project will spawn two docker containers on `$ docker-compose build`.
The first container will install `angular-cli` and do a dist build
by running `$ ng serve -prod`.
The second container is based on an nginx image and will link the
built dist files to a virtual host. Nginx itself will then serve the
files on port 80
@TheDonDope TheDonDope force-pushed the feature/docker-deploy-prod branch from 7ee81ee to 87082f1 Compare October 23, 2016 13:53
@TheDonDope
Copy link
Owner Author

Implemented by 712385d

@TheDonDope TheDonDope closed this Oct 23, 2016
@TheDonDope TheDonDope deleted the feature/docker-deploy-prod branch October 23, 2016 14:08
@TheDonDope
Copy link
Owner Author

Nginx production build implemented by 0fefa62

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.

1 participant