pvincent
2 months ago
10 changed files with 179 additions and 28 deletions
-
22recipes/base/common.sh
-
17recipes/cagettepei/crud.sh
-
42recipes/discourse/crud.sh
-
10recipes/dolibarr/crud.sh
-
10recipes/odoo12/crud.sh
-
10recipes/odoo15/crud.sh
-
6recipes/stub/crud.sh
-
10recipes/wordpress/crud.sh
-
3scripts/miaou
-
77templates/apps/discourse/forum.yml.j2
@ -0,0 +1,22 @@ |
|||
#!/bin/bash |
|||
|
|||
function check_db_maria_exists() { |
|||
db-maria list | grep -q "$1" |
|||
} |
|||
|
|||
function check_db_postgres_exists() { |
|||
db-psql list | grep -q "$1" |
|||
} |
|||
|
|||
function extract_domain_from_fqdn() { |
|||
fqdn=$1 |
|||
part1=$(builtin echo "$fqdn" | rev | cut -d'.' -f1 | rev) |
|||
part2=$(builtin echo "${fqdn%."$part1"}" | rev | cut -d'.' -f1 | rev) |
|||
builtin echo "$part2.$part1" |
|||
} |
|||
|
|||
function extract_subdomain_from_fqdn() { |
|||
fqdn=$1 |
|||
domain=$(extract_domain_from_fqdn "$fqdn") |
|||
builtin echo "${fqdn%."$domain"}" |
|||
} |
@ -0,0 +1,77 @@ |
|||
# TODO: change SOME_SECRET in this template |
|||
|
|||
templates: |
|||
- "templates/web.template.yml" |
|||
- "templates/web.ratelimited.template.yml" |
|||
|
|||
expose: |
|||
- "{{ env.APP_PORT }}:80" |
|||
|
|||
params: |
|||
## Which Git revision should this container use? (default: tests-passed) |
|||
#version: tests-passed |
|||
version: latest-release |
|||
|
|||
env: |
|||
DISCOURSE_HOSTNAME: '{{ env.APP_FQDN }}' |
|||
|
|||
LC_ALL: en_US.UTF-8 |
|||
LANG: en_US.UTF-8 |
|||
LANGUAGE: en_US.UTF-8 |
|||
# DISCOURSE_DEFAULT_LOCALE: en |
|||
|
|||
## Uncomment if you want the container to be started with the same |
|||
## hostname (-h option) as specified above (default "$hostname-$config") |
|||
DOCKER_USE_HOSTNAME: true |
|||
|
|||
## TODO: List of comma delimited emails that will be made admin and developer |
|||
## on initial signup example 'user1@example.com,user2@example.com' |
|||
DISCOURSE_DEVELOPER_EMAILS: 'pvincent@artcode.re' |
|||
|
|||
## TODO: The SMTP mail server used to validate new accounts and send notifications |
|||
# SMTP ADDRESS, username, and password are required |
|||
# WARNING the char '#' in SMTP password can cause problems! |
|||
DISCOURSE_SMTP_ADDRESS: mail1.zourit.net |
|||
DISCOURSE_SMTP_PORT: 587 |
|||
DISCOURSE_SMTP_USER_NAME: postmaster@artcode.re |
|||
DISCOURSE_SMTP_PASSWORD: bHv5mTYyh3aJJKw |
|||
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true) |
|||
#DISCOURSE_SMTP_DOMAIN: discourse.example.com # (required by some providers) |
|||
#DISCOURSE_NOTIFICATION_EMAIL: noreply@discourse.example.com # (address to send notifications from) |
|||
|
|||
|
|||
## TODO: configure connectivity to the databases |
|||
DISCOURSE_DB_NAME: libre.re |
|||
DISCOURSE_DB_USERNAME: libre.re |
|||
DISCOURSE_DB_PASSWORD: libre.re |
|||
DISCOURSE_DB_HOST: ct1.lxd |
|||
|
|||
DISCOURSE_REDIS_HOST: ct1.lxd |
|||
|
|||
volumes: |
|||
- volume: |
|||
host: /var/discourse/shared/web-only |
|||
guest: /shared |
|||
- volume: |
|||
host: /var/discourse/shared/web-only/log/var-log |
|||
guest: /var/log |
|||
|
|||
## Plugins go here |
|||
## see https://meta.discourse.org/t/19157 for details |
|||
hooks: |
|||
after_code: |
|||
- exec: |
|||
cd: $home/plugins |
|||
cmd: |
|||
- git clone https://github.com/discourse/docker_manager.git |
|||
{%- if services[env.APP_DOMAIN][env.APP_SUBDOMAIN]['data']['discourse']['plugins'] %} |
|||
{%- for plugin in services[env.APP_DOMAIN][env.APP_SUBDOMAIN]['data']['discourse']['plugins'] %} |
|||
- git clone {{ plugin }} |
|||
{%- endfor %} |
|||
{%- endif %} |
|||
|
|||
## Remember, this is YAML syntax - you can only have one block with a name |
|||
run: |
|||
- exec: echo "Beginning of custom commands" |
|||
- exec: echo "End of custom commands" |
|||
- exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}' |
Write
Preview
Loading…
Cancel
Save
Reference in new issue