mirror of
https://github.com/meienberger/runtipi.git
synced 2024-11-10 11:41:48 +03:00
feat: includ internalip:port as app_domain if app is not exposed
This commit is contained in:
parent
8eae068220
commit
25acb235c8
@ -14,6 +14,7 @@ interface IConfig {
|
||||
ROOT_FOLDER_HOST: string;
|
||||
APPS_REPO_ID: string;
|
||||
APPS_REPO_URL: string;
|
||||
INTERNAL_IP: string;
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
@ -51,6 +52,7 @@ const config: IConfig = {
|
||||
ROOT_FOLDER_HOST,
|
||||
APPS_REPO_ID,
|
||||
APPS_REPO_URL,
|
||||
INTERNAL_IP,
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
@ -108,9 +108,9 @@ export const generateEnvFile = (app: App) => {
|
||||
if (app.exposed && app.domain) {
|
||||
envFile += 'APP_EXPOSED=true\n';
|
||||
envFile += `APP_DOMAIN=${app.domain}\n`;
|
||||
envFile += `APP_PROTOCOL=https\n`;
|
||||
envFile += 'APP_PROTOCOL=https\n';
|
||||
} else {
|
||||
envFile += `APP_DOMAIN=${InternalIp.v4()}:${configFile.port}\n`;
|
||||
envFile += `APP_DOMAIN=${config.INTERNAL_IP}:${configFile.port}\n`;
|
||||
}
|
||||
|
||||
writeFile(`/app-data/${app.id}/app.env`, envFile);
|
||||
|
Loading…
Reference in New Issue
Block a user