feat(core): rebrand to @lossless.zone/objectstorage
- Rename from @lossless.zone/s3container to @lossless.zone/objectstorage - Replace @push.rocks/smarts3 with @push.rocks/smartstorage - Change env var prefix from S3_ to OBJST_ - Rename S3Container class to ObjectStorageContainer - Update web component prefix from s3c- to objst- - Update UI labels, CLI flags, documentation, and Docker config
This commit is contained in:
54
Dockerfile
Normal file
54
Dockerfile
Normal file
@@ -0,0 +1,54 @@
|
||||
# gitzone dockerfile_service
|
||||
## STAGE 1 // BUILD frontend bundle
|
||||
FROM --platform=linux/amd64 node:22-alpine AS build
|
||||
|
||||
# Install pnpm
|
||||
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Use verdaccio registry (hosts private packages and proxies public ones)
|
||||
RUN npm config set registry https://verdaccio.lossless.digital/
|
||||
|
||||
# Install dependencies first (better caching)
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN pnpm install
|
||||
|
||||
# Copy source and build
|
||||
COPY npmextra.json ./
|
||||
COPY html/ ./html/
|
||||
COPY ts_web/ ./ts_web/
|
||||
COPY ts_interfaces/ ./ts_interfaces/
|
||||
COPY ts_bundled/ ./ts_bundled/
|
||||
RUN pnpm run build
|
||||
|
||||
## STAGE 2 // production runtime with Deno
|
||||
FROM alpine:edge AS final
|
||||
|
||||
# Install Deno and minimal runtime dependencies
|
||||
RUN apk add --no-cache \
|
||||
deno \
|
||||
ca-certificates \
|
||||
tini \
|
||||
gcompat \
|
||||
libstdc++
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy only what Deno needs at runtime
|
||||
COPY deno.json ./
|
||||
COPY mod.ts ./
|
||||
COPY ts/ ./ts/
|
||||
COPY ts_interfaces/ ./ts_interfaces/
|
||||
COPY --from=build /app/ts_bundled/bundle.ts ./ts_bundled/bundle.ts
|
||||
|
||||
# Pre-cache Deno dependencies
|
||||
RUN deno cache mod.ts
|
||||
|
||||
# Create storage directory
|
||||
RUN mkdir -p /data
|
||||
|
||||
EXPOSE 9000 3000
|
||||
VOLUME ["/data"]
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD ["deno", "run", "--allow-all", "mod.ts", "server"]
|
||||
Reference in New Issue
Block a user