Spaces:
Runtime error
Runtime error
| FROM node:18-alpine | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apk add --no-cache git python3 py3-pip bash curl build-base g++ make | |
| # Clone Postiz repository | |
| RUN git clone https://github.com/gitroomhq/postiz-app.git . && git checkout main | |
| # Install npm dependencies with --ignore-scripts to skip native module compilation issues | |
| RUN npm install --legacy-peer-deps --ignore-scripts --no-audit && npm cache clean --force | |
| # Try to build (may fail partially but that's okay for some modules) | |
| RUN npm run build 2>&1 || true | |
| # Create necessary directories | |
| RUN mkdir -p /config /uploads | |
| # Expose port | |
| EXPOSE 5000 | |
| # Set environment variables | |
| ENV NODE_ENV=production | |
| ENV APP_PORT=5000 | |
| ENV MAIN_URL=http://localhost:5000 | |
| ENV FRONTEND_URL=http://localhost:5000 | |
| ENV NEXT_PUBLIC_BACKEND_URL=http://localhost:5000/api | |
| ENV JWT_SECRET=your-secret-key-change-in-production | |
| ENV IS_GENERAL=true | |
| ENV STORAGE_PROVIDER=local | |
| ENV UPLOAD_DIRECTORY=/uploads | |
| ENV DATABASE_URL=postgresql://user:password@localhost:5432/postiz | |
| ENV REDIS_URL=redis://localhost:6379 | |
| # Start the application | |
| CMD ["npm", "run", "start"] |