Add Docker deployment for ZimaOS
- Updated Dockerfile for local storage deployment (removed Firebase dependencies) - Created docker-compose.yml with persistent data volumes - Added deploy.sh script for automated deployment - Created DEPLOYMENT.md with ZimaOS deployment guide - Added .env.example for configuration template - Updated .gitignore to protect sensitive data - Fixed package.json to use port 7654 in production - Cleared all test user data for fresh deployment - Updated README with deployment section
This commit is contained in:
1 parent
0b9ab53266
commit
ad37bb57ae
8 files changed
+273
-27
No files matched your search
+11
-22
@@ -1,4 +1,4 @@
|
||||
FROM node:20-alpine
|
||||
FROM node:18-alpine
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
@@ -6,34 +6,23 @@ WORKDIR /app
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci
|
||||
# Install dependencies (production only)
|
||||
RUN npm ci --only=production
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Set environment variables
|
||||
ARG NEXT_PUBLIC_FIREBASE_API_KEY
|
||||
ARG NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN
|
||||
ARG NEXT_PUBLIC_FIREBASE_PROJECT_ID
|
||||
ARG NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET
|
||||
ARG NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID
|
||||
ARG NEXT_PUBLIC_FIREBASE_APP_ID
|
||||
ARG NEXT_PUBLIC_ENCRYPTION_KEY
|
||||
|
||||
ENV NEXT_PUBLIC_FIREBASE_API_KEY=$NEXT_PUBLIC_FIREBASE_API_KEY
|
||||
ENV NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=$NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN
|
||||
ENV NEXT_PUBLIC_FIREBASE_PROJECT_ID=$NEXT_PUBLIC_FIREBASE_PROJECT_ID
|
||||
ENV NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=$NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET
|
||||
ENV NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=$NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID
|
||||
ENV NEXT_PUBLIC_FIREBASE_APP_ID=$NEXT_PUBLIC_FIREBASE_APP_ID
|
||||
ENV NEXT_PUBLIC_ENCRYPTION_KEY=$NEXT_PUBLIC_ENCRYPTION_KEY
|
||||
|
||||
# Build the application
|
||||
RUN npm run build
|
||||
|
||||
# Expose port
|
||||
EXPOSE 3000
|
||||
# Create data directory for encrypted local storage
|
||||
RUN mkdir -p /app/data && chmod 755 /app/data
|
||||
|
||||
# Expose port 7654 (Capsule default port)
|
||||
EXPOSE 7654
|
||||
|
||||
# Set production environment
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Start the application
|
||||
CMD ["npm", "start"]
|
||||
Reference in new issue
Block a user