Start the LeetCode daily question from the site
A "Today's LeetCode" button on the problem list (admin only) does what `usaco daily` does: it asks LeetCode for the daily question, runs the clone's lib/leetcode.py to import it into solving/ (statement, starter, driver.h and the examples as tests), commits it as "Start <slug>" and opens its solve page. A daily question already in the repo is only opened. The importer stays the CLI's one script rather than a Go copy of its driver generator, so the site image now has python3. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+4
-1
@@ -14,6 +14,9 @@
|
||||
# The runtime runs as uid 1000, not root. DATA_DIR (/data) must be writable by
|
||||
# it: with a bind mount, `chown 1000 <dir>` on the host. git is the server's
|
||||
# storage layer (internal/repo shells out to it); wget is for the healthcheck.
|
||||
# python3 runs the clone's lib/leetcode.py, the CLI's LeetCode importer, for
|
||||
# the "Today's LeetCode" button (internal/leetcode). It never runs solutions:
|
||||
# those go to the runner (Dockerfile.runner).
|
||||
# =============================================================================
|
||||
FROM node:22-alpine AS web
|
||||
WORKDIR /web
|
||||
@@ -33,7 +36,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/usacosite ./cmd/usacosite
|
||||
|
||||
FROM alpine:3.22
|
||||
RUN apk add --no-cache ca-certificates git wget \
|
||||
RUN apk add --no-cache ca-certificates git wget python3 \
|
||||
&& adduser -D -H -u 1000 app \
|
||||
&& mkdir /data && chown app /data
|
||||
COPY --from=build /out/usacosite /app/usacosite
|
||||
|
||||
Reference in New Issue
Block a user