C2MV commited on
Commit
687c673
·
1 Parent(s): bd0c393

Fix: remove user=user from supervisord, simplify nginx config path, hardcode SurrealDB creds

Browse files
Files changed (4) hide show
  1. Dockerfile +3 -4
  2. Dockerfile.hf +3 -4
  3. supervisord.conf +2 -8
  4. supervisord.hf.conf +2 -8
Dockerfile CHANGED
@@ -106,7 +106,7 @@ ENV TIKTOKEN_CACHE_DIR=/app/tiktoken-cache
106
  # ==============================================================================
107
 
108
  # Copy HuggingFace-specific configuration files
109
- COPY nginx.hf.conf /etc/nginx/sites-available/default
110
  COPY supervisord.hf.conf /etc/supervisor/conf.d/supervisord.conf
111
  COPY start.sh /app/start.sh
112
  RUN chmod +x /app/start.sh
@@ -125,9 +125,8 @@ RUN chown -R 1000:1000 /app /data /var/log/supervisor /var/log/nginx \
125
  /var/lib/nginx /run /tmp/nginx /etc/nginx && \
126
  chown -R 1000:1000 /var/run 2>/dev/null || true
127
 
128
- # Configure nginx sites
129
- RUN rm -f /etc/nginx/sites-enabled/default && \
130
- ln -sf /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
131
 
132
  # ==============================================================================
133
  # Environment defaults for HuggingFace
 
106
  # ==============================================================================
107
 
108
  # Copy HuggingFace-specific configuration files
109
+ COPY nginx.hf.conf /etc/nginx/nginx.conf
110
  COPY supervisord.hf.conf /etc/supervisor/conf.d/supervisord.conf
111
  COPY start.sh /app/start.sh
112
  RUN chmod +x /app/start.sh
 
125
  /var/lib/nginx /run /tmp/nginx /etc/nginx && \
126
  chown -R 1000:1000 /var/run 2>/dev/null || true
127
 
128
+ # Remove default nginx configs that might conflict
129
+ RUN rm -rf /etc/nginx/sites-enabled /etc/nginx/sites-available /etc/nginx/conf.d
 
130
 
131
  # ==============================================================================
132
  # Environment defaults for HuggingFace
Dockerfile.hf CHANGED
@@ -106,7 +106,7 @@ ENV TIKTOKEN_CACHE_DIR=/app/tiktoken-cache
106
  # ==============================================================================
107
 
108
  # Copy HuggingFace-specific configuration files
109
- COPY nginx.hf.conf /etc/nginx/sites-available/default
110
  COPY supervisord.hf.conf /etc/supervisor/conf.d/supervisord.conf
111
  COPY start.sh /app/start.sh
112
  RUN chmod +x /app/start.sh
@@ -125,9 +125,8 @@ RUN chown -R 1000:1000 /app /data /var/log/supervisor /var/log/nginx \
125
  /var/lib/nginx /run /tmp/nginx /etc/nginx && \
126
  chown -R 1000:1000 /var/run 2>/dev/null || true
127
 
128
- # Configure nginx sites
129
- RUN rm -f /etc/nginx/sites-enabled/default && \
130
- ln -sf /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
131
 
132
  # ==============================================================================
133
  # Environment defaults for HuggingFace
 
106
  # ==============================================================================
107
 
108
  # Copy HuggingFace-specific configuration files
109
+ COPY nginx.hf.conf /etc/nginx/nginx.conf
110
  COPY supervisord.hf.conf /etc/supervisor/conf.d/supervisord.conf
111
  COPY start.sh /app/start.sh
112
  RUN chmod +x /app/start.sh
 
125
  /var/lib/nginx /run /tmp/nginx /etc/nginx && \
126
  chown -R 1000:1000 /var/run 2>/dev/null || true
127
 
128
+ # Remove default nginx configs that might conflict
129
+ RUN rm -rf /etc/nginx/sites-enabled /etc/nginx/sites-available /etc/nginx/conf.d
 
130
 
131
  # ==============================================================================
132
  # Environment defaults for HuggingFace
supervisord.conf CHANGED
@@ -1,11 +1,6 @@
1
  # ==============================================================================
2
  # Supervisord Configuration for HuggingFace Spaces
3
- # Manages all services in a single container:
4
- # 1. SurrealDB (database)
5
- # 2. FastAPI (backend API)
6
- # 3. Worker (background tasks)
7
- # 4. Next.js (frontend)
8
- # 5. Nginx (reverse proxy on port 7860)
9
  # ==============================================================================
10
 
11
  [supervisord]
@@ -13,13 +8,12 @@ nodaemon=true
13
  logfile=/dev/stdout
14
  logfile_maxbytes=0
15
  pidfile=/tmp/supervisord.pid
16
- user=user
17
 
18
  # ==============================================================================
19
  # SurrealDB - Database (starts first, priority 5)
20
  # ==============================================================================
21
  [program:surrealdb]
22
- command=surreal start --log info --user %(ENV_SURREAL_USER)s --pass %(ENV_SURREAL_PASSWORD)s --bind 0.0.0.0:8000 rocksdb:///data/surreal.db
23
  stdout_logfile=/dev/stdout
24
  stdout_logfile_maxbytes=0
25
  stderr_logfile=/dev/stderr
 
1
  # ==============================================================================
2
  # Supervisord Configuration for HuggingFace Spaces
3
+ # Manages all services in a single container
 
 
 
 
 
4
  # ==============================================================================
5
 
6
  [supervisord]
 
8
  logfile=/dev/stdout
9
  logfile_maxbytes=0
10
  pidfile=/tmp/supervisord.pid
 
11
 
12
  # ==============================================================================
13
  # SurrealDB - Database (starts first, priority 5)
14
  # ==============================================================================
15
  [program:surrealdb]
16
+ command=surreal start --log info --user root --pass root --bind 0.0.0.0:8000 rocksdb:///data/surreal.db
17
  stdout_logfile=/dev/stdout
18
  stdout_logfile_maxbytes=0
19
  stderr_logfile=/dev/stderr
supervisord.hf.conf CHANGED
@@ -1,11 +1,6 @@
1
  # ==============================================================================
2
  # Supervisord Configuration for HuggingFace Spaces
3
- # Manages all services in a single container:
4
- # 1. SurrealDB (database)
5
- # 2. FastAPI (backend API)
6
- # 3. Worker (background tasks)
7
- # 4. Next.js (frontend)
8
- # 5. Nginx (reverse proxy on port 7860)
9
  # ==============================================================================
10
 
11
  [supervisord]
@@ -13,13 +8,12 @@ nodaemon=true
13
  logfile=/dev/stdout
14
  logfile_maxbytes=0
15
  pidfile=/tmp/supervisord.pid
16
- user=user
17
 
18
  # ==============================================================================
19
  # SurrealDB - Database (starts first, priority 5)
20
  # ==============================================================================
21
  [program:surrealdb]
22
- command=surreal start --log info --user %(ENV_SURREAL_USER)s --pass %(ENV_SURREAL_PASSWORD)s --bind 0.0.0.0:8000 rocksdb:///data/surreal.db
23
  stdout_logfile=/dev/stdout
24
  stdout_logfile_maxbytes=0
25
  stderr_logfile=/dev/stderr
 
1
  # ==============================================================================
2
  # Supervisord Configuration for HuggingFace Spaces
3
+ # Manages all services in a single container
 
 
 
 
 
4
  # ==============================================================================
5
 
6
  [supervisord]
 
8
  logfile=/dev/stdout
9
  logfile_maxbytes=0
10
  pidfile=/tmp/supervisord.pid
 
11
 
12
  # ==============================================================================
13
  # SurrealDB - Database (starts first, priority 5)
14
  # ==============================================================================
15
  [program:surrealdb]
16
+ command=surreal start --log info --user root --pass root --bind 0.0.0.0:8000 rocksdb:///data/surreal.db
17
  stdout_logfile=/dev/stdout
18
  stdout_logfile_maxbytes=0
19
  stderr_logfile=/dev/stderr