Closed ThorANilsson closed 3 months ago
Thanks for catching this. Can you change the start-env.js script to the below to fix.
require('dotenv').config();
const cli = require('next/dist/cli/next-start');
cli.nextStart({
port: process.env.PORT || 3000,
hostname: process.env.HOSTNAME || '0.0.0.0',
});
Thanks for catching this. Can you change the start-env.js script to the below to fix.
require('dotenv').config(); const cli = require('next/dist/cli/next-start'); cli.nextStart({ port: process.env.PORT || 3000, hostname: process.env.HOSTNAME || '0.0.0.0', });
That seems to work! 👍
Describe the Bug
I have the following .env file in the root of the Umami directory:
Upon building the application, Umami successfully reads the DATABASE_URL from .env. But when starting the application using start-env, the application appears to pick a random port number instead of the provided one? For example 43319 instead of 3001.
Even going into the start script start-env.js and manually changing the port to 3001, it still picks a random one when starting.
Database
PostgreSQL
Which Umami version are you using? (if relevant)
2.12.1