update docker config
This commit is contained in:
23
Dockerfile
23
Dockerfile
@ -5,18 +5,21 @@ RUN apk update && apk add git
|
|||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
#RUN npm install typescript -g
|
RUN npm install typescript -g
|
||||||
|
|
||||||
# add folder if needs more
|
# add folder if needs more
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
# COPY config ./config
|
|
||||||
# COPY assets ./assets
|
|
||||||
COPY public ./public
|
COPY public ./public
|
||||||
|
|
||||||
COPY tsconfig.json ./tsconfig.json
|
COPY tsconfig.json ./tsconfig.json
|
||||||
|
COPY tsconfig.node.json ./tsconfig.node.json
|
||||||
ENV NODE_ENV=prod
|
COPY vite.config.ts ./vite.config.ts
|
||||||
# RUN npm run swagger
|
COPY tailwind.config.js ./tailwind.config.js
|
||||||
|
COPY postcss.config.js ./postcss.config.js
|
||||||
|
COPY eslint.config.mjs ./eslint.config.mjs
|
||||||
|
COPY .env.production ./.env.production
|
||||||
|
COPY .prettierrc ./.prettierrc
|
||||||
|
COPY index.html ./index.html
|
||||||
|
|
||||||
RUN npm run build:production
|
RUN npm run build:production
|
||||||
|
|
||||||
@ -26,15 +29,11 @@ FROM node:22-alpine
|
|||||||
COPY --from=base ./node_modules ./node_modules
|
COPY --from=base ./node_modules ./node_modules
|
||||||
COPY --from=base ./package.json ./package.json
|
COPY --from=base ./package.json ./package.json
|
||||||
COPY --from=base /dist /dist
|
COPY --from=base /dist /dist
|
||||||
# COPY --from=base /config /config
|
|
||||||
# COPY --from=base /config /dist/config
|
|
||||||
# COPY --from=base /assets /assets
|
|
||||||
COPY --from=base /src /src
|
COPY --from=base /src /src
|
||||||
COPY --from=base /public /public
|
COPY --from=base /public /public
|
||||||
|
|
||||||
# Expose required port
|
# Expose required port
|
||||||
# CMD ["npm", "run", "start"]
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
COPY --from=base /app/dist /usr/share/nginx/html
|
COPY --from=base /dist /usr/share/nginx/html
|
||||||
EXPOSE 80
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
@ -2,9 +2,10 @@ version: '3.9'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
api:
|
api:
|
||||||
image: app-dashboard:1.0.0
|
image: app-dashboard:1.0.1
|
||||||
|
restart: always
|
||||||
container_name: app-dashboard
|
container_name: app-dashboard
|
||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- '4040:4040' # Specify the exposed port, we will need this to access the app from local machine
|
- '4040:80' # Specify the exposed port, we will need this to access the app from local machine
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user