Skip to content

Commit 3fa1db2

Browse files
bidlakowslulciuc
authored andcommitted
web: Add env variable for setting up the frontend port (MarquezProject#2239) (MarquezProject#2838)
Co-authored-by: Willy Lulciuc <willy@datakin.com> Signed-off-by: Isa Inalcik <isa.inalcik@gmail.com>
1 parent ceb994e commit 3fa1db2

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

docker-compose.web.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ services:
66
environment:
77
- MARQUEZ_HOST=api
88
- MARQUEZ_PORT=${API_PORT}
9+
- WEB_PORT=${WEB_PORT}
910
ports:
1011
- "${WEB_PORT}:${WEB_PORT}"
1112
depends_on:

web/setupProxy.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ const apiOptions = {
99
const app = express()
1010
const path = __dirname + '/dist'
1111

12+
const port = process.env.WEB_PORT
13+
1214
app.use('/', express.static(path))
1315
app.use('/datasets', express.static(path))
1416
app.use('/events', express.static(path))
@@ -22,6 +24,6 @@ router.get('/healthcheck', function (req, res) {
2224

2325
app.use(router)
2426

25-
app.listen(3000, function() {
26-
console.log('App listening on port 3000!')
27+
app.listen(port, function() {
28+
console.log(`App listening on port ${port}!`)
2729
})

0 commit comments

Comments
 (0)