Dockerlabs is done

This commit is contained in:
Daniil Doroshenko
2024-04-07 19:26:44 +00:00
parent a5e1343a53
commit 56a5c2fd21
3 changed files with 31 additions and 0 deletions
+17
View File
@@ -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
+8
View File
@@ -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"]
+6
View File
@@ -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"]