Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
4e7ab26
feat: v2 refactor base
FYWinds Feb 19, 2026
05a5d20
fix: streamline dev dependencies format and add diagnostic settings f…
FYWinds Feb 19, 2026
bfc0369
feat: added user based rate limiting
FYWinds Feb 19, 2026
867512b
feat: better schema
FYWinds Feb 21, 2026
d942607
feat: Refactor management and pool modules, add market router, and en…
FYWinds Feb 22, 2026
ab7eda4
feat: add item response type and force recalc
FYWinds Feb 22, 2026
b4e40c0
feat: add item mapping
FYWinds Feb 24, 2026
788219f
feat: add beta item submission
FYWinds Feb 27, 2026
0b88736
feat: implement CI/CD pipeline, enhance Docker setup, and update depl…
FYWinds Feb 27, 2026
3e2502e
feat: add Docker Buildx setup step in CI/CD pipeline
FYWinds Feb 28, 2026
6b1088d
feat: move image name setup to a dedicated step in CI/CD pipeline
FYWinds Feb 28, 2026
469d90f
feat: update .gitignore to include README.md and add new README.md file
FYWinds Feb 28, 2026
629e584
chore: update image to 469d90f0989d72259750348643b7a5209843e898
github-actions[bot] Feb 28, 2026
e55b300
fix: update submodule URL to use HTTPS instead of SSH
FYWinds Feb 28, 2026
ac6afd4
fix: use sync wave to control dep
FYWinds Feb 28, 2026
76ff092
feat: refactor database configuration and add computed fields for DSNs
FYWinds Feb 28, 2026
1e98f97
chore: update image to 76ff09226de596174e79eb58ab9bbd2a82f7a6c6
github-actions[bot] Feb 28, 2026
446c971
fix: add Redis configuration and update PostgreSQL environment variab…
FYWinds Feb 28, 2026
3732634
feat: add step to delete old container images in deployment workflow
FYWinds Feb 28, 2026
e095daf
fix: specify package name for old image deletion in deployment workflow
FYWinds Feb 28, 2026
52b123d
chore: update image to e095dafce5ea52872134f5daa69c7d995c71dfd3
github-actions[bot] Feb 28, 2026
6ec1e01
fix: add --no-dev flag to migration command for production compatibility
FYWinds Feb 28, 2026
10d280d
fix: add user and group for application execution in Dockerfile
FYWinds Feb 28, 2026
4ab38f8
chore: update image to 10d280d8ddfa5baeccff65de73a36e004676665d
github-actions[bot] Feb 28, 2026
0e9fa0a
fix: increase minimum versions to keep for old images in deployment w…
FYWinds Feb 28, 2026
4bc89c7
chore: update image to 0e9fa0a6d5bb89191071c8fbd73d944c0a1bb126
github-actions[bot] Feb 28, 2026
fd5e457
fix: set UV_NO_CACHE environment variable for improved caching behavior
FYWinds Feb 28, 2026
aae8082
chore: update image to fd5e457f9e9b298907fac79d58a001ca35dddc78
github-actions[bot] Feb 28, 2026
9492100
fix: update user and group IDs for consistency in Dockerfile
FYWinds Feb 28, 2026
01d3040
chore: update image to 9492100e84457382ac84ee7f1b8f8b2e1e4f46ee
github-actions[bot] Feb 28, 2026
4abfd72
feat: add delete and clear functionality for beta items
FYWinds Mar 1, 2026
a106f22
chore: update image to 4abfd72ed3612430919c3acc8a9370a32ba807cc
github-actions[bot] Mar 1, 2026
104f749
fix: service handler name causing recursion error
FYWinds Mar 1, 2026
cbd4e1a
chore: update image to 104f7494f78660b26b54925300f142ba871440b0
github-actions[bot] Mar 1, 2026
5fd2d1d
feat: enhance item submission handling and validation for beta items
FYWinds Mar 1, 2026
574ba85
fix: reduce cache expiration time for beta items list
FYWinds Mar 1, 2026
04315f1
chore: update image to 574ba852f9136cdb77cdb92ce2e33cb684baadd8
github-actions[bot] Mar 1, 2026
d83720a
fix: correct item validity checks for gear and stats presence
FYWinds Mar 1, 2026
05b3201
chore: update image to d83720affedcd7ca8fca47d50140579138bb3bcc
github-actions[bot] Mar 1, 2026
8596d48
fix: simplify item validity check for unidentified gear identifications
FYWinds Mar 1, 2026
ecf1b38
chore: update image to 8596d481c9b1c827d52f7ab874065b34712e6a7e
github-actions[bot] Mar 1, 2026
1ac2c36
fix: add debug logging for disallowed submission versions
FYWinds Mar 1, 2026
343f8de
chore: update image to 1ac2c36b70675c8c0271c0a2c97728e0cb61c9f5
github-actions[bot] Mar 1, 2026
b6d94e6
fix: correct allowed version format in item submission
FYWinds Mar 1, 2026
5bd765d
chore: update image to b6d94e674e11cdc3dcf6453ffbdcebc4f738f619
github-actions[bot] Mar 1, 2026
1747e7c
refactor: remove unused gear type checks in item validity
FYWinds Mar 1, 2026
240b379
chore: update image to 1747e7c62035ed2dd64176f7f63faa2029bc3aab
github-actions[bot] Mar 1, 2026
e3d81b7
fix: update allowed version list for item submissions
FYWinds Mar 1, 2026
12f7df3
chore: update image to e3d81b70bc888f585ed00c07c931afb6b99cc22c
github-actions[bot] Mar 1, 2026
79b0879
fix: add forwarded-allow-ips option to FastAPI run command
FYWinds Mar 1, 2026
324b874
chore: update image to 79b08791bb0b4ec1e2246b6a6fefe79b82d507dc
github-actions[bot] Mar 1, 2026
1803e0b
feat: integrate dynamic allowed versions configuration for item submi…
FYWinds Mar 2, 2026
8df0459
chore: update image to 1803e0b2f2759638cef43f6aa4801029839cd31c
github-actions[bot] Mar 2, 2026
a0b7499
fix: removed configmap in kustomization
FYWinds Mar 2, 2026
4b9b803
feat: add logging for loaded beta configuration allowed versions
FYWinds Mar 2, 2026
8fc3d82
chore: update image to 4b9b803f84ac647399fbee60fa366ad95a39e2ee
github-actions[bot] Mar 2, 2026
49e596b
fix: correct attribute name for beta allowed versions in BetaConfig
FYWinds Mar 2, 2026
34ec2af
chore: update image to 49e596b1446221014ef0291ae3f37d56fd1cb014
github-actions[bot] Mar 2, 2026
01113c3
fix: update old image deletion settings in deploy workflow
FYWinds Mar 2, 2026
cc0a2c0
chore: increase line length limit in Ruff configuration
FYWinds Mar 4, 2026
296140a
fix: update PostgreSQL credentials in docker-compose
FYWinds Mar 4, 2026
a156cf5
feat: enhance beta item management with patching and filtering capabi…
FYWinds Mar 4, 2026
befd0aa
fix: remove unnecessary min-versions-to-keep parameter from image del…
FYWinds Mar 4, 2026
58ae35c
fix: remove delete-only-untagged-versions parameter from image deleti…
FYWinds Mar 4, 2026
c5161b6
chore: update image to 58ae35c0b924b4190bcb228f2009623a305f2337
github-actions[bot] Mar 4, 2026
88bbc7c
fix: merge existing gear powders into new item submissions
FYWinds Mar 4, 2026
9fde573
fix: remove old image deletion step from deployment workflow
FYWinds Mar 4, 2026
4d405e8
chore: update image to 9fde573539b021c8bec626ed16d6d903bbabdcaa
github-actions[bot] Mar 4, 2026
4a074d1
feat: added beta ingredient endpoints
FYWinds Mar 8, 2026
3ee9cd9
chore: update image to 4a074d114b1a10c62d67235fa019d695fce5bd6d
github-actions[bot] Mar 8, 2026
d8ee9ea
feat: add debug endpoint to fix items with weird names
FYWinds Mar 9, 2026
c81138f
chore: update image to d8ee9ea1f19d2d6587eea9b73e05cf04aa77904b
github-actions[bot] Mar 9, 2026
24e0b31
fix: correct endpoint path and enhance item fixing logic
FYWinds Mar 9, 2026
289127f
chore: update image to 24e0b31d4dcd0b1ac8d984fe741584556a6b8703
github-actions[bot] Mar 9, 2026
102d438
feat: Implement raid gambits feature with submission and consensus ca…
FYWinds Apr 8, 2026
6989578
fix: update ruff check and format commands to target 'app' directory
FYWinds Apr 8, 2026
70fcdd0
fix: refine score delta calculation and improve logging format
FYWinds Apr 8, 2026
c15b668
fix: remove ruff format check from CI workflow
FYWinds Apr 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .dev/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
services:
db:
image: postgres:15-alpine
environment:
POSTGRES_DB: wcs_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "127.0.0.1:5432:5432"
restart: unless-stopped

redis:
image: redis:7-alpine
ports:
- "127.0.0.1:6379:6379"
restart: unless-stopped
63 changes: 63 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

on:
push:
branches: [dev]
tags: ["v*"]
pull_request:
branches: [dev, master]

env:
REGISTRY: ghcr.io

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- run: uv sync --locked
- run: uv run ruff check app

build-and-push:
needs: lint
if: github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/wynnsource-server
tags: |
type=sha,prefix=dev-,enable=${{ github.ref == 'refs/heads/dev' }}
type=raw,value=dev-latest,enable=${{ github.ref == 'refs/heads/dev' }}
type=semver,pattern={{version}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
33 changes: 33 additions & 0 deletions .github/workflows/ghcr-cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: GHCR Cleanup

on:
schedule:
- cron: "0 3 * * 0" # Every Sunday at 03:00 UTC
workflow_dispatch:

jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Clean up dev images
uses: snok/container-retention-policy@v3
with:
account: ${{ github.repository_owner }}
token: ${{ secrets.GITHUB_TOKEN }}
image-names: wynnsource-server
cut-off: 7 days ago UTC
keep-n-most-recent: 5
filter-tags: "dev-*"
skip-tags: "dev-latest"
image-tags: "!latest"

- name: Clean up untagged manifests
uses: snok/container-retention-policy@v3
with:
account: ${{ github.repository_owner }}
token: ${{ secrets.GITHUB_TOKEN }}
image-names: wynnsource-server
cut-off: 1 day ago UTC
untagged-only: true
14 changes: 12 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ coverage.xml
.hypothesis/
.pytest_cache/
cover/
cov.xml

# Translations
*.mo
Expand Down Expand Up @@ -194,6 +195,15 @@ pyrightconfig.json

# End of https://www.toptal.com/developers/gitignore/api/python,visualstudiocode

# Custom
### Custom additions below ###
# local sqlite test databases
*.sqlite3
.python-version # Python version file for uv
# Python version file for uv
.python-version
# Generated files, such as protobuf generated code
generated/*
!generated/wynnsource
!generated/pyproject.toml
!generated/README.md
generated/wynnsource/*
!generated/wynnsource/__init__.py
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "schema"]
path = schema
url = https://github.com/WynnSource/schema.git
branch = main
44 changes: 22 additions & 22 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "App Debug",
"type": "debugpy",
"request": "launch",
"module": "uvicorn",
"args": [
"app.main:app",
"--reload"
],
"jinja": true,
"justMyCode": false,
"env": {
"WCS_ADMIN_TOKEN": "local-test-token"
},
}
]
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "App Debug",
"type": "debugpy",
"request": "launch",
"module": "uvicorn",
"args": [
"app.main:app",
"--reload"
],
"jinja": false,
"justMyCode": false,
"env": {
"WCS_ADMIN_TOKEN": "wcsadmin"
},
}
]
}
72 changes: 43 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
# Use a Python image with uv pre-installed
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim

# Install the project into `/app`
WORKDIR /app

# Enable bytecode compilation
ENV UV_COMPILE_BYTECODE=1

# Copy from the cache instead of linking since it's a mounted volume
ENV UV_LINK_MODE=copy

# Install the project's dependencies using the lockfile and settings
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --locked --no-install-project --no-dev

# Then, add the rest of the project source code and install it
# Installing separately from its dependencies allows optimal layer caching
COPY . /app
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked --no-dev

# Place executables in the environment at the front of the path
ENV PATH="/app/.venv/bin:$PATH"

# Run the FastAPI application by default
CMD fastapi run
FROM bufbuild/buf:1.66.0 AS buf_installer

# Use a Python image with uv pre-installed
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim

# Install the project into `/app`
WORKDIR /app
COPY . /app

# Copy the buf binary from the buf_installer stage and make it executable
COPY --from=buf_installer /usr/local/bin/buf /usr/local/bin/buf

RUN chmod +x /usr/local/bin/buf
RUN buf generate --template buf.gen.yaml

# Enable bytecode compilation
ENV UV_COMPILE_BYTECODE=1

# Copy from the cache instead of linking since it's a mounted volume
ENV UV_LINK_MODE=copy

# Install the project's dependencies using the lockfile and settings
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --locked --no-install-project --no-dev

RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked --no-dev

# Place executables in the environment at the front of the path
ENV PATH="/app/.venv/bin:$PATH"

RUN addgroup --system --gid 1000 wynnsource && adduser --system --uid 1000 --ingroup wynnsource wynnsource
RUN chown -R 1000:1000 /app

ENV UV_NO_CACHE=1

USER 1000

# Run the FastAPI application
EXPOSE 8000
CMD fastapi run --forwarded-allow-ips="127.0.0.1,10.0.0.0/8,[::1]"

Check warning on line 43 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 43 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
Loading
Loading