diff --git a/.forgejo/workflows/docker-build.yml b/.forgejo/workflows/docker-build.yml new file mode 100644 index 0000000..8044e3b --- /dev/null +++ b/.forgejo/workflows/docker-build.yml @@ -0,0 +1,23 @@ + +name: Docker Build +on: + push: + branches: + - main + +jobs: + Build: + runs-on: docker + container: catthehacker/ubuntu:act-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Build and push Docker image + uses: actions/docker-build-push@v2 + with: + context: . + file: Dockerfile + push: true + registry: https://coastalcommits.com + repository: seaswimmerthefsh/discordeventlog + tags: latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9f7efed --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.11.0-alpine + +COPY src /src +COPY config.json.example /config.json +COPY pyproject.toml /pyproject.toml +COPY poetry.lock /poetry.lock + +RUN apk --no-cache add curl && curl -sSL https://seafsh.cc/go/poetry | python - && \ + cd /src && \ + /root/.local/bin/poetry install + +CMD ["python", "/src/main.py"] + +EXPOSE 8080