Spaces:
Running
Running
File size: 1,089 Bytes
59f0cca |
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 38 39 40 41 42 |
FROM semibit/render-farm:latest
USER root
# Expose ports
EXPOSE 7860 3000 8083
RUN mkdir /app || true
RUN chown 1000 /app
COPY --chown=1000 . /app
# Ensure writable directories
RUN mkdir -p /app/public /app/out /app/frames /app/uploads || true
RUN chmod -R 777 /app/public /app/out /app/uploads /app/frames || true
RUN chmod 777 /app/index.html || true
RUN mkdir -p /tmp/client_body /tmp/proxy_temp /tmp/fastcgi_temp /tmp/uwsgi_temp /tmp/scgi_temp && chmod -R 777 /tmp || true
RUN chmod -R 777 /var || true
RUN chmod -R 777 /app/node_modules/.cache || true
# Build app
WORKDIR /app
# RUN npm run bundle || true
# RUN npm run skip-font-warn || true
# Copy nginx config and start script
COPY --chown=1000 nginx.conf /etc/nginx/nginx.conf
COPY --chown=1000 start.sh /app/start.sh
RUN chmod +x /app/start.sh
# Ensure nginx runs as root
RUN sed -i 's/^user .*;/user root;/' /etc/nginx/nginx.conf || true
# Set up Xvfb virtual display environment variable
ENV DISPLAY=:99
# Start Xvfb and then your app
USER 1000
CMD ["sh", "/app/start.sh"]
|