https://github.com/nikaera/docker-fastapi-basic-auth-sample
Docker Compose sample project with BASIC authentication for FastAPI docs path in nginx.
https://github.com/nikaera/docker-fastapi-basic-auth-sample
basic-authentication docker docker-compose fastapi nginx
Last synced: 2 months ago
JSON representation
Docker Compose sample project with BASIC authentication for FastAPI docs path in nginx.
- Host: GitHub
- URL: https://github.com/nikaera/docker-fastapi-basic-auth-sample
- Owner: nikaera
- License: mit
- Created: 2021-06-02T21:44:26.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-02T22:44:18.000Z (about 5 years ago)
- Last Synced: 2025-02-28T10:12:02.806Z (over 1 year ago)
- Topics: basic-authentication, docker, docker-compose, fastapi, nginx
- Language: Dockerfile
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-fastapi-basic-auth-sample
Docker Compose sample project with BASIC authentication for FastAPI docs path in nginx.
## Getting Started 💨
After launching the container with Docker Compose, access `http://localhost:80/docs` and make sure BASIC authentication is enabled. In this case, set `$USER` and `$PASS` in the environment variables to [set the information for BASIC authentication](https://github.com/nikaera/docker-fastapi-basic-auth-sample/blob/main/docker-compose.yml#L14-L15).
```bash
docker-compose up --abort-on-container-exit
# clean up after docker-compose
docker-compose down --rmi all --volumes --remove-orphans
```