Skip to content

✨ Flask CRUD app built with Flask, Bootstrap, Postgres and Docker (self-hosted)

License

Notifications You must be signed in to change notification settings

buildwithdan/flask-crud

Repository files navigation

Flask-crud app

Try Out Development Containers: Python

Open in Dev Containers

visitors

A simple Flask Python CRUD app to understand how the basics of CRUD works with a database.

Stack

Running Locally

Use the .devcontainer to run the program inside of .devcontainer.

version: '3.8'

services:
  app:
    image: buildwithdan/flask-crud:latest  # Assuming this is the image with everything set up
    restart: unless-stopped
    ports:
      - "5100:5000"  # Exposing the Flask app on port 5100 externally. Reminder the logic is HOST:CONTAINER. The container port has to be 5000 as the build image we set it as 5000 in the dockerfile.

    depends_on:
      - db

  db:
    image: postgres:latest
    restart: unless-stopped
    volumes:
      - postgres-data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: postgres
      POSTGRES_DB: postgres
      POSTGRES_PASSWORD: postgres  # Make sure to use secure passwords in production
    ports:
      - "5432:5432"

volumes:
  postgres-data:

This application requires the latest python and flask to be installed.

git clone https://github.com/buildwithdan/flask-crud
cd flask-crud
flask --debug --app api.app run

docker-compose.yml

About

✨ Flask CRUD app built with Flask, Bootstrap, Postgres and Docker (self-hosted)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published