anuragshas commited on
Commit
e65297a
·
1 Parent(s): 3630260

fix: docker issues

Browse files
Files changed (2) hide show
  1. Dockerfile +9 -0
  2. docker-compose.prod.yml +3 -2
Dockerfile CHANGED
@@ -25,6 +25,15 @@ COPY --from=builder /app/dist /usr/share/nginx/html
25
  # Copy custom nginx configuration
26
  COPY nginx.conf /etc/nginx/nginx.conf
27
 
 
 
 
 
 
 
 
 
 
28
  # Expose port 80
29
  EXPOSE 80
30
 
 
25
  # Copy custom nginx configuration
26
  COPY nginx.conf /etc/nginx/nginx.conf
27
 
28
+ # Create nginx directories with proper permissions
29
+ RUN mkdir -p /var/cache/nginx/client_temp \
30
+ /var/cache/nginx/proxy_temp \
31
+ /var/cache/nginx/fastcgi_temp \
32
+ /var/cache/nginx/uwsgi_temp \
33
+ /var/cache/nginx/scgi_temp && \
34
+ chown -R nginx:nginx /var/cache/nginx && \
35
+ chmod -R 755 /var/cache/nginx
36
+
37
  # Expose port 80
38
  EXPOSE 80
39
 
docker-compose.prod.yml CHANGED
@@ -22,10 +22,10 @@ services:
22
  resources:
23
  limits:
24
  memory: 512M
25
- cpus: '0.5'
26
  reservations:
27
  memory: 256M
28
- cpus: '0.25'
29
  security_opt:
30
  - no-new-privileges:true
31
  read_only: true
@@ -33,3 +33,4 @@ services:
33
  - /tmp
34
  - /var/cache/nginx
35
  - /var/run
 
 
22
  resources:
23
  limits:
24
  memory: 512M
25
+ cpus: "0.5"
26
  reservations:
27
  memory: 256M
28
+ cpus: "0.25"
29
  security_opt:
30
  - no-new-privileges:true
31
  read_only: true
 
33
  - /tmp
34
  - /var/cache/nginx
35
  - /var/run
36
+ - /var/log/nginx