Dockerlabs is done
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
services:
|
||||||
|
notes-app:
|
||||||
|
build: ./notes-app/
|
||||||
|
restart: always
|
||||||
|
notes-back:
|
||||||
|
build: ./notes-backend/
|
||||||
|
restart: always
|
||||||
|
nginx:
|
||||||
|
image: nginx:1.25.3-alpine-slim
|
||||||
|
volumes:
|
||||||
|
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
restart: always
|
||||||
|
depends_on:
|
||||||
|
- notes-app
|
||||||
|
- notes-back
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
FROM node:18-slim AS first_stage
|
||||||
|
WORKDIR /usr/local/app
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN npm i && npm cache clean --force
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build -- --prod
|
||||||
|
CMD ["npx","serve","-s","build"]
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
FROM node:18-slim
|
||||||
|
WORKDIR /usr/local/app
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm i && npm cache clean --force
|
||||||
|
COPY . .
|
||||||
|
CMD ["npm","start"]
|
||||||
Reference in New Issue
Block a user