TsukiOwO commited on
Commit
6d3cae0
·
1 Parent(s): bd00b0e

[update] 7860

Browse files
Files changed (3) hide show
  1. Dockerfile +3 -16
  2. app.py +0 -7
  3. docker-entrypoint.sh +0 -6
Dockerfile CHANGED
@@ -1,21 +1,8 @@
1
  FROM ghcr.io/firecrawl/playwright-service:latest
2
 
 
 
3
  ARG BASE_PATH=/usr/src/app
4
 
5
  RUN mkdir -p $BASE_PATH \
6
- && chmod 777 $BASE_PATH
7
-
8
- COPY app.py $BASE_PATH/app.py
9
- COPY docker-entrypoint.sh $BASE_PATH/docker-entrypoint.sh
10
- RUN chmod +x $BASE_PATH/docker-entrypoint.sh
11
-
12
- RUN apt update && apt install -y curl && apt-get clean && rm -rf /var/lib/apt/lists/*
13
-
14
- RUN useradd -m space
15
- USER space
16
- RUN curl -LsSf https://astral.sh/uv/install.sh | sh
17
- ENV PATH="/home/space/.local/bin:$PATH"
18
- RUN uv venv
19
- RUN uv pip install uvicorn fastapi
20
-
21
- ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]
 
1
  FROM ghcr.io/firecrawl/playwright-service:latest
2
 
3
+
4
+ ENV PORT=7860
5
  ARG BASE_PATH=/usr/src/app
6
 
7
  RUN mkdir -p $BASE_PATH \
8
+ && chmod 777 $BASE_PATH
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app.py DELETED
@@ -1,7 +0,0 @@
1
- from fastapi import FastAPI
2
-
3
- app = FastAPI()
4
-
5
- @app.get("/")
6
- async def root():
7
- return {"message": "Hello, FireCrawl Worker!"}
 
 
 
 
 
 
 
 
docker-entrypoint.sh DELETED
@@ -1,6 +0,0 @@
1
- #!/bin/bash
2
- # 啟動 uvicorn (背景)
3
- nohup uv run uvicorn app:app --host 0.0.0.0 --port 7860 &
4
-
5
- # 啟動 npm (前景,保持容器活著)
6
- exec npm start