remote-rdr / Dockerfile
shiveshnavin's picture
U
6c23657
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"]