fly.dockerfile 688 B

12345678910111213141516171819202122
  1. FROM python:3.11-slim
  2. LABEL maintainer="Zauberzeug GmbH <nicegui@zauberzeug.com>"
  3. RUN pip install itsdangerous prometheus_client isort docutils pandas
  4. WORKDIR /app
  5. ADD . .
  6. # ensure unique version to not serve cached and hence potentially wrong static files
  7. ARG VERSION=unknown
  8. RUN if [ "$VERSION" = "unknown" ]; then echo "Error: VERSION build argument is required. Use: fly deploy --build-arg VERSION=$(git describe --abbrev=0 --tags --match 'v*' 2>/dev/null | sed 's/^v//' || echo '0.0.0')" && exit 1; fi
  9. RUN sed -i "/\[tool.poetry\]/,/]/s/version = .*/version = \"$VERSION\"/" pyproject.toml
  10. RUN cat pyproject.toml
  11. RUN pip install .
  12. EXPOSE 8080
  13. EXPOSE 9062
  14. CMD python3 main.py