Using Flask and PostgreSQL (with TimescaleDB extension) in a Docker container
One step:
docker-compose up --build
- Start the database
docker compose up -d flask_db
- Start redis
docker compose up -d flask_redis
- Start imgproxy
docker compose up -d imgproxy
- Start the flask app
docker compose up --build flask_app
This is required and should be manually created in the root folder
# Postgres credentials
POSTGRES_USER=
POSTGRES_PASSWORD=
POSTGRES_DB=
# Other tokens used by Flask
FLASK_ENV=DEV|PROD
FLASK_SECRET_KEY=
WEATHER_POST_PASSWORD=
PARKING_POST_PASSWORD=
OPEN_DATA_TOKEN=
IMGPROXY_KEY=
IMGPROXY_SALT=
# For flask migrate
FLASK_APP="app:create_app"
REDIS_URL=redis://localhost:6379/0
DISCORD_BOT_TOKEN=