From 7c0cb6d68dc950bf5d6f3d3fc2d17778da9e0d71 Mon Sep 17 00:00:00 2001 From: Antoine Lima Date: Sun, 3 Mar 2024 00:11:04 +0100 Subject: [PATCH] Fix build & change_url --- conf/front.env | 1 - manifest.toml | 13 ++----------- scripts/change_url | 7 +++++++ 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/conf/front.env b/conf/front.env index f687880..2cd37e2 100644 --- a/conf/front.env +++ b/conf/front.env @@ -1,4 +1,3 @@ NEXT_PUBLIC_API_URL=https://__DOMAIN__/api/ NEXT_TELEMETRY_DISABLED=1 NODE_ENV=production -NODE_TLS_REJECT_UNAUTHORIZED='0' diff --git a/manifest.toml b/manifest.toml index 3ccbc18..e80e2b9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -25,27 +25,18 @@ multi_instance = true ldap = false sso = false disk = "500M" -ram.build = "100M" +ram.build = "500M" ram.runtime = "100M" [install] [install.domain] type = "domain" - [install.path] - type = "path" - default = "/crab" [install.init_main_permission] type = "group" default = "visitors" - [install.language] - ask.en = "Choose the application language" - ask.fr = "Choisissez la langue de l'application" - type = "select" - choices = ["fr", "en"] - default = "fr" [resources] [resources.sources] @@ -64,7 +55,7 @@ ram.runtime = "100M" api.default = 3001 [resources.apt] - packages = "postgresql pkg-config" + packages = "postgresql pkg-config libssl-dev" [resources.database] type = "postgresql" diff --git a/scripts/change_url b/scripts/change_url index be12e79..cec8bcf 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -31,6 +31,13 @@ ynh_change_url_nginx_config #================================================= # ... #================================================= +ynh_add_config --template="../conf/front.env" --destination="$install_dir/frontend/.env.local" +ynh_add_config --template="../conf/back.env" --destination="$install_dir/api/.env" + +# Next.js copies some env values inside the +# production build so we have to rebuild it +ynh_use_nodejs +build_frontend #================================================= # GENERIC FINALISATION