xassad / Dockerfile
3nd1f's picture
Update Dockerfile
a5e4d81 verified
Raw History Blame Contribute Delete
800 Bytes
# Use official 3x-ui image as base
FROM ghcr.io/mhsanaei/3x-ui:latest
# Install supervisor (lightweight process manager)
RUN apk add --no-cache supervisor
# Create required dirs
RUN mkdir -p /var/log/supervisor /etc/supervisor/conf.d
# Hugging Face requires port 7860
ENV PORT=7860
# Change x-ui panel port to 7860
# (default is 2053)
RUN sed -i 's/"port": *2053/"port": 7860/g' /etc/x-ui/config.json || true
# Supervisor config
RUN echo '[supervisord]\n\
nodaemon=true\n\
logfile=/var/log/supervisor/supervisord.log\n\
\n\
[program:xui]\n\
command=/app/x-ui\n\
autostart=true\n\
autorestart=true\n\
stdout_logfile=/dev/stdout\n\
stderr_logfile=/dev/stderr\n\
' > /etc/supervisor/conf.d/supervisord.conf
EXPOSE 7860
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]