mirror of
https://github.com/YunoHost-Apps/gotosocial_ynh.git
synced 2024-09-03 19:16:06 +02:00
continuing the work
This commit is contained in:
parent
0dd5bb092b
commit
ad8c58616c
4 changed files with 57 additions and 20 deletions
|
@ -26,14 +26,14 @@ log-level: "info"
|
||||||
# String. Application name to use internally.
|
# String. Application name to use internally.
|
||||||
# Examples: ["My Application","gotosocial"]
|
# Examples: ["My Application","gotosocial"]
|
||||||
# Default: "gotosocial"
|
# Default: "gotosocial"
|
||||||
application-name: "gotosocial"
|
application-name: "__APP__"
|
||||||
|
|
||||||
# String. Hostname that this server will be reachable at. Defaults to localhost for local testing,
|
# String. Hostname that this server will be reachable at. Defaults to localhost for local testing,
|
||||||
# but you should *definitely* change this when running for real, or your server won't work at all.
|
# but you should *definitely* change this when running for real, or your server won't work at all.
|
||||||
# DO NOT change this after your server has already run once, or you will break things!
|
# DO NOT change this after your server has already run once, or you will break things!
|
||||||
# Examples: ["gts.example.org","some.server.com"]
|
# Examples: ["gts.example.org","some.server.com"]
|
||||||
# Default: "localhost"
|
# Default: "localhost"
|
||||||
host: "localhost"
|
host: "__DOMAIN__"
|
||||||
|
|
||||||
# String. Domain to use when federating profiles. This is useful when you want your server to be at
|
# String. Domain to use when federating profiles. This is useful when you want your server to be at
|
||||||
# eg., "gts.example.org", but you want the domain on accounts to be "example.org" because it looks better
|
# eg., "gts.example.org", but you want the domain on accounts to be "example.org" because it looks better
|
||||||
|
@ -115,17 +115,17 @@ db-port: 5432
|
||||||
# String. Username for the database connection.
|
# String. Username for the database connection.
|
||||||
# Examples: ["mydbuser","postgres","gotosocial"]
|
# Examples: ["mydbuser","postgres","gotosocial"]
|
||||||
# Default: ""
|
# Default: ""
|
||||||
db-user: "__APP__"
|
db-user: "__DB_USER__"
|
||||||
|
|
||||||
# String. Password to use for the database connection
|
# String. Password to use for the database connection
|
||||||
# Examples: ["password123","verysafepassword","postgres"]
|
# Examples: ["password123","verysafepassword","postgres"]
|
||||||
# Default: ""
|
# Default: ""
|
||||||
db-password: ""
|
db-password: "__DB_PWD__"
|
||||||
|
|
||||||
# String. Name of the database to use within the provided database type.
|
# String. Name of the database to use within the provided database type.
|
||||||
# Examples: ["mydb","postgres","gotosocial"]
|
# Examples: ["mydb","postgres","gotosocial"]
|
||||||
# Default: "gotosocial"
|
# Default: "gotosocial"
|
||||||
db-database: "__APP__"
|
db-database: "__DB_NAME__"
|
||||||
|
|
||||||
# String. Disable, enable, or require SSL/TLS connection to the database.
|
# String. Disable, enable, or require SSL/TLS connection to the database.
|
||||||
# If "disable" then no TLS connection will be attempted.
|
# If "disable" then no TLS connection will be attempted.
|
||||||
|
@ -151,12 +151,12 @@ db-tls-ca-cert: ""
|
||||||
# String. Directory from which gotosocial will attempt to load html templates (.tmpl files).
|
# String. Directory from which gotosocial will attempt to load html templates (.tmpl files).
|
||||||
# Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"]
|
# Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"]
|
||||||
# Default: "./web/template/"
|
# Default: "./web/template/"
|
||||||
web-template-base-dir: "./web/template/"
|
web-template-base-dir: "__FINALPATH__/web/template/"
|
||||||
|
|
||||||
# String. Directory from which gotosocial will attempt to serve static web assets (images, scripts).
|
# String. Directory from which gotosocial will attempt to serve static web assets (images, scripts).
|
||||||
# Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"]
|
# Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"]
|
||||||
# Default: "./web/assets/"
|
# Default: "./web/assets/"
|
||||||
web-asset-base-dir: "./web/assets/"
|
web-asset-base-dir: "__FINALPATH__/web/assets/"
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
##### ACCOUNTS CONFIG #####
|
##### ACCOUNTS CONFIG #####
|
||||||
|
@ -167,17 +167,17 @@ web-asset-base-dir: "./web/assets/"
|
||||||
# Bool. Do we want people to be able to just submit sign up requests, or do we want invite only?
|
# Bool. Do we want people to be able to just submit sign up requests, or do we want invite only?
|
||||||
# Options: [true, false]
|
# Options: [true, false]
|
||||||
# Default: true
|
# Default: true
|
||||||
accounts-registration-open: true
|
accounts-registration-open: __REGISTRATION__
|
||||||
|
|
||||||
# Bool. Do sign up requests require approval from an admin/moderator before an account can sign in/use the server?
|
# Bool. Do sign up requests require approval from an admin/moderator before an account can sign in/use the server?
|
||||||
# Options: [true, false]
|
# Options: [true, false]
|
||||||
# Default: true
|
# Default: true
|
||||||
accounts-approval-required: true
|
accounts-approval-required: __APPROVAL__
|
||||||
|
|
||||||
# Bool. Are sign up requests required to submit a reason for the request (eg., an explanation of why they want to join the instance)?
|
# Bool. Are sign up requests required to submit a reason for the request (eg., an explanation of why they want to join the instance)?
|
||||||
# Options: [true, false]
|
# Options: [true, false]
|
||||||
# Default: true
|
# Default: true
|
||||||
accounts-reason-required: true
|
accounts-reason-required: __REASON__
|
||||||
|
|
||||||
########################
|
########################
|
||||||
##### MEDIA CONFIG #####
|
##### MEDIA CONFIG #####
|
||||||
|
@ -233,7 +233,7 @@ storage-backend: "local"
|
||||||
# this directory, and create new subdirectories and files within it.
|
# this directory, and create new subdirectories and files within it.
|
||||||
# Examples: ["/home/gotosocial/storage", "/opt/gotosocial/datastorage"]
|
# Examples: ["/home/gotosocial/storage", "/opt/gotosocial/datastorage"]
|
||||||
# Default: "/gotosocial/storage"
|
# Default: "/gotosocial/storage"
|
||||||
storage-local-base-path: "/gotosocial/storage"
|
storage-local-base-path: "__DATADIR__"
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
##### STATUSES CONFIG #####
|
##### STATUSES CONFIG #####
|
||||||
|
|
|
@ -8,8 +8,8 @@ Restart=on-failure
|
||||||
|
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=__FINALPATH__/__APP__
|
WorkingDirectory=__FINALPATH__/
|
||||||
ExecStart=__FINALPATH__/__APP__/ --config-path config.yaml server start
|
ExecStart=__FINALPATH__/gotosocial --config-path config.yaml server start
|
||||||
StandardOutput=append:/var/log/__APP__/__APP__.log
|
StandardOutput=append:/var/log/__APP__/__APP__.log
|
||||||
StandardError=inherit
|
StandardError=inherit
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,15 @@
|
||||||
},
|
},
|
||||||
"example": "johndoe"
|
"example": "johndoe"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "email",
|
||||||
|
"type": "email",
|
||||||
|
"help": {
|
||||||
|
"en": "The email adress of your admin account.",
|
||||||
|
"fr": "L'adresse e-mail de votre compte admin."
|
||||||
|
},
|
||||||
|
"example": "johndoe@example.com"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "password",
|
"name": "password",
|
||||||
"type": "password",
|
"type": "password",
|
||||||
|
@ -57,6 +66,33 @@
|
||||||
"fr": "Le mot de passe de votre compte administrateur. Doit contenir : majuscule, minuscule, chiffre et caractère spécial."
|
"fr": "Le mot de passe de votre compte administrateur. Doit contenir : majuscule, minuscule, chiffre et caractère spécial."
|
||||||
},
|
},
|
||||||
"example": "Choose a strong password"
|
"example": "Choose a strong password"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "registration",
|
||||||
|
"type": "boolean",
|
||||||
|
"help": {
|
||||||
|
"en": "Do you want people to be able to just submit sign up requests (true), or do you want invite only (false)?",
|
||||||
|
"fr": "Voulez-vous que les gens puissent envoyer des demandes d'inscription (true) ou voulez-vous que les inscriptions soient uniquement sur invitation (false) ?"
|
||||||
|
},
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "registration-approval",
|
||||||
|
"type": "boolean",
|
||||||
|
"help": {
|
||||||
|
"en": "Do sign up requests require approval from an admin/moderator before an account can sign in/use the server?",
|
||||||
|
"fr": "Les demandes d'inscription doivent-elles être approuvées par un-e administrateur-ice/modérateur-ice avant qu'un compte puisse se connecter et utiliser le serveur ?"
|
||||||
|
},
|
||||||
|
"default": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "registration-reason",
|
||||||
|
"type": "boolean",
|
||||||
|
"help": {
|
||||||
|
"en": "Are sign up requests required to submit a reason for the request (eg., an explanation of why they want to join the instance)?",
|
||||||
|
"fr": "Les demandes d'inscription doivent-elles être accompagnée d'un motif (par exemple, une explication de la raison pour laquelle la personne veut rejoindre l'instance) ?"
|
||||||
|
},
|
||||||
|
"default": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,11 +25,12 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
email=$YNH_APP_ARG_EMAIL
|
||||||
language=$YNH_APP_ARG_LANGUAGE
|
|
||||||
password=$YNH_APP_ARG_PASSWORD
|
password=$YNH_APP_ARG_PASSWORD
|
||||||
|
registration=$YNH_APP_ARG_REGISTRATION
|
||||||
|
approval=$YNH_APP_ARG_REGISTRATION_APPROVAL
|
||||||
|
reason=$YNH_APP_ARG_REGISTRATION_REASON
|
||||||
|
|
||||||
### If it's a multi-instance app, meaning it can be installed several times independently
|
### 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 id of the app as stated in the manifest is available as $YNH_APP_ID
|
||||||
|
@ -168,7 +169,7 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
#=================================================
|
#=================================================
|
||||||
# ...
|
#
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -369,11 +370,11 @@ ynh_systemd_action --service_name=nginx --action=reload
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Creating admin user..." --time --weight=1
|
ynh_script_progression --message="Creating admin user..." --time --weight=1
|
||||||
|
|
||||||
./gotosocial --config-path "$final_path/config.yaml" admin account create --username some_username --email some_email@whatever.org --password SOME_PASSWORD
|
"$final_path"/gotosocial --config-path "$final_path/config.yaml" admin account create --username "$YNH_APP_ARG_ADMIN" --email "$YNH_APP_ARG_EMAIL" --password "$YNH_APP_ARG_PASSWORD"
|
||||||
|
|
||||||
./gotosocial --config-path "$final_path/config.yaml" admin account confirm --username some_username
|
"$final_path"/gotosocial --config-path "$final_path/config.yaml" admin account confirm --username "$YNH_APP_ARG_ADMIN"
|
||||||
|
|
||||||
./gotosocial --config-path "$final_path/config.yaml" admin account promote --username some_username
|
"$final_path"/gotosocial --config-path "$final_path/config.yaml" admin account promote --username "$YNH_APP_ARG_ADMIN"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
Loading…
Add table
Reference in a new issue