Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

A base [Docker image](https://www.docker.com/) for Cal-ITP Python web applications.

Read the full documentation online: <https://docs.calitp.org/docker-python-web>
Copy link
Copy Markdown
Member Author

@jgravois jgravois Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it'd be redundant to display this in mkdocs itself. seems safe to me to omit it since the github repo links directly to the same page, but i'm open to any/all other ideas.

Image


## Features

- Base image `python:3.12-bookworm`
Expand Down
62 changes: 3 additions & 59 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,5 @@
# docker-python-web Docs
<!-- markdownlint-disable -->

## Introduction
--8<-- "README.md"

This is the documentation site for [`cal-itp/docker-python-web`](https://github.com/cal-itp/docker-python-web).

`docker-python-web` is a base [Docker image](https://www.docker.com/) for Cal-ITP Python web applications.

## Features

- Base image `python:3.12-bookworm`
- Image configured with non-`root` user (`calitp` by default)
- `nginx` configured as a reverse proxy listening on container port `8000`
- `gunicorn` configured as a WSGI application server, communicates with `nginx` over Unix socket
- `gunicorn` default configuration location in `$GUNICORN_CONF`
- `gettext` for use with web frameworks like Django
- `WORKDIR` set to `/home/$USER/app`; `gunicorn` configuration in `/home/$USER/run`

## Non-Features

- Bring Your Own Web Framework
- see [`benefits`](https://github.com/cal-itp/benefits) for a `Django` example
- see [`eligibility-server`](https://github.com/cal-itp/eligibility-server) for a `Flask` example
- Bring Your Own `CMD`: drop in to `bash` with the default `ENTRYPOINT`.

## Usage

Reference one of the `image:tag` from GitHub Container Registry in a `Dockerfile`. E.g. for the `main` branch:

```dockerfile
FROM ghcr.io/cal-itp/docker-python-web:main

COPY my_app my_app

CMD "nginx && python -m gunicorn -c $GUNICORN_CONF my_app.wsgi"
```

Or from the command line:

```shell
docker pull ghcr.io/cal-itp/docker-python-web:main
```

## Development

Development for this repo is done within a Visual Studio Code [devcontainer](https://code.visualstudio.com/docs/remote/containers).

!!! warning

You must build the base Docker image `cal-itp/docker-python-web:app` before running the devcontainer. In a terminal, run:
```
docker compose build app
```

Then, with the [Remote - Containers](https://code.visualstudio.com/docs/remote/containers) extension enabled, open the folder containing this repository inside Visual Studio Code.

The image you just built can be accessed from other (local) codebases via:

```dockerfile
FROM docker-python-web:app
```
<!-- markdownlint-enable -->
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ markdown_extensions:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tabbed
Expand Down