diff --git a/conf/config.yaml b/conf/config.yaml index 25b1566..5079a27 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -26,14 +26,14 @@ log-level: "info" # String. Application name to use internally. # Examples: ["My Application","gotosocial"] # Default: "gotosocial" -application-name: "gotosocial" +application-name: "__APP__" # 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. # DO NOT change this after your server has already run once, or you will break things! # Examples: ["gts.example.org","some.server.com"] # Default: "localhost" -host: "localhost" +host: "__DOMAIN__" # 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 @@ -115,17 +115,17 @@ db-port: 5432 # String. Username for the database connection. # Examples: ["mydbuser","postgres","gotosocial"] # Default: "" -db-user: "__APP__" +db-user: "__DB_USER__" # String. Password to use for the database connection # Examples: ["password123","verysafepassword","postgres"] # Default: "" -db-password: "" +db-password: "__DB_PWD__" # String. Name of the database to use within the provided database type. # Examples: ["mydb","postgres","gotosocial"] # Default: "gotosocial" -db-database: "__APP__" +db-database: "__DB_NAME__" # String. Disable, enable, or require SSL/TLS connection to the database. # 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). # Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"] # 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). # Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"] # Default: "./web/assets/" -web-asset-base-dir: "./web/assets/" +web-asset-base-dir: "__FINALPATH__/web/assets/" ########################### ##### 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? # Options: [true, false] # 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? # Options: [true, false] # 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)? # Options: [true, false] # Default: true -accounts-reason-required: true +accounts-reason-required: __REASON__ ######################## ##### MEDIA CONFIG ##### @@ -233,7 +233,7 @@ storage-backend: "local" # this directory, and create new subdirectories and files within it. # Examples: ["/home/gotosocial/storage", "/opt/gotosocial/datastorage"] # Default: "/gotosocial/storage" -storage-local-base-path: "/gotosocial/storage" +storage-local-base-path: "__DATADIR__" ########################### ##### STATUSES CONFIG ##### diff --git a/conf/systemd.service b/conf/systemd.service index cbfd91f..b7a961d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,8 +8,8 @@ Restart=on-failure User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__/__APP__ -ExecStart=__FINALPATH__/__APP__/ --config-path config.yaml server start +WorkingDirectory=__FINALPATH__/ +ExecStart=__FINALPATH__/gotosocial --config-path config.yaml server start StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit diff --git a/manifest.json b/manifest.json index 0fe0b35..2d36ce8 100644 --- a/manifest.json +++ b/manifest.json @@ -49,6 +49,15 @@ }, "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", "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." }, "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 } ] } diff --git a/scripts/install b/scripts/install index 15b2a5b..89b9397 100755 --- a/scripts/install +++ b/scripts/install @@ -25,11 +25,12 @@ ynh_abort_if_errors #================================================= domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN -is_public=$YNH_APP_ARG_IS_PUBLIC -language=$YNH_APP_ARG_LANGUAGE +email=$YNH_APP_ARG_EMAIL 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 ### 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 #================================================= -# ... +# #================================================= #================================================= @@ -369,11 +370,11 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= 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