mirror of
https://github.com/altstackHQ/altstack-data.git
synced 2026-04-24 01:35:12 +02:00
🤖 Sentinel: Synchronization from aa-humaaan/thealtstack
This commit is contained in:
43
docker-deploy/affine/Dockerfile
Normal file
43
docker-deploy/affine/Dockerfile
Normal file
@@ -0,0 +1,43 @@
|
||||
# Dockerfile for AFFiNE
|
||||
# Stage 1: Build
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
# Install build dependencies
|
||||
RUN apk add --no-cache libc6-compat python3 make g++
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy dependency files
|
||||
COPY package.json yarn.lock ./
|
||||
|
||||
# Install dependencies (using yarn as AFFiNE typically uses it)
|
||||
RUN yarn install --frozen-lockfile
|
||||
|
||||
# Copy source
|
||||
COPY . .
|
||||
|
||||
# Build the app
|
||||
RUN yarn build
|
||||
|
||||
# Stage 2: Runtime
|
||||
FROM node:20-alpine
|
||||
|
||||
# Create non-root user
|
||||
RUN addgroup -S affine && adduser -S affine -G affine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install runtime dependencies (e.g., for image processing if needed)
|
||||
RUN apk add --no-cache libstdc++
|
||||
|
||||
# Copy built assets
|
||||
COPY --from=builder /app ./
|
||||
|
||||
# Set permissions
|
||||
RUN chown -R affine:affine /app
|
||||
|
||||
USER affine
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "dist/index.js"]
|
||||
Reference in New Issue
Block a user