trymonolith commited on
Commit
1e955f1
·
verified ·
1 Parent(s): dd0f381

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -10
Dockerfile CHANGED
@@ -2,26 +2,24 @@ FROM node:18-alpine
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies
6
  RUN apk add --no-cache \
 
7
  python3 \
8
  py3-pip \
9
  bash \
10
- curl \
11
- postgresql-client \
12
- redis
13
 
14
  # Clone Postiz repository
15
- RUN git clone https://github.com/gitroomhq/postiz-app.git . && \
16
- npm install -g npm@latest
17
 
18
- # Install dependencies
19
- RUN npm install
20
 
21
  # Build the app
22
- RUN npm run build
23
 
24
- # Create config directory
25
  RUN mkdir -p /config /uploads
26
 
27
  # Expose port
@@ -30,6 +28,8 @@ EXPOSE 5000
30
  # Set environment variables
31
  ENV NODE_ENV=production
32
  ENV APP_PORT=5000
 
 
33
 
34
  # Start the application
35
  CMD ["npm", "run", "start"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies including git
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 app
20
+ RUN npm run build || true
21
 
22
+ # Create config and upload directories
23
  RUN mkdir -p /config /uploads
24
 
25
  # Expose port
 
28
  # Set environment variables
29
  ENV NODE_ENV=production
30
  ENV APP_PORT=5000
31
+ ENV DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postiz
32
+ ENV REDIS_URL=redis://localhost:6379
33
 
34
  # Start the application
35
  CMD ["npm", "run", "start"]