Subham9126 commited on
Commit
3968145
·
verified ·
1 Parent(s): 2d9cc6a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -9
Dockerfile CHANGED
@@ -1,18 +1,23 @@
1
  FROM localstack/localstack:latest
2
 
3
- # Install Nginx to handle the port routing
4
  USER root
5
- RUN apt-get update && apt-get install -y nginx supervisord
6
 
7
- # Copy your Nginx config and Supervisor config
 
 
 
 
 
 
 
 
 
 
8
  COPY nginx.conf /etc/nginx/sites-available/default
9
- COPY supervisord.conf /etc/supervisord.conf
10
 
11
- # Set LocalStack to use persistence (crucial for HF)
12
  ENV PERSISTENCE=1
13
- ENV LOCALSTACK_HOST=0.0.0.0
14
-
15
- # HF Spaces requires 7860
16
  EXPOSE 7860
17
 
18
- CMD ["/usr/bin/supervisord"]
 
 
1
  FROM localstack/localstack:latest
2
 
 
3
  USER root
 
4
 
5
+ # 1. Install Nginx and Supervisor (Correct package name)
6
+ # 2. Install Node.js & n8n
7
+ RUN apt-get update && \
8
+ apt-get install -y nginx supervisor curl && \
9
+ curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
10
+ apt-get install -y nodejs && \
11
+ npm install -g n8n && \
12
+ apt-get clean
13
+
14
+ # Copy your config files (Make sure these are in your repo root!)
15
+ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
16
  COPY nginx.conf /etc/nginx/sites-available/default
 
17
 
18
+ # Set environment for LocalStack
19
  ENV PERSISTENCE=1
 
 
 
20
  EXPOSE 7860
21
 
22
+ # Start Supervisor (it will manage LocalStack, n8n, and Nginx)
23
+ CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"]