OcrStep bileşeninde BASE_URL kontrolü güncellendi; Dockerfile ve docker-compose.yml dosyaları eklendi; geliştirme ve üretim ortamları için yapılandırmalar oluşturuldu.
This commit is contained in:
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
# syntax=docker/dockerfile:1.6
|
||||
|
||||
ARG NODE_VERSION=20
|
||||
|
||||
FROM node:${NODE_VERSION}-alpine AS base
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
|
||||
FROM base AS dev
|
||||
ENV NODE_ENV=development
|
||||
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "5173"]
|
||||
|
||||
FROM base AS build
|
||||
ARG VITE_API_BASE_URL=http://localhost:4000
|
||||
ENV VITE_API_BASE_URL=${VITE_API_BASE_URL}
|
||||
RUN npm run build
|
||||
|
||||
FROM node:${NODE_VERSION}-alpine AS prod
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
COPY package.json package-lock.json ./
|
||||
COPY --from=base /app/node_modules ./node_modules
|
||||
COPY --from=build /app/dist ./dist
|
||||
EXPOSE 4173
|
||||
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "4173"]
|
||||
Reference in New Issue
Block a user