Add skeleton: config, migrations, startup sweep, two listeners
Step 1 of the build order in docs/decisions.md. Boots, applies migrations before serving, and serves a health check and an empty admin page. - 001_init.sql is the full schema from docs/spec.md, including the check constraints and indexes the old app lacked - The startup sweep fails submissions left mid-conversion by a restart; an in-process goroutine dies with the process and those rows would otherwise say converting forever - Admin is Basic Auth from env on its own listener, fatal at startup when ADMIN_PASSWORD is unset
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
FROM golang:1.24-alpine AS build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -o /levyraati .
|
||||
|
||||
FROM alpine:3.21
|
||||
# yt-dlp rots against YouTube, so it is installed unpinned at build time and updated by rebuilding.
|
||||
RUN apk add --no-cache ffmpeg python3 py3-pip ca-certificates \
|
||||
&& pip install --break-system-packages --no-cache-dir -U yt-dlp
|
||||
COPY --from=build /levyraati /usr/local/bin/levyraati
|
||||
ENV STORAGE_DIR=/storage
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["levyraati"]
|
||||
Reference in New Issue
Block a user