Skip to content

Instantly share code, notes, and snippets.

@froger
Last active March 7, 2022 23:20
Show Gist options
  • Select an option

  • Save froger/f3ff085897107a3cd7f06d27aed6ab52 to your computer and use it in GitHub Desktop.

Select an option

Save froger/f3ff085897107a3cd7f06d27aed6ab52 to your computer and use it in GitHub Desktop.
type: install
name: Decidim
description:
short: Decidim Saas
categories:
- apps/platforms
baseUrl: https://git.octree.ch/decidim/vocacity/docker/-/raw/main
logo: /overrides/0.24.3/app/assets/images/decidim_logo.png?inline=false
globals:
DB_PASSWORD: "${fn.password}"
APP_SESSION_KEY: "${fn.password}"
SECRET_KEY_BASE: "${fn.password(128)}"
MASTER_KEY: "${fn.password(32)}"
settings:
fields:
- name: JOB_IMAGE_REGISTRY
type: string
caption: JOB_IMAGE_REGISTRY
- type: string
name: JOB_IMAGE_PAGE
caption: JOB_IMAGE_PAGE
- type: string
name: PROD_IMAGE_REGISTRY
caption: PROD_IMAGE_REGISTRY
- type: string
name: PROD_IMAGE_PATH
caption: PROD_IMAGE_PATH
- name: IMAGE_USERNAME
caption: IMAGE_USERNAME
type: string
- name: IMAGE_PASSWORD
caption: IMAGE_PASSWORD
type: string
- name: DECIDIM_DEFAULT_SYSTEM_EMAIL
caption: DECIDIM_DEFAULT_SYSTEM_EMAIL
type: string
- name: DECIDIM_DEFAULT_SYSTEM_PASSWORD
caption: DECIDIM_DEFAULT_SYSTEM_PASSWORD
type: string
- name: DECIDIM_NAME
caption: DECIDIM_NAME
type: string
- name: DECIDIM_SHORTNAME
caption: DECIDIM_SHORTNAME
type: string
- type: string
name: TIMEZONE
caption: TIMEZONE
- type: string
name: WEBHOOK_URL
caption: WEBHOOK_URL
- name: WEBHOOK_USERNAME
caption: WEBHOOK_USERNAME
type: string
- name: WEBHOOK_PASSWORD
caption: WEBHOOK_PASSWORD
type: string
- type: string
name: WEBHOOK_HMAC
caption: WEBHOOK_HMAC
- name: SMTP_HOST
caption: SMTP_HOST
type: string
- name: SMTP_PORT
caption: SMTP_PORT
type: string
- name: SMTP_USERNAME
caption: SMTP_USERNAME
type: string
- name: SMTP_PASSWORD
caption: SMTP_PASSWORD
type: string
- type: string
name: SMTP_AUTHENTICATION
caption: SMTP_AUTHENTICATION
- type: string
name: SMTP_HELO_DOMAIN
caption: SMTP_HELO_DOMAIN
- type: string
name: SMTP_OPEN_TIMEOUT
caption: SMTP_OPEN_TIMEOUT
- type: string
name: SMTP_READ_TIMEOUT
caption: SMTP_READ_TIMEOUT
nodes:
cloudlets: 2
diskLimit: 5G
nodeGroup: bl
nodeType: nginx-dockerized
tag: 1.20.2
volumes:
- "/public"
volumeMounts:
"/public":
protocol: NFS4
readOnly: true
sourceNodeGroup: storage
sourcePath: "/data"
- cloudlets: 8
diskLimit: 100G
env:
APP_SESSION_KEY: "${globals.APP_SESSION_KEY}"
DATABASE_HOST: psql
DATABASE_PASSWORD: "${globals.DB_PASSWORD}"
DATABASE_DATABASE: decidim
DATABASE_USERNAME: POSTGRES_USER
DATABASE_URL: postgres://decidim:${globals.DB_PASSWORD}@psql:5432/decidim
SECRET_KEY_BASE: "${globals.SECRET_KEY_BASE}"
MASTER_KEY: "${globals.MASTER_KEY}"
SMTP_ADDRESS: "${settings.SMTP_HELO_DOMAIN}"
SMTP_AUTHENTICATION: "${settings.SMTP_AUTHENTICATION}"
SMTP_DOMAIN: "${settings.SMTP_DOMAIN}"
SMTP_USERNAME: "${settings.SMTP_USERNAME}"
SMTP_PASSWORD: "${settings.SMTP_PASSWORD}"
SMTP_PORT: "${settings.SMTP_PORT}"
SMTP_STARTTLS_AUTO: true
TZ: "${settings.TIMEZONE}"
links:
- sqldb:psql
image: "${settings.PROD_IMAGE_PATH}"
registry:
url: "${settings.PROD_IMAGE_REGISTRY}"
user: "${settings.IMAGE_USERNAME}"
password: "${settings.IMAGE_PASSWORD}"
nodeGroup: cp
volumeMounts:
protocol: NFS4
readOnly: false
sourceNodeGroup: storage
sourcePath: "/data"
- cloudlets: 4
diskLimit: 5G
env:
APP_SESSION_KEY: "${globals.APP_SESSION_KEY}"
DATABASE_HOST: psql
DATABASE_PASSWORD: "${globals.DB_PASSWORD}"
DATABASE_DATABASE: decidim
DATABASE_USERNAME: POSTGRES_USER
DATABASE_URL: postgres://decidim:${globals.DB_PASSWORD}@psql:5432/decidim
SECRET_KEY_BASE: "${globals.SECRET_KEY_BASE}"
SMTP_ADDRESS: "${settings.SMTP_HELO_DOMAIN}"
SMTP_AUTHENTICATION: "${settings.SMTP_AUTHENTICATION}"
SMTP_DOMAIN: "${settings.SMTP_DOMAIN}"
SMTP_USERNAME: "${settings.SMTP_USERNAME}"
SMTP_PASSWORD: "${settings.SMTP_PASSWORD}"
SMTP_PORT: "${settings.SMTP_PORT}"
SMTP_STARTTLS_AUTO: true
TZ: "${settings.TIMEZONE}"
DOCKER_EXPOSED_PORT: 3000
PORT: 3000
links:
- sqldb:psql
image: "${settings.JOB_IMAGE_PAGE}"
registry:
url: "${settings.JOB_IMAGE_REGISTRY}"
user: "${settings.IMAGE_USERNAME}"
password: "${settings.IMAGE_PASSWORD}"
nodeGroup: build
volumeMounts:
protocol: NFS4
readOnly: false
sourceNodeGroup: storage
sourcePath: "/data"
- cloudlets: 3
diskLimit: 100G
nodeGroup: sqldb
nodeType: postgresql
tag: 14.1
isSLBAccessEnabled: false
env:
POSTGRES_PASSWORD: "${globals.DB_PASSWORD}"
POSTGRES_DB: decidim
POSTGRES_USER: decidim
TZ: "${settings.TIMEZONE}"
PGTZ: "${settings.TIMEZONE}"
ADMINPANEL_ENABLED: false
volumes:
- "/var/lib/postgresql/data"
- cloudlets: 1
diskLimit: 100G
nodeGroup: storage
nodeType: storage
tag: 2.0-9.4
isSLBAccessEnabled: false
env:
HOME_DIR: "/data"
volumes:
- "/data"
success: |
## Your Decidim is ready !
See it on ${env.url}
startPage: https://${env.envName}.voca.city/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment