containerized project

This commit is contained in:
Wilkozx 2024-08-04 18:49:28 +01:00
parent 184ec7196d
commit e2736d1c10
3 changed files with 47 additions and 0 deletions

13
backend/Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:14.15.4
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
EXPOSE 5000
CMD ["node", "index.js"]

21
docker-compose.yml Normal file
View File

@ -0,0 +1,21 @@
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
working_dir: /app
ports:
- "5000:5000"
volumes:
- ./backend:/app
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- ./frontend:/app
- ./frontend:/node_modules

13
frontend/Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:14.15.4
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["npm", "start"]