diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 6f6cc0e9e..365906941 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -76,7 +76,7 @@ FROM build as test RUN apk add --no-cache bash jq # Run command -CMD /bin/sh -c "yarn run dev" +CMD /bin/sh -c "yarn run start" ################################################################################## # PRODUCTION (Does contain only "binary"- and static-files to reduce image size) # diff --git a/frontend/run/server.js b/frontend/run/server.js index 4a49dcd75..a459230b3 100644 --- a/frontend/run/server.js +++ b/frontend/run/server.js @@ -1,10 +1,15 @@ // Imports +const dotenv = require('dotenv') const express = require('express') const path = require('path') +dotenv.config() // load env vars from .env + +const CONFIG = require('../src/config') + // Host & Port -const hostname = '127.0.0.1' -const port = process.env.PORT || 3000 +const hostname = CONFIG.FRONTEND_MODULE_HOST +const port = CONFIG.FRONTEND_MODULE_PORT // Express Server const app = express()