diff --git a/README.md b/README.md index 4af13c6..801f921 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ A base [Docker image](https://www.docker.com/) for Cal-ITP Python web applications. -Read the full documentation online: - ## Features - Base image `python:3.12-bookworm` diff --git a/docs/README.md b/docs/README.md index 1753915..4a2889f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,61 +1,5 @@ -# docker-python-web Docs + -## 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 -``` + diff --git a/mkdocs.yml b/mkdocs.yml index 0d8d711..65c6e83 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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