-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker compose modified with volume for node modules
- Loading branch information
Showing
2 changed files
with
9 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
version: '3.8' | ||
|
||
networks: | ||
my-app-network: | ||
external: true | ||
|
||
services: | ||
|
||
beacon-network-frontend: | ||
build: | ||
context: ./frontend | ||
#command: ["yarn"] | ||
#command: ["node", "/opt/yarn-v1.22.19/bin/yarn.js", "start" ] | ||
command: yarn start | ||
container_name: beacon-network-frontend | ||
command: node /opt/yarn-v1.22.19/bin/yarn.js start | ||
container_name: bn-ui | ||
environment: | ||
- CHOKIDAR_USEPOLLING=true | ||
ports: | ||
- 3000:3000 | ||
- 3015:3000 | ||
stdin_open: true | ||
volumes: | ||
- ./frontend:/usr/src/app | ||
networks: | ||
- my-app-network | ||
- ./frontend/:/frontend/ | ||
- /frontend/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
FROM node:19.0-alpine | ||
|
||
# set working directory | ||
WORKDIR /usr/src/app | ||
WORKDIR /frontend | ||
|
||
# add _/usr/src/app/node_modules/.bin_ to $PATH | ||
ENV PATH /usr/src/app/node_modules/.bin:$PATH | ||
ENV PATH /frontend/node_modules/.bin:$PATH | ||
|
||
# install app dependencies | ||
COPY package.json . | ||
COPY yarn.lock . | ||
|
||
RUN yarn install --production | ||
|
||
|