feat: added bind mounts to docker-compose.yml file for hot reload
This commit is contained in:
@@ -5,6 +5,7 @@ FROM node
|
|||||||
# Create App Directory
|
# Create App Directory
|
||||||
RUN mkdir -p /usr/src/app
|
RUN mkdir -p /usr/src/app
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
RUN npm install -g nodemon
|
||||||
|
|
||||||
# Install Dependencies
|
# Install Dependencies
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
@@ -14,6 +15,8 @@ RUN npm install --silent
|
|||||||
# Copy app source code
|
# Copy app source code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
RUN chmod +x ./engine/stockfish16
|
||||||
|
|
||||||
# Exports
|
# Exports
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
|||||||
+9
-2
@@ -3,11 +3,18 @@ version: "3.7"
|
|||||||
services:
|
services:
|
||||||
frontend:
|
frontend:
|
||||||
build: ./frontend
|
build: ./frontend
|
||||||
|
command: sh -c "npm rebuild esbuild && npm run dev"
|
||||||
|
volumes:
|
||||||
|
- ./frontend:/usr/src/app
|
||||||
ports:
|
ports:
|
||||||
- 5173:5173
|
- 127.0.0.1:5173:5173
|
||||||
backend:
|
backend:
|
||||||
build: ./backend
|
build: ./backend
|
||||||
|
command: nodemon -L app.js
|
||||||
|
volumes:
|
||||||
|
- ./backend:/usr/src/app
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 127.0.0.1:8080:8080
|
||||||
environment:
|
environment:
|
||||||
- PORT=8080
|
- PORT=8080
|
||||||
|
- CHESS_ENGINE_PATH=engine/stockfish16
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
node_modules
|
**/node_modules
|
||||||
|
node_modules/*
|
||||||
Reference in New Issue
Block a user