Skip to content

Commit

Permalink
feat: update build files
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic-maury committed Nov 17, 2024
1 parent 99bf9d9 commit 692a362
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 10 deletions.
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.vscode
.DS_STORE
.env
tmp
Dockerfile*
docker-compose*
.dockerignore
*.md
.git
.gitignore
node_modules
npm-debug.log
tests/
3 changes: 2 additions & 1 deletion backend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ docker-compose*
.dockerignore
*.md
.git
.gitignore
.gitignore
node_modules
8 changes: 5 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ services:
- 80:3010
environment:
- REACT_APP_REALT_PROPERTIES_BACKEND_URL=http://localhost:3000/
- REACT_APP_REALT_THEGRAPH_URL=https://api.thegraph.com/subgraphs/name/realtoken-thegraph/
- REACT_APP_REALT_THEGRAPH_GNOSIS=realtoken-xdai
- REACT_APP_REALT_THEGRAPH_RMM=rmm-v3-wrapper-gnosis
- REACT_APP_REALT_THEGRAPH_URL=https://gateway-arbitrum.network.thegraph.com/api/
- REACT_APP_REALT_THEGRAPH_API_KEY=
- REACT_APP_REALT_THEGRAPH_RMM=subgraphs/id/9Ut97U2oMKwRucppj7fdMeZ8oFCJrUYyr8wu4hFXBn7Y
- REACT_APP_REALT_THEGRAPH_GNOSIS=subgraphs/id/FPPoFB7S2dcCNrRyjM5QbaMwKqRZPdbTg8ysBrwXd4SP
- REACT_APP_REALT_THEGRAPH_ETH=subgraphs/id/EVjGN4mMd9h9JfGR7yLC6T2xrJf9syhjQNboFb7GzxVW
volumes:
- ./frontend:/app
command: [sh, -c, 'cd /app && npm start']
Expand Down
10 changes: 7 additions & 3 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
ARG NODE_IMAGE=node:21-alpine
ARG REACT_APP_REALT_PROPERTIES_BACKEND_URL
ARG REACT_APP_REALT_THEGRAPH_URL=https://api.thegraph.com/subgraphs/name/realtoken-thegraph/
ARG REACT_APP_REALT_THEGRAPH_GNOSIS=realtoken-xdai
ARG REACT_APP_REALT_THEGRAPH_RMM=rmm-v3-wrapper-gnosis
ARG REACT_APP_REALT_THEGRAPH_URL=https://gateway-arbitrum.network.thegraph.com/api/
ARG REACT_APP_REALT_THEGRAPH_API_KEY
ARG REACT_APP_REALT_THEGRAPH_GNOSIS=subgraphs/id/FPPoFB7S2dcCNrRyjM5QbaMwKqRZPdbTg8ysBrwXd4SP
ARG REACT_APP_REALT_THEGRAPH_RMM=rsubgraphs/id/9Ut97U2oMKwRucppj7fdMeZ8oFCJrUYyr8wu4hFXBn7Y
ARG REACT_APP_REALT_THEGRAPH_ETH=subgraphs/id/EVjGN4mMd9h9JfGR7yLC6T2xrJf9syhjQNboFb7GzxVW

FROM $NODE_IMAGE AS dependencies
WORKDIR /app
Expand All @@ -14,8 +16,10 @@ FROM dependencies as build
ENV NODE_ENV=production
ENV REACT_APP_REALT_PROPERTIES_BACKEND_URL=$REACT_APP_REALT_PROPERTIES_BACKEND_URL
ENV REACT_APP_REALT_THEGRAPH_URL=$REACT_APP_REALT_THEGRAPH_URL
ENV REACT_APP_REALT_THEGRAPH_API_KEY=$REACT_APP_REALT_THEGRAPH_API_KEY
ENV REACT_APP_REALT_THEGRAPH_GNOSIS=$REACT_APP_REALT_THEGRAPH_GNOSIS
ENV REACT_APP_REALT_THEGRAPH_RMM=$REACT_APP_REALT_THEGRAPH_RMM
ENV REACT_APP_REALT_THEGRAPH_ETH=$REACT_APP_REALT_THEGRAPH_ETH
ENV GENERATE_SOURCEMAP=false
RUN npm run build

Expand Down
8 changes: 5 additions & 3 deletions frontend/example.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
REACT_APP_REALT_PROPERTIES_BACKEND_URL=http://localhost:3000/
REACT_APP_REALT_THEGRAPH_URL=https://api.thegraph.com/subgraphs/name/realtoken-thegraph/
REACT_APP_REALT_THEGRAPH_GNOSIS=realtoken-xdai
REACT_APP_REALT_THEGRAPH_RMM=rmm-v3-wrapper-gnosis
REACT_APP_REALT_THEGRAPH_URL=https://gateway-arbitrum.network.thegraph.com/api/
REACT_APP_REALT_THEGRAPH_API_KEY=YOUR_API_KEY_HERE
REACT_APP_REALT_THEGRAPH_RMM=subgraphs/id/9Ut97U2oMKwRucppj7fdMeZ8oFCJrUYyr8wu4hFXBn7Y
REACT_APP_REALT_THEGRAPH_GNOSIS=subgraphs/id/FPPoFB7S2dcCNrRyjM5QbaMwKqRZPdbTg8ysBrwXd4SP
REACT_APP_REALT_THEGRAPH_ETH=subgraphs/id/EVjGN4mMd9h9JfGR7yLC6T2xrJf9syhjQNboFb7GzxVW

0 comments on commit 692a362

Please sign in to comment.