From 2eff218613c6caf8aa6c656458cacccc3bff2912 Mon Sep 17 00:00:00 2001 From: Marlan McInnes-Taylor Date: Mon, 22 Jan 2024 02:47:56 -0600 Subject: [PATCH] Create docker.md --- docs/docker.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 docs/docker.md diff --git a/docs/docker.md b/docs/docker.md new file mode 100644 index 0000000..327d3c0 --- /dev/null +++ b/docs/docker.md @@ -0,0 +1,39 @@ +--- +title: Docker Image +layout: default +--- + +# Docker Image + +The project's `Dockerfile` is designed to build both the development and production versions of the project's Docker Image. + +## Build Image + +``` +# Programming-Contet-Suite/ + +docker build . -t --build-arg="REQUIREMENTS=requirements.txt" +``` + +`Dockerfile` Argument | Default | Description +---|---|--- +REQUIREMENTS | requirements.txt | Path to the manifest file to use during image creation. + +## Run Image + +The `Dockerfile` specifies an image capable of running the Django web app, Celery, or a helper Discord bot. The parameters passed to the image's start script `start.sh` determine the container's behavior. + + docker run /docker/start.sh + +`PROCESS_TYPE` | Default | Usage +---|---|--- +server | Yes | WSGI server bound to the Django web app +worker | No | Celery Worker +beat | No | Celery Beat +flower | No | Celery Flower +bot | No | Discord bot + +`MODE` | Default | Usage +---|---|--- +production | Yes | Option specified by `PROCESS_TYPE` uses production ready settings/flags. +debug | No | Option specified by `PROCESS_TYPE` uses debug/development settings/flags.