mirror of
https://github.com/jaypyles/Scraperr.git
synced 2026-05-04 00:10:44 +00:00
wip: edit Dockerfile
This commit is contained in:
-15
@@ -12,17 +12,6 @@ COPY ./build/ /project/app/build
|
||||
WORKDIR /project/app
|
||||
RUN pdm install
|
||||
|
||||
# Build js dependencies
|
||||
FROM node:latest AS jsbuilder
|
||||
|
||||
WORKDIR /project/app
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install
|
||||
COPY public ./public
|
||||
COPY src ./src
|
||||
COPY tsconfig.json tailwind.config.js ./
|
||||
|
||||
# Create final image
|
||||
FROM python:3.10-slim
|
||||
|
||||
@@ -31,10 +20,6 @@ COPY --from=pybuilder /usr/local/lib/python3.10/site-packages /usr/local/lib/pyt
|
||||
COPY --from=pybuilder /usr/local/bin /usr/local/bin
|
||||
COPY --from=pybuilder /project/app /project/api
|
||||
|
||||
COPY --from=jsbuilder /usr/local/lib/node_modules /usr/local/lib/node_modules
|
||||
COPY --from=jsbuilder /usr/local/bin /usr/local/bin
|
||||
COPY --from=jsbuilder /project/app /project/app
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
WORKDIR /project/api
|
||||
|
||||
@@ -25,3 +25,8 @@ app.mount("/static", StaticFiles(directory="./build/static"), name="static")
|
||||
@app.get("/")
|
||||
def read_root():
|
||||
return FileResponse("./build/index.html")
|
||||
|
||||
|
||||
@app.get("/api/endpoint")
|
||||
async def test_endpoint():
|
||||
return {"hello": "world"}
|
||||
|
||||
Reference in New Issue
Block a user