Browse Source

new: [cyclos] new charm

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
dhcp
Valentin Lab 4 years ago
parent
commit
26a0ea08ed
  1. 19
      cyclos/hooks/postgres_database-relation-joined
  2. 29
      cyclos/metadata.yml

19
cyclos/hooks/postgres_database-relation-joined

@ -0,0 +1,19 @@
#!/bin/bash
set -e
PASSWORD="$(relation-get password)"
USER="$(relation-get user)"
DBNAME="$(relation-get dbname)"
config-add "\
services:
$MASTER_BASE_SERVICE_NAME:
environment:
DB_HOST: \"$MASTER_TARGET_SERVICE_NAME\"
DB_NAME: \"$DBNAME\"
DB_USER: \"$USER\"
DB_PASSWORD: \"$PASSWORD\"
"
info "Configured $SERVICE_NAME code for $TARGET_SERVICE_NAME access."

29
cyclos/metadata.yml

@ -0,0 +1,29 @@
## Based on cyclos/cyclos:4.13.2
docker-image: docker.0k.io/cyclos:4.13.2
default-options:
uses:
postgres-database:
#constraint: required | recommended | optional
#auto: pair | summon | none ## default: pair
constraint: required
auto: summon
solves:
database: "main storage"
default-options:
extensions:
- cube
- earthdistance
- postgis
- unaccent
web-proxy:
#constraint: required | recommended | optional
#auto: pair | summon | none ## default: pair
constraint: recommended
auto: pair
solves:
proxy: "Public access"
default-options:
target: !var-expand ${MASTER_BASE_SERVICE_NAME}:8080
Loading…
Cancel
Save