File size: 1,100 Bytes
dd0f381
 
 
 
25bdc61
 
dd0f381
 
c30ef89
dd0f381
25bdc61
 
dd0f381
25bdc61
 
dd0f381
c30ef89
dd0f381
 
 
 
 
25bdc61
dd0f381
 
c30ef89
 
 
 
 
 
 
 
1e955f1
dd0f381
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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"]