Spaces:
Running
on
A10G
Running
on
A10G
| # Use the base image with your launcher | |
| FROM thecooltechguy/comfyui_launcher AS launcher | |
| # Create a non-root user first | |
| RUN useradd -m -u 1000 user | |
| # Fix all permission issues for unknown images | |
| RUN chown -R user:user / || true | |
| # Install Nginx as root | |
| USER root | |
| RUN apt-get update && \ | |
| apt-get install -y nginx && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Configure Nginx to act as a reverse proxy | |
| RUN rm /etc/nginx/sites-enabled/default | |
| COPY nginx.conf /etc/nginx/sites-enabled/ | |
| # Ensure proper permissions for Nginx directories | |
| RUN chown -R user:user /var/lib/nginx /var/log/nginx /var/www/html | |
| # Switch back to the non-root user for running applications | |
| USER user | |
| COPY start.sh /start.sh | |
| RUN chmod +x /start.sh | |
| # Set the script as the entrypoint | |
| ENTRYPOINT ["/start.sh"] |