Compare commits
merge into: 0k:master
0k:0k/dev/master
0k:backup
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
pull from: 0k:postgres
0k:0k/dev/master
0k:backup
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
9 Commits
12 changed files with 176 additions and 30 deletions
-
8apache/hooks/pre_deploy
-
21apache/lib/common
-
5bitwarden/metadata.yml
-
26mattermost/hooks/init
-
26mattermost/hooks/postgres_database-relation-joined
-
16mattermost/metadata.yml
-
35postgres/hooks/init
-
6postgres/hooks/postgres_database-relation-joined
-
50postgres/lib/common
-
2postgres/metadata.yml
-
2precise/base-0k/hooks/install.d/00-base.sh
-
9precise/host/hooks/install.d/70-0k.sh
@ -0,0 +1,8 @@ |
|||
#!/bin/bash |
|||
## Should be executable N time in a row with same result. |
|||
|
|||
set -e |
|||
|
|||
. lib/common |
|||
|
|||
apache_config_hash || exit 1 |
@ -0,0 +1,5 @@ |
|||
description: Bitwarden Server |
|||
#docker-image: mprasil/bitwarden:latest |
|||
docker-image: docker.0k.io/bitwarden |
|||
data-resources: |
|||
- /data |
@ -0,0 +1,26 @@ |
|||
#!/bin/bash |
|||
|
|||
## Init is run on host |
|||
## For now it is run every time the script is launched, but |
|||
## it should be launched only once after build. |
|||
|
|||
## Accessible variables are: |
|||
## - SERVICE_NAME Name of current service |
|||
## - DOCKER_BASE_IMAGE Base image from which this service might be built if any |
|||
## - SERVICE_DATASTORE Location on host of the DATASTORE of this service |
|||
## - SERVICE_CONFIGSTORE Location on host of the CONFIGSTORE of this service |
|||
|
|||
|
|||
# Please note that postgres detect on its own if its datadir needs to be populated |
|||
|
|||
|
|||
## |
|||
## checking permission of base directory |
|||
## |
|||
|
|||
dirs=("$SERVICE_CONFIGSTORE/mattermost/"{config,plugins} "$SERVICE_DATASTORE/mattermost/"{data,logs}) |
|||
for dir in "${dirs[@]}"; do |
|||
mkdir -p "$dir" |
|||
find "$dir" \! -uid 2000 -exec chown -v 2000 {} \; |
|||
find "$dir" \! -gid 2000 -exec chgrp -v 2000 {} \; |
|||
done |
@ -0,0 +1,26 @@ |
|||
#!/bin/bash |
|||
|
|||
set -e |
|||
|
|||
PASSWORD="$(relation-get password)" |
|||
USER="$(relation-get user)" |
|||
DBNAME="$(relation-get dbname)" |
|||
|
|||
control=$(echo -en "$USER\0$DBNAME\0$PASSWORD" | md5_compat) |
|||
|
|||
config-add "\ |
|||
services: |
|||
$MASTER_BASE_SERVICE_NAME: |
|||
environment: |
|||
DB_HOST: $MASTER_TARGET_SERVICE_NAME |
|||
MM_DBNAME: $DBNAME |
|||
MM_PASSWORD: $PASSWORD |
|||
MM_USERNAME: $USER |
|||
" |
|||
|
|||
[ "$control" == "$(relation-get control 2>/dev/null)" ] && exit 0 |
|||
|
|||
|
|||
relation-set control "$control" |
|||
|
|||
info "Configured $SERVICE_NAME code for $TARGET_SERVICE_NAME access." |
@ -0,0 +1,16 @@ |
|||
# description: "Mattermost" |
|||
# maintainer: "Valentin Lab <valentin.lab@kalysto.org>" |
|||
## We fix image here to be sure of what we install |
|||
docker-image: docker.0k.io/mattermost-team |
|||
# docker-image: docker.0k.io/mattermost-enterprise |
|||
config-resources: |
|||
- /mattermost/config |
|||
- /mattermost/plugins |
|||
data-resources: |
|||
- /mattermost/data |
|||
- /mattermost/logs |
|||
host-resources: |
|||
- /etc/localtime:ro |
|||
|
|||
docker-compose: |
|||
restart: unless-stopped |
@ -1,5 +1,5 @@ |
|||
summary: "Postgres server" |
|||
maintainer: "Valentin Lab <valentin.lab@kalysto.org>" |
|||
docker-image: docker.0k.io/postgis |
|||
docker-image: docker.0k.io/postgres:11-alpine |
|||
data-resources: |
|||
- /var/lib/postgresql/data |
Write
Preview
Loading…
Cancel
Save
Reference in new issue