From 032a4504554fabe0c27a7d06ab70c2c825f5e78b Mon Sep 17 00:00:00 2001 From: KittenTM Date: Sat, 28 Feb 2026 00:48:38 +0100 Subject: [PATCH] hopefully make autobuild possible --- .forgejo/workflows/build.yml | 22 ++++++++++++++++++++++ dockerfile | 21 +++++++++++++++++++++ requirements.txt | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 .forgejo/workflows/build.yml create mode 100644 dockerfile create mode 100644 requirements.txt diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..1632da4 --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,22 @@ +name: backend + +on: + push: + branches: [ fg-actions ] + +jobs: + docker: + runs-on: docker + + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: login + run: echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USER" --password-stdin + + - name: build + run: docker build -t $DOCKER_USER/splatnet-backend:latest . + + - name: push + run: docker push $DOCKER_USER/splatnet-backend:latest \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..6ec5b14 --- /dev/null +++ b/dockerfile @@ -0,0 +1,21 @@ +FROM python:3.11-slim + +RUN apt-get update && apt-get install -y curl build-essential \ + && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ + && apt-get install -y nodejs \ + && npm install -g npm@latest \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +WORKDIR /app/judd +RUN npm ci + +WORKDIR /app + +CMD ["python", "main.py"] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2f1d865 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,33 @@ +annotated-doc==0.0.4 +annotated-types==0.7.0 +anyio==4.12.1 +argon2-cffi==25.1.0 +argon2-cffi-bindings==25.1.0 +certifi==2026.2.25 +cffi==2.0.0 +charset-normalizer==3.4.4 +click==8.3.1 +colorama==0.4.6 +cryptography==46.0.5 +fastapi==0.134.0 +greenlet==3.3.2 +h11==0.16.0 +httpcore==1.0.9 +httpx==0.28.1 +idna==3.11 +oead==1.2.9.post4 +psycopg2==2.9.11 +pycparser==3.0 +pydantic==2.12.5 +pydantic-settings==2.13.1 +pydantic_core==2.41.5 +python-dotenv==1.2.1 +python-multipart==0.0.22 +PyYAML==6.0.3 +requests==2.32.5 +SQLAlchemy==2.0.47 +starlette==0.52.1 +typing-inspection==0.4.2 +typing_extensions==4.15.0 +urllib3==2.6.3 +uvicorn==0.41.0 \ No newline at end of file