add password

This commit is contained in:
goro 2026-05-05 18:06:47 +03:00
parent a62af21905
commit cffcb36b2a
3 changed files with 6 additions and 0 deletions

View File

@ -3,3 +3,6 @@ PUBLIC_WORKER_URL=https://r2-upload-worker.YOUR_SUBDOMAIN.workers.dev
# A random secret string — must match UPLOAD_SECRET set in the Worker
PUBLIC_UPLOAD_SECRET=change-me-to-something-random
# Password visitors must enter to access the upload page
PUBLIC_UPLOAD_PASSWORD=change-me-to-a-password

View File

@ -11,8 +11,10 @@ COPY . .
ARG PUBLIC_WORKER_URL
ARG PUBLIC_UPLOAD_SECRET
ARG PUBLIC_UPLOAD_PASSWORD
ENV PUBLIC_WORKER_URL=$PUBLIC_WORKER_URL
ENV PUBLIC_UPLOAD_SECRET=$PUBLIC_UPLOAD_SECRET
ENV PUBLIC_UPLOAD_PASSWORD=$PUBLIC_UPLOAD_PASSWORD
RUN pnpm run build

View File

@ -7,6 +7,7 @@
args:
PUBLIC_WORKER_URL: ${PUBLIC_WORKER_URL}
PUBLIC_UPLOAD_SECRET: ${PUBLIC_UPLOAD_SECRET}
PUBLIC_UPLOAD_PASSWORD: ${PUBLIC_UPLOAD_PASSWORD}
restart: unless-stopped
ports:
- "3001:80"