From e324dac64ca8295f0e84c7987e92d76ce9001d8c Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 25 Nov 2023 04:19:50 -0500 Subject: [PATCH] Added an auto-building docker image to the repository --- .forgejo/workflows/docker-build.yml | 23 +++++++++++++++++++++++ Dockerfile | 14 ++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .forgejo/workflows/docker-build.yml create mode 100644 Dockerfile 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