Files
joel 2d9297d9a3 Dockerize project with client and backend support (#55)
* set redis backend url automatically for docker builds

* initial docker build config

* rename docker scripts

* fix script paths

* remove old Dockerfiles

* set vite proxy base url depending on mode

* docker build config for client/

* docker production build for client

* refactor docker files

* update nginx config to set maximum file size

* reduce docker image size

* fix demucs bug in docker

* fix proxy timeout

* add gpu capabality for api container

* add compose files for dev and prod

* add healthcheck for freqsplit-api

* add model checkpoints to api image

* set healthcheck retries to 24
2025-08-04 01:43:40 +05:30

28 lines
543 B
Docker

FROM node:20 AS builder
WORKDIR /app
# Copy and install dependencies
COPY client/package.json client/package-lock.json* ./
RUN npm install
# Copy the source code
COPY client/ .
# Build the app using docker mode env
ENV NODE_ENV=production
RUN npm run build -- --mode docker
# Stage 2: Serve with nginx
FROM nginx:stable-alpine AS production
# Copy built frontend from builder stage
COPY --from=builder /app/dist /usr/share/nginx/html
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]