new: [rallly] new charm
#32
Closed
bgallet
wants to merge 1 commits from bgallet/0k-charms:boris/rallly
into master
pull from: bgallet/0k-charms:boris/rallly
merge into: 0k:master
0k:0k/dev/master
0k:backup
0k:bgallet/mattermost
0k:bgallet/nextcloud
0k:boris/smtp-extern
0k:charm-codimd-new
0k:cups_service_alpha
0k:dev
0k:dev1
0k:dhcp
0k:element
0k:etherpad-upd
0k:framadate
0k:get-version
0k:lokavaluto/dev/master
0k:master
0k:matomo
0k:new-mailhog-charms
0k:new-monujo-options
0k:nj-collabra-office
0k:nj-keycloak-17.0
0k:nj-organice-charm
0k:nj-vaulwarden-migrate
0k:ntfy-install
0k:odoo_fix_webhook_url
0k:postgres
0k:test
0k:upd-docker
0k:update-latest-synapse
0k:wip
6 changed files with 137 additions and 0 deletions
-
33rallly/README.org
-
21rallly/hooks/init
-
18rallly/hooks/postgres_database-relation-joined
-
20rallly/hooks/smtp_server-relation-joined
-
13rallly/hooks/web_proxy-relation-joined
-
32rallly/metadata.yml
@ -0,0 +1,33 @@ |
|||||
|
# -*- ispell-local-dictionary: "english" -*- |
||||
|
|
||||
|
* Info |
||||
|
|
||||
|
From: https://github.com/lukevella/rallly |
||||
|
|
||||
|
* Usage |
||||
|
|
||||
|
Config info : https://support.rallly.co/self-hosting/configuration-options |
||||
|
|
||||
|
Need a complete SMTP config to be functionnal |
||||
|
|
||||
|
#+begin_src yaml |
||||
|
rallly: |
||||
|
charm: rallly |
||||
|
docker-compose: |
||||
|
options: |
||||
|
secret: <> |
||||
|
support_email: # email used for support |
||||
|
# OPTIONAL |
||||
|
allowed_emails: "*@example.coop, test@example2.com" # All by default if not set |
||||
|
|
||||
|
|
||||
|
smtp-extern: |
||||
|
charm: smtp-extern |
||||
|
options: |
||||
|
host: <smtp.host> |
||||
|
port: <465> |
||||
|
secure: "true" |
||||
|
user: <smtp user> |
||||
|
password: <smtp password> |
||||
|
|
||||
|
#+end_src |
@ -0,0 +1,21 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
set -e |
||||
|
|
||||
|
secret=$(options-get secret) || exit 1 |
||||
|
support_email=$(options-get support_email) || exit 1 |
||||
|
allowed_emails=$(options-get allowed_emails) || true |
||||
|
|
||||
|
if [[ -z "$allowed_emails" ]]; then |
||||
|
allowed_emails=* |
||||
|
fi |
||||
|
|
||||
|
init-config-add "\ |
||||
|
$MASTER_BASE_SERVICE_NAME: |
||||
|
environment: |
||||
|
SECRET_PASSWORD: \"$secret\" |
||||
|
SUPPORT_EMAIL: \"$support_email\" |
||||
|
ALLOWED_EMAILS: \"$allowed_emails\" |
||||
|
NEXT_PUBLIC_BASE_URL: http://localhost:8082/ |
||||
|
|
||||
|
" |
@ -0,0 +1,18 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
set -e |
||||
|
|
||||
|
PASSWORD="$(relation-get password)" |
||||
|
USER="$(relation-get user)" |
||||
|
DBNAME="$(relation-get dbname)" |
||||
|
|
||||
|
|
||||
|
config-add "\ |
||||
|
services: |
||||
|
$MASTER_BASE_SERVICE_NAME: |
||||
|
environment: |
||||
|
DATABASE_URL: \"postgres://$USER:$PASSWORD@$TARGET_SERVICE_NAME/$DBNAME\" |
||||
|
" |
||||
|
|
||||
|
|
||||
|
info "Configured $SERVICE_NAME code for $TARGET_SERVICE_NAME access." |
@ -0,0 +1,20 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
host=$(relation-get host) || exit 1 |
||||
|
port=$(relation-get port) || exit 1 |
||||
|
secure=$(relation-get secure) || exit 1 |
||||
|
user=$(relation-get user) || exit 1 |
||||
|
password=$(relation-get password) || exit 1 |
||||
|
|
||||
|
|
||||
|
config-add "\ |
||||
|
services: |
||||
|
$MASTER_BASE_SERVICE_NAME: |
||||
|
environment: |
||||
|
SMTP_HOST: \"$host\" |
||||
|
SMTP_PORT: \"$port\" |
||||
|
SMTP_SECURE: \"${secure,,}\" |
||||
|
SMTP_USER: \"${user//\$/\$\$}\" |
||||
|
SMTP_PWD: \"${password//\$/\$\$}\" |
||||
|
" |
||||
|
|
@ -0,0 +1,13 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
set -e |
||||
|
|
||||
|
DOMAIN=$(relation-get domain) || exit 1 |
||||
|
|
||||
|
config-add "\ |
||||
|
services: |
||||
|
$MASTER_BASE_SERVICE_NAME: |
||||
|
environment: |
||||
|
NEXT_PUBLIC_BASE_URL: https://$DOMAIN |
||||
|
|
||||
|
" |
@ -0,0 +1,32 @@ |
|||||
|
docker-image: docker.0k.io/rallly:3.3.0 |
||||
|
|
||||
|
uses: |
||||
|
postgres-database: |
||||
|
#constraint: required | recommended | optional |
||||
|
#auto: pair | summon | none ## default: pair |
||||
|
constraint: required |
||||
|
auto: summon |
||||
|
solves: |
||||
|
database: "main storage" |
||||
|
default-options: |
||||
|
extensions: |
||||
|
- pgcrypto |
||||
|
- citext |
||||
|
web-proxy: |
||||
|
constraint: recommended |
||||
|
auto: pair |
||||
|
solves: |
||||
|
proxy: "Public access" |
||||
|
default-options: |
||||
|
target: !var-expand ${MASTER_BASE_SERVICE_NAME}:3000 |
||||
|
smtp-server: |
||||
|
constraint: required |
||||
|
auto: pair |
||||
|
solves: |
||||
|
proxy: "Public access" |
||||
|
backup: |
||||
|
constraint: recommended |
||||
|
auto: pair |
||||
|
solves: |
||||
|
backup: "Automatic regular backup" |
||||
|
default-options: |
Write
Preview
Loading…
Cancel
Save
Reference in new issue