Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +15 -13
Dockerfile
CHANGED
|
@@ -2,33 +2,35 @@ FROM node:18-alpine
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install system dependencies including
|
| 6 |
-
RUN apk add --no-cache
|
| 7 |
-
git \
|
| 8 |
-
python3 \
|
| 9 |
-
py3-pip \
|
| 10 |
-
bash \
|
| 11 |
-
curl
|
| 12 |
|
| 13 |
# Clone Postiz repository
|
| 14 |
-
RUN git clone https://github.com/gitroomhq/postiz-app.git .
|
| 15 |
|
| 16 |
# Install npm dependencies
|
| 17 |
-
RUN npm install --legacy-peer-deps
|
| 18 |
|
| 19 |
-
# Build the
|
| 20 |
RUN npm run build || true
|
| 21 |
|
| 22 |
-
# Create
|
| 23 |
RUN mkdir -p /config /uploads
|
| 24 |
|
| 25 |
# Expose port
|
| 26 |
EXPOSE 5000
|
| 27 |
|
| 28 |
-
# Set environment variables
|
| 29 |
ENV NODE_ENV=production
|
| 30 |
ENV APP_PORT=5000
|
| 31 |
-
ENV
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
ENV REDIS_URL=redis://localhost:6379
|
| 33 |
|
| 34 |
# Start the application
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install system dependencies including build tools for canvas
|
| 6 |
+
RUN apk add --no-cache git python3 py3-pip bash curl build-base g++ make
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
# Clone Postiz repository
|
| 9 |
+
RUN git clone https://github.com/gitroomhq/postiz-app.git . && git checkout main
|
| 10 |
|
| 11 |
# Install npm dependencies
|
| 12 |
+
RUN npm install --legacy-peer-deps --no-audit && npm cache clean --force
|
| 13 |
|
| 14 |
+
# Build the application
|
| 15 |
RUN npm run build || true
|
| 16 |
|
| 17 |
+
# Create necessary directories
|
| 18 |
RUN mkdir -p /config /uploads
|
| 19 |
|
| 20 |
# Expose port
|
| 21 |
EXPOSE 5000
|
| 22 |
|
| 23 |
+
# Set environment variables for Postiz
|
| 24 |
ENV NODE_ENV=production
|
| 25 |
ENV APP_PORT=5000
|
| 26 |
+
ENV MAIN_URL=http://localhost:5000
|
| 27 |
+
ENV FRONTEND_URL=http://localhost:5000
|
| 28 |
+
ENV NEXT_PUBLIC_BACKEND_URL=http://localhost:5000/api
|
| 29 |
+
ENV JWT_SECRET=your-secret-key-change-in-production
|
| 30 |
+
ENV IS_GENERAL=true
|
| 31 |
+
ENV STORAGE_PROVIDER=local
|
| 32 |
+
ENV UPLOAD_DIRECTORY=/uploads
|
| 33 |
+
ENV DATABASE_URL=postgresql://user:password@localhost:5432/postiz
|
| 34 |
ENV REDIS_URL=redis://localhost:6379
|
| 35 |
|
| 36 |
# Start the application
|