1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/outline_ynh.git synced 2024-09-03 19:56:12 +02:00

Testing updates

* Added beginning of support for Minio
* Added support for language
* Added a fix for production packages to compile
This commit is contained in:
Limezy 2021-11-09 14:41:18 +07:00
parent d9ffa3b6e0
commit 5c8488d635
4 changed files with 40 additions and 26 deletions

View file

@ -36,11 +36,11 @@ PORT=__PORT__
# A more detailed guide on setting up S3 is available here:
# => https://wiki.generaloutline.com/share/125de1cc-9ff6-424b-8415-0d58c809a40f
#
AWS_ACCESS_KEY_ID=get_a_key_from_aws
AWS_SECRET_ACCESS_KEY=get_the_secret_of_above_key
AWS_REGION=xx-xxxx
AWS_S3_UPLOAD_BUCKET_URL=http://s3:4569
AWS_S3_UPLOAD_BUCKET_NAME=bucket_name_here
AWS_ACCESS_KEY_ID=__MINIO_ID__
AWS_SECRET_ACCESS_KEY=__MINIO_KEY__
AWS_REGION=fr-ynh-1
AWS_S3_UPLOAD_BUCKET_URL=__MINIO_DOMAIN__
AWS_S3_UPLOAD_BUCKET_NAME=outlinestorage
AWS_S3_UPLOAD_MAX_SIZE=26214400
AWS_S3_FORCE_PATH_STYLE=true
AWS_S3_ACL=private
@ -139,18 +139,18 @@ SENTRY_DSN=
# To support sending outgoing transactional emails such as "document updated" or
# "you've been invited" you'll need to provide authentication for an SMTP server
SMTP_HOST=
SMTP_PORT=
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_FROM_EMAIL=
SMTP_REPLY_EMAIL=
SMTP_HOST=127.0.0.1
SMTP_PORT=465
SMTP_USERNAME=''
SMTP_PASSWORD=''
SMTP_FROM_EMAIL=outline@__DOMAIN__
SMTP_REPLY_EMAIL=outline@__DOMAIN__
SMTP_TLS_CIPHERS=
SMTP_SECURE=true
SMTP_SECURE=false
# Custom logo that displays on the authentication screen, scaled to height: 60px
# TEAM_LOGO=https://example.com/images/logo.png
# The default interface language. See translate.getoutline.com for a list of
# available language codes and their rough percentage translated.
DEFAULT_LANGUAGE=en_US
DEFAULT_LANGUAGE=__LANGUAGE_KEY__

View file

@ -12,7 +12,7 @@ location / {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
client_max_body_size 200M;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

View file

@ -46,7 +46,7 @@
"fr": "Choisissez la langue de l'application"
},
"choices": ["fr", "en"],
"default": "fr"
"default": "en"
},
{
"name": "slackkey",

View file

@ -27,22 +27,27 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url="/" #$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
language=$YNH_APP_ARG_LANGUAGE
if [$language == "fr"]
then
language_key="fr_FR"
else
language_key="en_US"
fi
slackkey=$YNH_APP_ARG_SLACKKEY
slacksecret=$YNH_APP_ARG_SLACKSECRET
### If it's a multi-instance app, meaning it can be installed several times independently
### The id of the app as stated in the manifest is available as $YNH_APP_ID
### The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2"...)
### The app instance name is available as $YNH_APP_INSTANCE_NAME
### - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample
### - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2
### - ynhexample__{N} for the subsequent installations, with N=3,4...
### The app instance name is probably what interests you most, since this is
### guaranteed to be unique. This is a good unique identifier to define installation path,
### db names...
app=$YNH_APP_INSTANCE_NAME
minio_domain=$(ynh_app_setting_get --app="minio" --key=domain)
minio_id=$(ynh_app_setting_get --app="minio" --key=id)
minio_key=$(ynh_app_setting_get --app="minio" --key=key)
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#=================================================
@ -79,6 +84,13 @@ ynh_app_setting_set --app=$app --key=port --value=$port
#=================================================
ynh_script_progression --message="Installing dependencies..." --time --weight=1
### SHOULD HAVE A CHECK FOR MINIO + INSTALLATION HERE
#if ! ynh_package_is_installed --package="minio"
#then
# yunohost tools update
# yunohost app install minio --force
#fi
# Install nodejs
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
@ -136,9 +148,11 @@ ynh_script_progression --message="Building Yarn dependencies..."
pushd "$final_path"
ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --frozen-lockfile
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --no-optional --frozen-lockfile
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean
popd
#=================================================