-
Notifications
You must be signed in to change notification settings - Fork 95
Tournament Bracket Management #698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
13b68f2
13356bc
4f3c5a0
fcfff2a
5abd08e
25ab5bc
24fd13b
8ab3255
28ac9d2
2d22973
d0d475f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,61 @@ | ||||||
| # Use Rust official image as base | ||||||
| FROM rust:1.75-slim as builder | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: The "FromAsCasing" warning in Docker BuildKit occurs when the casing of 'FROM' and 'as' keywords in a Dockerfile do not match, such as FROM image as builder (uppercase FROM, lowercase 'as'). This is a build check rule for consistency and readability. To fix it, make the casing consistent: - Both uppercase: FROM debian:latest AS builder (recommended) - Or both lowercase: from debian:latest as builder This warning appears during builds with recent Docker versions using BuildKit (e.g., Docker 27+). It's non-blocking but improves Dockerfile quality. Use docker build --check . to validate. Example bad: FROM debian:latest as builder Warning: FromAsCasing: 'as' and 'FROM' keywords' casing do not match Citations:
🌐 Web query:
💡 Result: Dockerfile instructions like FROM and AS are not case-sensitive; they can be written in uppercase, lowercase, or mixed case and will parse correctly. However, the official convention is to use UPPERCASE for instructions to distinguish them from arguments (e.g., FROM image AS builder). Mixing cases within the same FROM ... AS instruction (e.g., FROM ... as builder) triggers a Docker build check warning (FromAsCasing) for readability, though it still builds successfully. All-lowercase or all-uppercase is acceptable and passes checks. Citations:
🌐 Web query:
💡 Result: Dockerfile best practices recommend consistent casing for FROM and AS keywords in multi-stage builds, and using all lowercase for stage names like "builder". Key guidelines from official Docker documentation: 1. Match casing between FROM/from and AS/as: Use both uppercase (FROM ... AS builder) or both lowercase (from ... as builder) for readability. Mixing cases (e.g., FROM ... as builder) triggers the FromAsCasing build check warning. 2. Stage names should be all lowercase: Names like "BuilderBase" violate the StageNameCasing rule; use "builder-base" or "builder" instead. This distinguishes stage identifiers from uppercase Dockerfile instructions. Stage names are case-insensitive in references (e.g., COPY --from=builder works regardless), but consistency is enforced. Examples: Good (uppercase keywords, lowercase stage): FROM debian:latest AS builder ... COPY --from=builder /app /app Good (lowercase keywords, lowercase stage): from debian:latest as builder ... copy --from=builder /app /app Bad (mixed keyword casing): FROM debian:latest as builder # Triggers FromAsCasing Bad (uppercase stage name): FROM alpine AS BuilderBase # Triggers StageNameCasing These rules are part of Docker's build checks (hadolint-style) to improve readability and maintainability. Multi-stage builds with a "builder" stage are a core best practice for minimizing final image size by separating build dependencies from runtime. Citations:
🏁 Script executed: cat -n backend/Dockerfile | head -10Repository: NOVUS-X/XLMate Length of output: 339 Change Mixing cases in Diff-FROM rust:1.75-slim as builder
+FROM rust:1.75-slim AS builder📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| # Set working directory | ||||||
| WORKDIR /app | ||||||
|
|
||||||
| # Install system dependencies | ||||||
| RUN apt-get update && apt-get install -y \ | ||||||
| pkg-config \ | ||||||
| libssl-dev \ | ||||||
| libpq-dev \ | ||||||
| && rm -rf /var/lib/apt/lists/* | ||||||
|
|
||||||
| # Copy Cargo files | ||||||
| COPY Cargo.toml Cargo.lock ./ | ||||||
|
|
||||||
| # Copy source code | ||||||
| COPY modules/ ./modules/ | ||||||
| COPY src/ ./src/ | ||||||
|
|
||||||
| # Build the application | ||||||
| RUN cargo build --release | ||||||
|
|
||||||
| # Runtime stage | ||||||
| FROM debian:bookworm-slim | ||||||
|
|
||||||
| # Install runtime dependencies | ||||||
| RUN apt-get update && apt-get install -y \ | ||||||
| libpq5 \ | ||||||
| ca-certificates \ | ||||||
| curl \ | ||||||
| && rm -rf /var/lib/apt/lists/* | ||||||
|
|
||||||
| # Create app user | ||||||
| RUN useradd -r -s /bin/false appuser | ||||||
|
|
||||||
| # Set working directory | ||||||
| WORKDIR /app | ||||||
|
|
||||||
| # Copy binary from builder | ||||||
| COPY --from=builder /app/target/release/api ./api | ||||||
|
|
||||||
| # Copy configuration files | ||||||
| COPY docker-compose.monitoring.yml ./ | ||||||
| COPY monitoring/ ./monitoring/ | ||||||
|
|
||||||
| # Change ownership | ||||||
| RUN chown -R appuser:appuser /app | ||||||
|
|
||||||
| # Switch to non-root user | ||||||
| USER appuser | ||||||
|
|
||||||
| # Expose port | ||||||
| EXPOSE 8080 | ||||||
|
|
||||||
| # Health check | ||||||
| HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ | ||||||
| CMD curl -f http://localhost:8080/health || exit 1 | ||||||
|
|
||||||
| # Run the application | ||||||
| CMD ["./api"] | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Is docker-compose v1 still preinstalled on GitHub Actions ubuntu-latest runners in 2026?💡 Result:
No, docker-compose v1 is not preinstalled on GitHub Actions ubuntu-latest runners in 2026. ubuntu-latest refers to Ubuntu 24.04, and official documentation lists only "Docker Compose v2" (e.g., version 2.38.2 or later). Docker Compose v1 was deprecated and removed from Ubuntu images starting in 2024, with announcements confirming its removal across all Ubuntu runners. Users must use "docker compose" (v2) or install v1 manually if needed.
Citations:
🏁 Script executed:
Repository: NOVUS-X/XLMate
Length of output: 1353
🏁 Script executed:
Repository: NOVUS-X/XLMate
Length of output: 292
Replace deprecated
docker-composev1 withdocker composev2.Docker Compose v1 is not available on ubuntu-latest runners (Ubuntu 24.04+). The workflow will fail using the
docker-composebinary; usedocker composeinstead. Additionally, replacesleep 30with a polling loop on the health endpoints to reduce flakiness.♻️ Proposed fix
- name: Start monitoring stack working-directory: backend run: | - docker-compose -f docker-compose.monitoring.yml up -d - sleep 30 + docker compose -f docker-compose.monitoring.yml up -d + for i in {1..30}; do + curl -fs http://localhost:9090/-/healthy && curl -fs http://localhost:3000/api/health && break + sleep 2 + done ... - name: Cleanup working-directory: backend run: | - docker-compose -f docker-compose.monitoring.yml down + docker compose -f docker-compose.monitoring.yml down📝 Committable suggestion
🤖 Prompt for AI Agents