Feature: dockerized the project
This commit is contained in:
parent
2a2cac62d5
commit
7aa13eeb51
|
|
@ -0,0 +1,2 @@
|
|||
tech-assignment-data
|
||||
node_modules
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
FROM node:20-bookworm-slim
|
||||
LABEL authors="werring"
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY package*.json .
|
||||
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["npm", "run", "start:prod"]
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
services:
|
||||
api:
|
||||
build: .
|
||||
ports:
|
||||
- "3001:3000"
|
||||
command: "npm run start:dev"
|
||||
database:
|
||||
image: "mysql:8"
|
||||
command: --default-authentication-plugin=mysql_native_password
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: myfreight
|
||||
ports:
|
||||
- 13306:3306
|
||||
volumes:
|
||||
- "./database/lib:/var/lib/mysql"
|
||||
- "./database/entrypoint:/docker-entrypoint-initdb.d"
|
||||
Loading…
Reference in New Issue