Subham9126 commited on
Commit
03c389c
·
verified ·
1 Parent(s): 283fe23

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -11
Dockerfile CHANGED
@@ -1,23 +1,24 @@
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"]
 
1
+ # Use the official Microsoft image which has Chromium pre-installed
2
+ FROM mcr.microsoft.com/playwright:v1.50.0-jammy
3
 
4
  USER root
5
+ WORKDIR /app
6
 
7
+ # 1. Install Node.js, Nginx, and Supervisor
8
+ RUN apt-get update && apt-get install -y curl nginx supervisor && \
 
 
9
  curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
10
  apt-get install -y nodejs && \
 
11
  apt-get clean
12
 
13
+ # 2. Install the MCP Server globally
14
+ RUN npm install -g @modelcontextprotocol/server-playwright
15
+
16
+ # 3. Copy your local config files (Supervisord & Nginx)
17
  COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
18
  COPY nginx.conf /etc/nginx/sites-available/default
19
 
20
+ # 4. Critical: Ensure Playwright is ready for headless mode
21
+ RUN npx playwright install chromium
 
22
 
23
+ EXPOSE 7860
24
  CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"]