tfrere HF Staff commited on
Commit
113fc92
·
1 Parent(s): bb26eda

fix: Permissions for runtime Notion import

Browse files

- Pre-install notion-importer deps during build
- Remove npm install from runtime (already done)
- Set 777 permissions on /app for runtime rebuild
- Create /var/lib/nginx/body with proper permissions
- Fix EACCES errors for both npm and nginx

Files changed (2) hide show
  1. Dockerfile +6 -5
  2. app/package.json +0 -0
Dockerfile CHANGED
@@ -32,8 +32,9 @@ RUN if [ "$ENABLE_LATEX_CONVERSION" = "true" ]; then \
32
  echo "⏭️ LaTeX importer disabled - skipping..."; \
33
  fi
34
 
 
35
  # Note: Notion import is done at RUNTIME (not build time) to access secrets
36
- # See entrypoint.sh for the import logic
37
 
38
  # Ensure `public/data` is a real directory with real files (not a symlink)
39
  # This handles the case where `public/data` is a symlink in the repo, which
@@ -61,10 +62,10 @@ COPY nginx.conf /etc/nginx/nginx.conf
61
  COPY entrypoint.sh /entrypoint.sh
62
  RUN chmod +x /entrypoint.sh
63
 
64
- # Create necessary directories and set permissions for nginx
65
- RUN mkdir -p /var/cache/nginx /var/run /var/log/nginx && \
66
- chmod -R 777 /var/cache/nginx /var/run /var/log/nginx /etc/nginx/nginx.conf && \
67
- chmod -R 755 /app/dist
68
 
69
  # Expose port 8080
70
  EXPOSE 8080
 
32
  echo "⏭️ LaTeX importer disabled - skipping..."; \
33
  fi
34
 
35
+ # Pre-install notion-importer dependencies (for runtime import)
36
  # Note: Notion import is done at RUNTIME (not build time) to access secrets
37
+ RUN cd scripts/notion-importer && npm install && cd ../..
38
 
39
  # Ensure `public/data` is a real directory with real files (not a symlink)
40
  # This handles the case where `public/data` is a symlink in the repo, which
 
62
  COPY entrypoint.sh /entrypoint.sh
63
  RUN chmod +x /entrypoint.sh
64
 
65
+ # Create necessary directories and set permissions
66
+ RUN mkdir -p /var/cache/nginx /var/run /var/log/nginx /var/lib/nginx/body && \
67
+ chmod -R 777 /var/cache/nginx /var/run /var/log/nginx /var/lib/nginx /etc/nginx/nginx.conf && \
68
+ chmod -R 777 /app
69
 
70
  # Expose port 8080
71
  EXPOSE 8080
app/package.json CHANGED
Binary files a/app/package.json and b/app/package.json differ