Skip to content

Commit

Permalink
feat: update URL env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic-maury committed Nov 17, 2024
1 parent 9e00fda commit eb7e07c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "realt-properties-map-backend",
"version": "1.1.1",
"version": "1.1.2",
"license": "Apache-2.0",
"main": "src/index.ts",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/controllers/properties.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function get(req: Request, res: Response, next: NextFunction): Prom
return res.json(cached)
}

const { data: properties } = await axios.get('https://dashboard.realtoken.community/api/properties')
const { data: properties } = await axios.get(`${process.env.REALT_COMMUNITY_URL}/api/properties`)
cacheService.set(PropertiesCacheKey, properties, cachedTime)
return res.json(properties)
} catch (err) {
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
- 80:3010
environment:
- REACT_APP_REALT_PROPERTIES_BACKEND_URL=http://localhost:3000/
- REACT_APP_REALT_COMMUNITY_URL=https://dashboard.realtoken.community/
- 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
Expand All @@ -27,6 +28,7 @@ services:
environment:
- PORT=3000
- CORS_ORIGIN=http://localhost
- REALT_COMMUNITY_URL=https://dashboard.realtoken.community/
volumes:
- ./backend:/home/node/app
command: [sh, -c, 'cd /home/node/app && npm run dev']
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "realt-properties-map-frontend",
"version": "1.5.8",
"version": "1.5.9",
"license": "Apache-2.0",
"scripts": {
"start": "PORT=3010 react-scripts start",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Button, Grid } from "@mantine/core";
import { AffixBtn } from "../Common/AffixBtn";
import { useCopyUrl } from "../../hooks/useCopyUrl";
import { useViewportSize } from "@mantine/hooks";
import Env from "../../utils/env";

export function PropertyPanelActions({
marketplaceLink,
Expand Down Expand Up @@ -45,7 +46,7 @@ export function PropertyPanelActions({
title={t('title.viewOnRealtoken')}
target="_blank"
referrerPolicy="no-referrer"
href={"https://dashboard.realt.community/asset/" + address}>
href={`${Env.REACT_APP_REALT_COMMUNITY_URL}/asset/${address}`}>
Dashboard
</Button>
</Grid.Col>
Expand Down

0 comments on commit eb7e07c

Please sign in to comment.