API for taking notes and managing tasks
134
This is the official image for the Taking Notes API, a secure and robust backend application for managing notes. The image is built using python:3.13-alpine, ensuring a lightweight, high-performance, and secure environment ideal for production workloads.
This image packages the entire application and its dependencies, ready to be deployed. It follows Docker security and performance best practices:
entrypoint.sh script to handle environment initialization and start the application server.8000./data/web/static and /data/web/media).duser), ensuring an essential layer of security..pyc files and disables Python output buffering for optimal container logging.The application requires a PostgreSQL database to function correctly. The recommended way to orchestrate the services is by using Docker Compose.
Create a docker-compose.yml file with the following setup:
services:
db:
image: postgres:17
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- .env
networks:
- note-taking-network
web:
image: rafaelrodriguess/taking-notes-api:latest
ports:
- "8000:8000"
depends_on:
- db
env_file:
- .env
networks:
- note-taking-network
volumes:
postgres_data:
networks:
note-taking-network:
.env)You must provide a .env file to configure the application's behavior and the database connection. Place it in the same directory as your docker-compose.yml:
# Application Settings
SECRET_KEY="your-super-secure-secret-key"
DEBUG=0
ALLOWED_HOSTS=localhost,127.0.0.1,your-domain.com
CORS_ALLOWED_ORIGINS=http://localhost:3000,https://your-frontend-domain.com
# PostgreSQL Database Configuration
POSTGRES_DB="notes_db"
POSTGRES_USER="postgres_user"
POSTGRES_PASSWORD="your_secure_password"
POSTGRES_HOST="db" # Must match the service name in docker-compose
POSTGRES_PORT="5432"
The image is configured to manage files in specific internal directories. It is highly recommended to map them to named volumes if you need data persistence for these assets:
/data/web/static: Collected static files (CSS, JS, fonts)./data/web/media: Media files or attachments uploaded by users.This image was designed with production in mind:
duser): Prevents the application from running as root, restricting potential unauthorized access within the container.PYTHONDONTWRITEBYTECODE=1 and PYTHONUNBUFFERED=1 are active to prevent caching clutter and ensure immediate log output.Developed by Rafael Rodrigues.
Content type
Image
Digest
sha256:d0e97309c…
Size
53.2 MB
Last updated
about 2 months ago
docker pull rafaelrodriguess/taking-notes-api