Skip to content

Commit

Permalink
Create docker.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcinnestaylor committed Jan 22, 2024
1 parent 97870db commit 2eff218
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/docker.md
Original file line number Diff line number Diff line change
@@ -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 <image_name> --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 <image_name> /docker/start.sh <PROCESS_TYPE> <MODE>

`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.

0 comments on commit 2eff218

Please sign in to comment.