Compare commits

..

8 Commits

Author SHA1 Message Date
30ce2ba98e remvove unnecessary admin_password from web container
Some checks failed
continuous-integration/drone/pr Build is failing
2023-01-11 15:57:20 +01:00
dbe88a0eaa install cgi-fcgi via entrypoint
Some checks failed
continuous-integration/drone/pr Build is failing
2023-01-11 15:38:24 +01:00
d0f6ca27be make web healthcheck more future prove 2023-01-11 15:30:02 +01:00
55866403ee fix CI deployment: set healthcheck version
Some checks failed
continuous-integration/drone/pr Build is failing
2023-01-10 18:31:25 +01:00
3f778ef1eb php-fpm healthcheck
Some checks failed
continuous-integration/drone/pr Build is failing
2023-01-10 18:24:50 +01:00
b7c6775ac6 mariadb healthcheck 2023-01-10 18:24:50 +01:00
ad126fef8e redis healthcheck 2023-01-10 18:24:50 +01:00
6997636275 web healthcheck 2023-01-10 18:24:50 +01:00
9 changed files with 23 additions and 160 deletions

View File

@ -3,7 +3,7 @@ kind: pipeline
name: deploy to swarm-test.autonomic.zone
steps:
- name: deployment
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
image: decentral1se/stack-ssh-deploy:latest
settings:
host: swarm-test.autonomic.zone
stack: nextcloud

View File

@ -51,9 +51,3 @@ DEFAULT_QUOTA="10 GB"
# OCC_CMDS="app:disable dashboard"
# OCC_CMDS="$OCC_CMDS|config:app:set sociallogin auto_create_groups --value 1"
# OCC_CMDS="$OCC_CMDS|config:app:set sociallogin hide_default_login --value 1"
# COMPOSE_FILE="$COMPOSE_FILE:compose.authentik.yml"
# AUTHENTIK_USER_PREFIX=authentik
# AUTHENTIK_DOMAIN=authentik.example.com
# AUTHENTIK_SECRET_NAME=authentik_example_com_nextcloud_secret_v1 # the same as in authentik
# AUTHENTIK_ID_NAME=authentik_example_com_nextcloud_id_v1 # the same as in authentik

View File

@ -15,83 +15,29 @@ Fully automated luxury Nextcloud via docker-swarm.
* **SSO**: 1 (OAuth)
<!-- endmetadata -->
## Quick start
## Basic usage
1. Set up Docker Swarm and [`abra`]
2. Deploy [`coop-cloud/traefik`]
3. `abra app new nextcloud --secrets` (optionally with `--pass` if you'd like
to save secrets in `pass`)
4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
your Docker swarm box
5. `abra app YOURAPPDOMAIN deploy`
* `abra app new nextcloud`
* `abra app config <app-name>`
* `abra app secret insert <app-name> smtp_password v1 <SMTP_PASSWORD>`
* `abra app secret generate -a <app-name>`
* `abra app deploy <app-name>`
## How do I customise the default home page when logging in?
### Onlyoffice Integration
`abra app config <app-name>`
Configure the following envs:
```
COMPOSE_FILE="$COMPOSE_FILE:compose.apps.yml"
ONLYOFFICE_URL=https://onlyoffice.example.com
SECRET_ONLYOFFICE_JWT_VERSION=v1
```
`abra app secret insert <app-name> onlyoffice_jwt v1 <jwt_secret>`
`abra app cmd <app-name> app install_onlyoffice`
### BBB Integration
`abra app config <app-name>`
Configure the following envs:
```
COMPOSE_FILE="$COMPOSE_FILE:compose.apps.yml"
BBB_URL=https://talk.example.org/bigbluebutton/ # trailing slash!
SECRET_BBB_SECRET_VERSION=v1
```
`abra app secret insert <app-name> bbb_secret v1 <bbb_secret>`
`abra app cmd <app-name> app install_bbb`
### Authentik Integration
`abra app config <app-name>`
Configure the following envs:
```
COMPOSE_FILE="$COMPOSE_FILE:compose.authentik.yml"
AUTHENTIK_USER_PREFIX=authentik
AUTHENTIK_DOMAIN=authentik.example.com
AUTHENTIK_SECRET_NAME=authentik_example_com_nextcloud_secret_v1 # the same as in authentik
AUTHENTIK_ID_NAME=authentik_example_com_nextcloud_id_v1 # the same as in authentik
```
`abra app cmd <app-name> app set_authentik`
### Disable Dashboard
Disable dashboard app since it is so corporate:
`abra app config <app-name>`
Configure the following envs:
```
OCC_CMDS="app:disable dashboard"
```
`abra app cmd <app-name> app post_install_occ`
- Delete the dashboard app since it is so corporate
- Follow [these docs](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/default_files_configuration.html) to set the default files list for each user in the Files app
- Configure a `defaultapp` in your `config.php` or use [apporder](https://apps.nextcloud.com/apps/apporder)
## Running `occ`
`abra app cmd <app-name> app run_occ '"user:list --help"'`
## Default user files
- Follow [these docs](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/default_files_configuration.html) to set the default files list for each user in the Files app
## Default App
- Configure a `defaultapp` in your `config.php` or use [apporder](https://apps.nextcloud.com/apps/apporder)
`abra app run --user www-data YOURAPPDOMAIN app occ user:list --help`
## Upgrading Nextcloud apps
`abra app cmd <app-name> app run_occ '"app:update --all"'`
`abra app run --user www-data YOURAPPDOMAIN app occ app:update --all`
## How do I fix a Nextcloud version snafu?

38
abra.sh
View File

@ -32,7 +32,7 @@ set_app_config(){
APP=$1
KEY=$2
VALUE=$3
run_occ "config:app:set $APP $KEY --value '$VALUE'"
run_occ "config:app:set $APP $KEY --value $VALUE"
}
install_bbb(){
@ -52,39 +52,3 @@ install_onlyoffice(){
set_default_quota(){
set_app_config files default_quota '"$DEFAULT_QUOTA"'
}
set_authentik(){
install_apps sociallogin
AUTHENTIK_SECRET=$(cat /run/secrets/authentik_secret)
AUTHENTIK_ID=$(cat /run/secrets/authentik_id)
set_app_config sociallogin custom_providers "
{
\"custom_oidc\":[
{
\"name\":\"$AUTHENTIK_USER_PREFIX\",
\"title\":\"authentik\",
\"authorizeUrl\": \"https://$AUTHENTIK_DOMAIN/application/o/authorize/\",
\"tokenUrl\": \"https://$AUTHENTIK_DOMAIN/application/o/token/\",
\"displayNameClaim\":\"preferred_username\",
\"userInfoUrl\": \"https://$AUTHENTIK_DOMAIN/application/o/userinfo/\",
\"logoutUrl\": \"https://$AUTHENTIK_DOMAIN/if/session-end/nextcloud/\",
\"clientId\":\"$AUTHENTIK_ID\",
\"clientSecret\":\"$AUTHENTIK_SECRET\",
\"scope\":\"openid profile email nextcloud\",
\"groupsClaim\":\"nextcloud_groups\",
\"style\":\"openid\",
\"defaultGroup\":\"\",
\"groupMapping\": {
\"admin\": \"admin\"
}
}
]
}"
set_app_config sociallogin update_profile_on_login 1
set_app_config sociallogin auto_create_groups 1
set_app_config sociallogin hide_default_login 1
run_occ 'config:system:set social_login_auto_redirect --value true'
run_occ 'config:system:set allow_user_to_change_display_name --value=false'
run_occ 'config:system:set lost_password_link --value=disabled'
}

View File

@ -1,14 +0,0 @@
version: "3.8"
services:
app:
secrets:
- authentik_secret
- authentik_id
secrets:
authentik_secret:
external: true
name: ${AUTHENTIK_SECRET_NAME}
authentik_id:
external: true
name: ${AUTHENTIK_ID_NAME}

View File

@ -1,7 +1,7 @@
version: "3.8"
services:
web:
image: nginx:1.23.4
image: nginx:1.23.2
configs:
- source: nginx_conf
target: /etc/nginx/nginx.conf
@ -38,10 +38,10 @@ services:
interval: 30s
timeout: 10s
retries: 10
start_period: 5m
start_period: 1m
app:
image: nextcloud:25.0.5-fpm
image: nextcloud:25.0.1-fpm
depends_on:
- db
configs:
@ -86,7 +86,7 @@ services:
failure_action: rollback
order: start-first
labels:
- "coop-cloud.${STACK_NAME}.version=3.3.0+25.0.5-fpm"
- "coop-cloud.${STACK_NAME}.version=3.0.1+25.0.1-fpm"
- "backupbot.backup=true"
- "backupbot.backup.path=/var/www/html/config/,/var/www/html/data/,/var/www/html/custom_apps/"
healthcheck:
@ -94,10 +94,10 @@ services:
interval: 30s
timeout: 10s
retries: 10
start_period: 5m
start_period: 1m
cron:
image: nextcloud:25.0.5-fpm
image: nextcloud:25.0.1-fpm
volumes:
- nextcloud:/var/www/html/
- nextapps:/var/www/html/custom_apps:cached
@ -109,7 +109,7 @@ services:
entrypoint: /cron.sh
cache:
image: redis:7.0.10-alpine
image: redis:7.0.5-alpine
networks:
- internal
volumes:

View File

@ -1,11 +0,0 @@
If the authentik configuration should be handled by abra add the following to the env:
COMPOSE_FILE="$COMPOSE_FILE:compose.authentik.yml"
AUTHENTIK_USER_PREFIX=authentik
AUTHENTIK_DOMAIN=authentik.example.com
AUTHENTIK_SECRET_NAME=authentik_example_com_nextcloud_secret_v1 # the same as in authentik
AUTHENTIK_ID_NAME=authentik_example_com_nextcloud_id_v1 # the same as in authentik
And run:
abra app cmd <app-name> app set_authentik

View File

@ -26,7 +26,6 @@ Add SMTP Config to your .env file:
# MAIL_FROM_ADDRESS=
# MAIL_DOMAIN=
# SECRET_SMTP_PASSWORD_VERSION=v1
abra app secret insert example.com smtp_password v1 example_password
```
@ -37,21 +36,6 @@ Some Apps can also be managed with abra app cmd!
```
# COMPOSE_FILE="$COMPOSE_FILE:compose.apps.yml"
# APPS="calendar sociallogin onlyoffice"
abra app cmd example.com app install_apps
# ONLYOFFICE_URL=https://onlyoffice.example.com
# SECRET_ONLYOFFICE_JWT_VERSION=v1
abra app secret insert example.com onlyoffice_jwt v1 example_password
abra app cmd example.com app install_onlyoffice
# BBB_URL=https://talk.example.org/bigbluebutton/ # trailing slash!
# SECRET_BBB_SECRET_VERSION=v1
abra app secret insert example.com bbb_secret v1 example_password
abra app cmd example.com app install_bbb
```
## Set Quota
```
# DEFAULT_QUOTA="10 GB"
abra app cmd example.com app set_default_quota
```