Compare commits
4 Commits
1.0.1+6.3.
...
custom_css
Author | SHA1 | Date | |
---|---|---|---|
b4c262a6fb | |||
71d770afb0 | |||
3db2ea49a2 | |||
4d77a2e48a |
@ -16,9 +16,12 @@ SECRET_ADMIN_PASSWORD_VERSION=v1
|
||||
## Initialization ##
|
||||
PRODUCT_NAME="Support"
|
||||
ORGANIZATION="Test Org"
|
||||
LOGO_URL=logo.svg
|
||||
# TIMEZONE="Europe/Berlin"
|
||||
LOCALE="de-de"
|
||||
#TEXT_MUTED="#7e7e7e"
|
||||
#MENU_TEXT="#7e7e7e"
|
||||
#BACKGROUND_1="#7e7e7e"
|
||||
#BACKGROUND_2="#7e7e7e"
|
||||
|
||||
ADMIN_EMAIL=admin@example.com
|
||||
SMTP_HOST=mail.example.com
|
||||
|
30
README.md
30
README.md
@ -1,17 +1,17 @@
|
||||
# zammad
|
||||
|
||||
> One line description of the recipe
|
||||
Zammad is a free helpdesk or issue tracking system.
|
||||
|
||||
<!-- metadata -->
|
||||
|
||||
* **Category**: Apps
|
||||
* **Status**: 0
|
||||
* **Image**: [`zammad`](https://hub.docker.com/r/zammad), 4, upstream
|
||||
* **Healthcheck**: No
|
||||
* **Healthcheck**: Yes
|
||||
* **Backups**: No
|
||||
* **Email**: No
|
||||
* **Email**: Yes
|
||||
* **Tests**: No
|
||||
* **SSO**: No
|
||||
* **SSO**: Yes
|
||||
|
||||
<!-- endmetadata -->
|
||||
|
||||
@ -21,6 +21,28 @@ if using elasticsearch, set on your host: `vm.max_map_count=262144` in `/etc/sy
|
||||
|
||||
* `abra app new zammad --secrets`
|
||||
* `abra app config <app-name>`
|
||||
* `abra app secret insert <app-name> smtp_password v1 <password>`
|
||||
* `abra app secret generate -a <app-name>`
|
||||
* `abra app deploy <app-name>`
|
||||
|
||||
Either use the web wizard for the initial setup or run: `abra app cmd <app-name> zammad-railsserver init`
|
||||
|
||||
## Authentik SSO
|
||||
|
||||
* `abra app config <app-name>`
|
||||
```
|
||||
SSO_PROVIDER_DOMAIN=authentik.example.com
|
||||
IDP_SSO_TARGET_URL=https://authentik.example.com/application/saml/zammad/sso/binding/init/
|
||||
IDP_SLO_SERVICE_URL=https://authentik.example.com/application/saml/zammad/slo/binding/redirect/
|
||||
```
|
||||
Run:
|
||||
`abra app cmd --local <app_name> enable_authentik_sso`
|
||||
|
||||
## Useful Commands
|
||||
|
||||
Show changed settings: `abra app cmd <app_name> zammad-railsserver get_setting_changes`
|
||||
|
||||
Open rails console: `abra app cmd <app_name> zammad-railsserver console`
|
||||
|
||||
|
||||
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).
|
||||
|
20
abra.sh
20
abra.sh
@ -1,5 +1,6 @@
|
||||
export ENTRYPOINT_VERSION=v2
|
||||
export AUTO_WIZARD_VERSION=v1
|
||||
export CUSTOM_STYLE_VERSION=v1
|
||||
|
||||
get_setting_changes() {
|
||||
/custom-entrypoint.sh "rails r 'puts JSON.pretty_generate(JSON.parse(Setting.all.select{ |setting| setting.state_current != setting.state_initial }.map { |setting| {name: setting.name, value: setting.state_current[\""value\""]} } .to_json))'"
|
||||
@ -37,3 +38,22 @@ enable_authentik_sso() {
|
||||
"
|
||||
abra app cmd -T -C support.dev.local-it.cloud zammad-railsserver rails_run "$(printf "%q " $COMMAND )"
|
||||
}
|
||||
|
||||
set_logo() {
|
||||
LOGO_PATH="$1"
|
||||
abra app cp "$APP_NAME" "$LOGO_PATH" zammad-railsserver:/tmp/
|
||||
filename="$(basename "$LOGO_PATH")"
|
||||
COMMAND="
|
||||
logo_path = '/tmp/$filename';
|
||||
logo_content = File.open(logo_path, 'rb') { |file| file.read };
|
||||
logo_timestamp = Service::SystemAssets::ProductLogo.store(logo_content);
|
||||
Setting.set('product_logo', logo_timestamp);
|
||||
"
|
||||
abra app cmd -T -C support.dev.local-it.cloud zammad-railsserver rails_run "$(printf "%q " $COMMAND )"
|
||||
}
|
||||
|
||||
customize(){
|
||||
apt update
|
||||
apt install nodejs npm
|
||||
/custom-entrypoint.sh "rails assets:precompile"
|
||||
}
|
||||
|
13
compose.yml
13
compose.yml
@ -37,9 +37,12 @@ x-shared:
|
||||
ZAMMAD_SESSION_JOBS:
|
||||
ZAMMAD_PROCESS_SCHEDULED:
|
||||
ZAMMAD_PROCESS_DELAYED_JOBS_WORKERS:
|
||||
TEXT_MUTED: "${TEXT_MUTED:-hsl(213, 3%, 64%)}"
|
||||
MENU_TEXT: "${MENU_TEXT:-hsl(0, 0%, 74%)}"
|
||||
BACKGROUND_1: "${BACKGROUND_1:-hsl(231, 9%, 16%)}"
|
||||
BACKGROUND_2: "${BACKGROUND_2:-hsl(233, 9%, 19%)}"
|
||||
PRODUCT_NAME:
|
||||
ORGANIZATION:
|
||||
LOGO_URL:
|
||||
LOCALE:
|
||||
ADMIN_EMAIL:
|
||||
SMTP_HOST:
|
||||
@ -67,6 +70,8 @@ x-shared:
|
||||
mode: 0555
|
||||
- source: auto_wizard
|
||||
target: /opt/zammad/contrib/auto_wizard.json
|
||||
- source: custom_style
|
||||
target: /opt/zammad/app/assets/stylesheets/custom/custom_style.css
|
||||
secrets:
|
||||
- db_password
|
||||
- smtp_password
|
||||
@ -151,7 +156,7 @@ services:
|
||||
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||
- "coop-cloud.${STACK_NAME}.version=1.0.1+6.3.1-95"
|
||||
- "coop-cloud.${STACK_NAME}.version=1.0.2+6.3.1-95"
|
||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080"]
|
||||
@ -247,6 +252,10 @@ configs:
|
||||
name: ${STACK_NAME}_auto_wizard_${AUTO_WIZARD_VERSION}
|
||||
file: auto_wizard.json.tmpl
|
||||
template_driver: golang
|
||||
custom_style:
|
||||
name: ${STACK_NAME}_custom_style_${CUSTOM_STYLE_VERSION}
|
||||
file: custom_style.css.tmpl
|
||||
template_driver: golang
|
||||
|
||||
secrets:
|
||||
db_password:
|
||||
|
6
custom_style.css.tmpl
Normal file
6
custom_style.css.tmpl
Normal file
@ -0,0 +1,6 @@
|
||||
:root {
|
||||
--text-muted: {{ env "TEXT_MUTED" }};
|
||||
--menu-text: {{ env "MENU_TEXT" }};
|
||||
--background-quaternary: {{ env "BACKGROUND_1" }};
|
||||
--background-tertiary: {{ env "BACKGROUND_2" }};
|
||||
}
|
Reference in New Issue
Block a user