docker builds
This commit is contained in:
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
node_modules
|
||||||
|
__pycache__
|
||||||
|
venv
|
||||||
16
Dockerfile.fastapi
Normal file
16
Dockerfile.fastapi
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
FROM python:3.12-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY server/py/fastapi_server/requirements.txt ./
|
||||||
|
RUN pip install --no-cache-dir r requirements.txt
|
||||||
|
|
||||||
|
# This one is necessary for the server
|
||||||
|
RUN apt install ffmpeg -y
|
||||||
|
|
||||||
|
COPY server/py/fastapi_server/ ./
|
||||||
|
|
||||||
|
ENV PORT=3000
|
||||||
|
ENV HOST=0.0.0.0
|
||||||
|
|
||||||
|
CMD ["fastapi","run","main.py"]
|
||||||
23
Dockerfile.nuxt
Normal file
23
Dockerfile.nuxt
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
FROM node:22-alpine AS build
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN corepack enable
|
||||||
|
|
||||||
|
COPY . /app/
|
||||||
|
|
||||||
|
RUN pnpm i
|
||||||
|
|
||||||
|
RUN pnpm build
|
||||||
|
|
||||||
|
FROM node:22-alpine
|
||||||
|
|
||||||
|
# Only `.output` folder is needed from the build stage
|
||||||
|
COPY --from=build /app/.output/ ./
|
||||||
|
|
||||||
|
# Change the port and host
|
||||||
|
ENV PORT=80
|
||||||
|
ENV HOST=0.0.0.0
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["node", "/app/server/index.mjs"]
|
||||||
3
docker-compose.yaml
Normal file
3
docker-compose.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user