Skip to content

Commit

Permalink
React Docker building
Browse files Browse the repository at this point in the history
  • Loading branch information
lindlof committed Dec 5, 2020
1 parent 78f308c commit cf45986
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:15.2.1
FROM node:15.3.0
WORKDIR /app
COPY package.json package-lock.json /app/
RUN npm install
COPY . /app
CMD ["npm", "run", "start"]
CMD ["npm", "run", "build"]
14 changes: 14 additions & 0 deletions web/docker-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3.8'
services:
web:
build:
context: .
command: ['npm', 'run', 'build']
environment:
- 'REACT_APP_CHAIN_ID=${REACT_APP_CHAIN_ID}'
- 'REACT_APP_CHAIN_NAME=${REACT_APP_CHAIN_NAME}'
- 'REACT_APP_LCD_URL=${REACT_APP_LCD_URL}'
- 'REACT_APP_RPC_URL=${REACT_APP_RPC_URL}'
- 'REACT_APP_CONTRACT=${REACT_APP_CONTRACT}'
volumes:
- './build/:/app/build'
1 change: 1 addition & 0 deletions web/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
stdin_open: true
build:
context: .
command: ['npm', 'run', 'start']
environment:
- 'REACT_APP_CHAIN_ID=${REACT_APP_CHAIN_ID}'
- 'REACT_APP_CHAIN_NAME=${REACT_APP_CHAIN_NAME}'
Expand Down

0 comments on commit cf45986

Please sign in to comment.