version: "3.9" services: flaskapp: image: python:3.11-slim container_name: portfolio_flaskapp working_dir: /app ports: - "127.0.0.1:5000:5000" restart: always command: > sh -c " apt-get update && apt-get install -y git default-libmysqlclient-dev build-essential pkg-config && [ -d /app/.git ] || git clone https://github.com/BluLupo/hersel.it.git /app && pip install --no-cache-dir -r requirements.txt && python init_db.py && gunicorn -w 4 -b 0.0.0.0:5000 app:app " environment: - PYTHONUNBUFFERED=1 env_file: - .env