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

Add Dockerfiles #48

Merged
merged 3 commits into from
Mar 16, 2021
Merged

Add Dockerfiles #48

merged 3 commits into from
Mar 16, 2021

Conversation

ebuttonsdude
Copy link
Contributor

This change adds 2 new files, DockerfileLight and DockerfileFull. This change also adds documentation to README.md for instructions on how to build and run the application in a docker container using the Dockerfile.

The dockerfiles base image is nginx:alpine-stable.

The DockerfileLight does not add any extra packages on top of nginx:alpine-stable.
It takes the completed dist files and adds them into the nginx directory.

The DockerfileFull adds nodejs and yarn to the nginx:alpine-stable image.
It takes the entire application, builds it using yarn, then copies the completed dist files and adds them to the nginx directory.
This allows someone without yarn installed to deploy the docker container.

AvidLabs and others added 3 commits March 16, 2021 00:27
DockerfileLight assumes that yarn build has already been run.
The dockerfile copies the contents of dist into an nginx alpine container.

DockerfileFull assumes that yarn has not been built, and will build and deploy the application.
The dockerfile is based on nginx:stable-alpine.
The dockerfile first installs nodejs and yarn.
After this, it copies the application into a folder. Then, it runs yarn and yarn build.
Lastly, it copies the newly created contents of dist into the nginx folder.
Added dockerfile explanation and build/deploy commands.
Removed EXPOSE as port 80 is already exposed in base image
@PhlexPlexico PhlexPlexico merged commit 4df9086 into PhlexPlexico:master Mar 16, 2021
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

Successfully merging this pull request may close these issues.

3 participants