Skip to content

[P2-DevOps] Add Dockerfile and docker-compose for easy deployment #61

Description

@Ztrimus

Problem

No Dockerfile exists. Deployment requires manual installation of Python, system dependencies (texlive/typst), and playwright browsers.

Solution

Create multi-stage Dockerfile:

FROM python:3.11-slim AS base

# Install Typst (replaces texlive - 50MB vs 1GB)
RUN curl -fsSL https://typst.community/typst-install/install.sh | sh

# Install Python dependencies
COPY pyproject.toml poetry.lock ./
RUN pip install poetry && poetry install --no-dev

COPY . .

# Streamlit UI
EXPOSE 8501
CMD ["streamlit", "run", "web_app.py", "--server.port=8501"]

Also create docker-compose.yml for local development:

services:
  web:
    build: .
    ports:
      - "8501:8501"
    env_file: .env
    volumes:
      - ./output:/app/output

Acceptance Criteria

  • docker build succeeds
  • docker-compose up starts Streamlit UI
  • Image size < 500MB (vs 1.5GB+ with texlive)
  • API keys passed via environment variables

Files

  • Dockerfile (new)
  • docker-compose.yml (new)
  • .dockerignore (new)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-mediumMedium priority - quality & polishdevopsCI/CD, Docker, infrastructure

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions