This PR combines the multiple Dockerfile's in the repo into a single, multi-stage Dockerfile that can be used to build both development and production Docker images.
Instead of the Docker image including all the documentation by default, now users are able to select which documentation sections they want to include in their local deployment of DevDocs.
This makes it easier/faster to publish new official Docker images of DevDocs because the image size is much smaller.
All downloaded documentation and compiled assets are stored in Docker volumes instead of being baked into the image.
This also means that new Docker images only need uploaded when code changes, and not when documentation updates.
Finally, this PR adds environment variables that can be used to configure the SSL and origin settings of DevDocs when deployed via Docker container. This helps if deploying DevDocs behind a reverse proxy/load balancer, and when running on Windows via WSL2.
This PR should close:
1152
2229
Once this PR is merged, I would think a new Docker image should be released again, which would close #895 and this PR.
This PR combines the multiple
Dockerfile
's in the repo into a single, multi-stageDockerfile
that can be used to build both development and production Docker images.I've also added a
devcontainer.json
file that can be used with VS Code to provider a containerized development environment. This PR was originally based off of this PR: https://github.com/freeCodeCamp/devdocs/pull/1337Instead of the Docker image including all the documentation by default, now users are able to select which documentation sections they want to include in their local deployment of DevDocs. This makes it easier/faster to publish new official Docker images of DevDocs because the image size is much smaller. All downloaded documentation and compiled assets are stored in Docker volumes instead of being baked into the image. This also means that new Docker images only need uploaded when code changes, and not when documentation updates.
Finally, this PR adds environment variables that can be used to configure the SSL and origin settings of DevDocs when deployed via Docker container. This helps if deploying DevDocs behind a reverse proxy/load balancer, and when running on Windows via WSL2.
This PR should close:
1152
2229
Once this PR is merged, I would think a new Docker image should be released again, which would close #895 and this PR.