Go to file
2024-06-03 15:39:54 -04:00
beer Smoosh all the migrations down. 2024-06-03 12:55:20 -04:00
config Add login bits. 2024-06-03 11:03:51 -04:00
kegs A little restructuring. 2024-05-31 11:56:07 -04:00
templates Add Brewfather links to yeast pages if available. 2024-06-03 15:39:54 -04:00
yeast Add Brewfather links to yeast pages if available. 2024-06-03 15:39:54 -04:00
.gitignore Fix indents in makefile. 2024-06-03 13:06:21 -04:00
Makefile Activating venv is not necessary. 2024-06-03 14:57:04 -04:00
manage.py initial commit. 2024-05-30 16:26:55 -04:00
README.md initial commit. 2024-05-30 16:26:55 -04:00
requirements.txt Add gunicorn to requirements. 2024-06-03 12:55:35 -04:00
run.sh initial commit. 2024-05-30 16:26:55 -04:00

Compose sample application

Django application in dev mode

Project structure:

.
├── compose.yaml
├── app
    ├── Dockerfile
    ├── requirements.txt
    └── manage.py

compose.yaml

services: 
  web: 
    build: app 
    ports: 
      - '8000:8000'

Deploy with docker compose

$ docker compose up -d
Creating network "django_default" with the default driver
Building web
Step 1/6 : FROM python:3.7-alpine
...
...
Status: Downloaded newer image for python:3.7-alpine
Creating django_web_1 ... done

Expected result

Listing containers must show one container running and the port mapping as below:

$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS                    NAMES
3adaea94142d        django_web          "python3 manage.py r…"   About a minute ago   Up About a minute   0.0.0.0:8000->8000/tcp   django_web_1

After the application starts, navigate to http://localhost:8000 in your web browser:

Stop and remove the containers

$ docker compose down