This commit is contained in:
Víðir Valberg Guðmundsson 2022-11-25 13:55:50 +01:00
parent e328c558cf
commit c57becfa03
22 changed files with 303 additions and 274 deletions

View file

@ -1,38 +1,95 @@
--- ---
volume_root_folder: "/docker-volumes" volume_root_folder: "/docker-volumes"
nginx: services:
### Internal services ###
nginx_proxy:
version: "1.0-alpine"
volume_folder: "{{ volume_root_folder }}/nginx" volume_folder: "{{ volume_root_folder }}/nginx"
ldap: nginx_acme_companion:
version: "2.2"
openldap:
domain: "ldap.{{ base_domain }}" domain: "ldap.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/openldap" volume_folder: "{{ volume_root_folder }}/openldap"
version: "1.5.0"
phpldapadmin:
version: "0.9.0"
netdata:
domain: "netdata.{{ base_domain }}"
version: "v1"
portainer:
domain: "portainer.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/portainer"
version: "2.16.2"
keycloak:
domain: sso.{{ base_domain }}
volume_folder: "{{ volume_root_folder }}/keycloak"
version: "20.0"
postfix:
version: "v3.5.0"
allowed_sender_domains:
- "services.{{ base_domain }}"
- "{{ passit.domain }}"
- "{{ gitea.domain }}"
- "{{ mastodon.domain }}"
- "{{ rallly.domain }}"
- "{{ membersystem.domain }}"
restic:
user: "datacoop"
domain: "restic.cannedtuna.org"
repository: "datacoop-hevonen"
version: "1.6.0"
docker_registry:
domain: "docker.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/docker-registry"
username: "docker"
password: "{{ docker_password }}"
version: "2"
### External services ###
nextcloud: nextcloud:
domain: "cloud.{{ base_domain }}" domain: "cloud.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/nextcloud" volume_folder: "{{ volume_root_folder }}/nextcloud"
version: 25-apache
gitea: gitea:
domain: "git.{{ base_domain }}" domain: "git.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/gitea" volume_folder: "{{ volume_root_folder }}/gitea"
version: 1.17.3
passit: passit:
domain: "passit.{{ base_domain }}" domain: "passit.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/passit" volume_folder: "{{ volume_root_folder }}/passit"
version: stable
matrix: matrix:
domain: "matrix.{{ base_domain }}" domain: "matrix.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/matrix" volume_folder: "{{ volume_root_folder }}/matrix"
version: v1.63.1
riot: riot:
domains: domains:
- "riot.{{ base_domain }}" - "riot.{{ base_domain }}"
- "element.{{ base_domain }}" - "element.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/riot" volume_folder: "{{ volume_root_folder }}/riot"
version: v1.11.8
privatebin: privatebin:
domain: "paste.{{ base_domain }}" domain: "paste.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/privatebin" volume_folder: "{{ volume_root_folder }}/privatebin"
version: 20221009
codimd: codimd:
domain: "oldpad.{{ base_domain }}" domain: "oldpad.{{ base_domain }}"
@ -41,15 +98,7 @@ codimd:
hedgedoc: hedgedoc:
domain: "pad.{{ base_domain }}" domain: "pad.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/hedgedoc" volume_folder: "{{ volume_root_folder }}/hedgedoc"
version: 1.9.0
netdata:
domain: "netdata.{{ base_domain }}"
docker_registry:
domain: "docker.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/docker-registry"
username: "docker"
password: "{{ docker_password }}"
data_coop_website: data_coop_website:
domains: domains:
@ -75,6 +124,7 @@ cryptoaarhus_website:
drone: drone:
domain: "drone.{{ base_domain }}" domain: "drone.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/drone" volume_folder: "{{ volume_root_folder }}/drone"
version: 1
mailu: mailu:
version: 1.6 version: 1.6
@ -83,40 +133,20 @@ mailu:
subnet: 192.168.203.0/24 subnet: 192.168.203.0/24
volume_folder: "{{ volume_root_folder }}/mailu" volume_folder: "{{ volume_root_folder }}/mailu"
portainer:
domain: "portainer.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/portainer"
ttrss: ttrss:
domain: rss.{{ base_domain }} domain: rss.{{ base_domain }}
volume_folder: "{{ volume_root_folder }}/tt-rss" volume_folder: "{{ volume_root_folder }}/tt-rss"
keycloak:
domain: sso.{{ base_domain }}
volume_folder: "{{ volume_root_folder }}/keycloak"
postfix:
allowed_sender_domains:
- "services.{{ base_domain }}"
- "{{ passit.domain }}"
- "{{ gitea.domain }}"
- "{{ mastodon.domain }}"
- "{{ rallly.domain }}"
- "{{ membersystem.domain }}"
mastodon: mastodon:
domain: "social.{{ base_domain }}" domain: "social.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/mastodon" volume_folder: "{{ volume_root_folder }}/mastodon"
version: v4.0.2
rallly: rallly:
domain: "when.{{ base_domain }}" domain: "when.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/rallly" volume_folder: "{{ volume_root_folder }}/rallly"
version: a21f92bf74308d66cfcd545d49b81eba0211a222
membersystem: membersystem:
domain: "member.{{ base_domain }}" domain: "member.{{ base_domain }}"
django_admins: "Vidir:valberg@orn.li" django_admins: "Vidir:valberg@orn.li"
restic:
user: "datacoop"
domain: "restic.cannedtuna.org"
repository: "datacoop-hevonen"

View file

@ -404,7 +404,7 @@ module.exports = {
// //
// @type string // @type string
// //
url: "ldap://{{ ldap.domain }}", url: "ldap://{{ services.openldap.domain }}",
// //
// LDAP connection tls options (only used if scheme is ldaps://) // LDAP connection tls options (only used if scheme is ldaps://)

View file

@ -2,34 +2,35 @@
- name: copy docker registry nginx configuration - name: copy docker registry nginx configuration
copy: copy:
src: "files/configs/docker_registry/nginx.conf" src: "files/configs/docker_registry/nginx.conf"
dest: "/docker-volumes/nginx/vhost/{{ docker_registry.domain }}" dest: "/docker-volumes/nginx/vhost/{{ services.docker_registry.domain }}"
mode: "0644" mode: "0644"
- name: docker registry container - name: docker registry container
docker_container: docker_container:
name: registry name: registry
image: registry:2 image: registry:{{ services.docker_registry.version }}
restart_policy: always restart_policy: always
volumes: volumes:
- "{{ docker_registry.volume_folder }}/registry:/var/lib/registry" - "{{ services.docker_registry.volume_folder }}/registry:/var/lib/registry"
- "{{ docker_registry.volume_folder }}/auth:/auth" - "{{ services.docker_registry.volume_folder }}/auth:/auth"
networks: networks:
- name: external_services - name: external_services
env: env:
VIRTUAL_HOST: "{{ docker_registry.domain }}" VIRTUAL_HOST: "{{ services.docker_registry.domain }}"
LETSENCRYPT_HOST: "{{ docker_registry.domain }}" LETSENCRYPT_HOST: "{{ services.docker_registry.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
REGISTRY_AUTH: "htpasswd" REGISTRY_AUTH: "htpasswd"
REGISTRY_AUTH_HTPASSWD_PATH: "/auth/htpasswd" REGISTRY_AUTH_HTPASSWD_PATH: "/auth/htpasswd"
REGISTRY_AUTH_HTPASSWD_REALM: "data.coop docker registry" REGISTRY_AUTH_HTPASSWD_REALM: "data.coop docker registry"
- name: generate htpasswd file - name: generate htpasswd file
shell: "docker exec -it registry htpasswd -Bbn docker {{ docker_password }} > {{ docker_registry.volume_folder }}/auth/htpasswd" shell: "docker exec -it registry htpasswd -Bbn docker {{ docker_password }} > {{ services.docker_registry.volume_folder }}/auth/htpasswd"
args: args:
creates: "{{ docker_registry.volume_folder }}/auth/htpasswd" creates: "{{ services.docker_registry.volume_folder }}/auth/htpasswd"
- name: log in to registry - name: log in to registry
docker_login: docker_login:
registry: "docker.data.coop" registry: "{{ services.docker_registry.domain }}"
username: "docker" username: "docker"
password: "{{ docker_password }}" password: "{{ docker_password }}"
config_path: "{{ services.docker_registry.volume_folder }}/auth/config.json"

View file

@ -14,31 +14,31 @@
- external_services - external_services
- drone - drone
volumes: volumes:
- "{{ drone.volume_folder }}:/data" - "{{ services.drone.volume_folder }}:/data"
- "/var/run/docker.sock:/var/run/docker.sock" - "/var/run/docker.sock:/var/run/docker.sock"
environment: environment:
DRONE_GITEA_SERVER: "https://{{ gitea.domain }}" DRONE_GITEA_SERVER: "https://{{ services.gitea.domain }}"
DRONE_GITEA_CLIENT_ID: "{{ drone_secrets.oauth_client_id }}" DRONE_GITEA_CLIENT_ID: "{{ drone_secrets.oauth_client_id }}"
DRONE_GITEA_CLIENT_SECRET: "{{ drone_secrets.oauth_client_secret }}" DRONE_GITEA_CLIENT_SECRET: "{{ drone_secrets.oauth_client_secret }}"
DRONE_GIT_ALWAYS_AUTH: "true" DRONE_GIT_ALWAYS_AUTH: "true"
DRONE_SERVER_HOST: "{{ drone.domain }}" DRONE_SERVER_HOST: "{{ services.drone.domain }}"
DRONE_SERVER_PROTO: "https" DRONE_SERVER_PROTO: "https"
DRONE_RPC_SECRET: "{{ drone_secrets.rpc_shared_secret }}" DRONE_RPC_SECRET: "{{ drone_secrets.rpc_shared_secret }}"
PLUGIN_CUSTOM_DNS: "91.239.100.100" PLUGIN_CUSTOM_DNS: "91.239.100.100"
VIRTUAL_HOST: "{{ drone.domain }}" VIRTUAL_HOST: "{{ services.drone.domain }}"
LETSENCRYPT_HOST: "{{ drone.domain }}" LETSENCRYPT_HOST: "{{ services.drone.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
drone-runner-docker: drone-runner-docker:
container_name: "drone-runner-docker" container_name: "drone-runner-docker"
image: "drone/drone-runner-docker:1" image: "drone/drone-runner-docker:{{ services.drone.version }}"
restart: unless-stopped restart: unless-stopped
networks: networks:
- drone - drone
volumes: volumes:
- "/var/run/docker.sock:/var/run/docker.sock" - "/var/run/docker.sock:/var/run/docker.sock"
environment: environment:
DRONE_RPC_HOST: "{{ drone.domain }}" DRONE_RPC_HOST: "{{ services.drone.domain }}"
DRONE_RPC_PROTO: "https" DRONE_RPC_PROTO: "https"
DRONE_RPC_SECRET: "{{ drone_secrets.rpc_shared_secret }}" DRONE_RPC_SECRET: "{{ drone_secrets.rpc_shared_secret }}"
DRONE_RUNNER_CAPACITY: 2 DRONE_RUNNER_CAPACITY: 2

View file

@ -7,25 +7,25 @@
- name: gitea container - name: gitea container
docker_container: docker_container:
name: gitea name: gitea
image: gitea/gitea:1.17.3 image: gitea/gitea:{{ services.gitea.version }}
restart_policy: unless-stopped restart_policy: unless-stopped
networks: networks:
- name: gitea - name: gitea
- name: postfix - name: postfix
- name: external_services - name: external_services
volumes: volumes:
- "{{ gitea.volume_folder }}:/data" - "{{ services.gitea.volume_folder }}:/data"
published_ports: published_ports:
- "22:22" - "22:22"
env: env:
VIRTUAL_HOST: "{{ gitea.domain }}" VIRTUAL_HOST: "{{ services.gitea.domain }}"
VIRTUAL_PORT: "3000" VIRTUAL_PORT: "3000"
LETSENCRYPT_HOST: "{{ gitea.domain }}" LETSENCRYPT_HOST: "{{ services.gitea.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
# Gitea customization, see: https://docs.gitea.io/en-us/install-with-docker/#customization # Gitea customization, see: https://docs.gitea.io/en-us/install-with-docker/#customization
# https://docs.gitea.io/en-us/config-cheat-sheet/#security-security # https://docs.gitea.io/en-us/config-cheat-sheet/#security-security
GITEA__mailer__ENABLED: "true" GITEA__mailer__ENABLED: "true"
GITEA__mailer__FROM: "noreply@{{ gitea.domain }}" GITEA__mailer__FROM: "noreply@{{ services.gitea.domain }}"
GITEA__mailer__MAILER_TYPE: "smtp" GITEA__mailer__MAILER_TYPE: "smtp"
GITEA__mailer__HOST: "{{ smtp_host }}:{{ smtp_port }}" GITEA__mailer__HOST: "{{ smtp_host }}:{{ smtp_port }}"
GITEA__mailer__USER: "noop" GITEA__mailer__USER: "noop"

View file

@ -1,7 +1,7 @@
--- ---
- name: create hedgedoc volume folders - name: create hedgedoc volume folders
file: file:
name: "{{ hedgedoc.volume_folder }}/{{ volume }}" name: "{{ services.hedgedoc.volume_folder }}/{{ volume }}"
state: directory state: directory
loop: loop:
- "db" - "db"
@ -12,7 +12,7 @@
- name: copy sso public certificate - name: copy sso public certificate
copy: copy:
src: "files/sso/sso.data.coop.pem" src: "files/sso/sso.data.coop.pem"
dest: "{{ hedgedoc.volume_folder }}/sso.data.coop.pem" dest: "{{ services.hedgedoc.volume_folder }}/sso.data.coop.pem"
mode: "0644" mode: "0644"
- name: setup hedgedoc - name: setup hedgedoc
@ -31,13 +31,13 @@
networks: networks:
- "hedgedoc" - "hedgedoc"
volumes: volumes:
- "{{ hedgedoc.volume_folder }}/db:/var/lib/postgresql/data" - "{{ services.hedgedoc.volume_folder }}/db:/var/lib/postgresql/data"
app: app:
image: quay.io/hedgedoc/hedgedoc:1.9.6 image: quay.io/hedgedoc/hedgedoc:{{ services.hedgedoc.version }}
environment: environment:
CMD_DB_URL: "postgres://codimd:{{ postgres_passwords.hedgedoc }}@hedgedoc_database_1:5432/codimd" CMD_DB_URL: "postgres://codimd:{{ postgres_passwords.hedgedoc }}@hedgedoc_database_1:5432/codimd"
CMD_DOMAIN: "{{ hedgedoc.domain }}" CMD_DOMAIN: "{{ services.hedgedoc.domain }}"
CMD_ALLOW_EMAIL_REGISTER: "False" CMD_ALLOW_EMAIL_REGISTER: "False"
CMD_IMAGE_UPLOAD_TYPE: "filesystem" CMD_IMAGE_UPLOAD_TYPE: "filesystem"
CMD_EMAIL: "False" CMD_EMAIL: "False"
@ -47,12 +47,12 @@
CMD_SAML_IDENTIFIERFORMAT: "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" CMD_SAML_IDENTIFIERFORMAT: "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
CMD_USECDN: "false" CMD_USECDN: "false"
CMD_PROTOCOL_USESSL: "true" CMD_PROTOCOL_USESSL: "true"
VIRTUAL_HOST: "{{ hedgedoc.domain }}" VIRTUAL_HOST: "{{ services.hedgedoc.domain }}"
LETSENCRYPT_HOST: "{{ hedgedoc.domain }}" LETSENCRYPT_HOST: "{{ services.hedgedoc.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
volumes: volumes:
- "{{ hedgedoc.volume_folder }}/hedgedoc/uploads:/hedgedoc/public/uploads" - "{{ services.hedgedoc.volume_folder }}/hedgedoc/uploads:/hedgedoc/public/uploads"
- "{{ hedgedoc.volume_folder }}/sso.data.coop.pem:/sso.data.coop.pem" - "{{ services.hedgedoc.volume_folder }}/sso.data.coop.pem:/sso.data.coop.pem"
restart: "unless-stopped" restart: "unless-stopped"
networks: networks:
- "hedgedoc" - "hedgedoc"

View file

@ -12,24 +12,24 @@
networks: networks:
- "keycloak" - "keycloak"
volumes: volumes:
- "{{ keycloak.volume_folder }}/data:/var/lib/postgresql/data" - "{{ services.keycloak.volume_folder }}/data:/var/lib/postgresql/data"
environment: environment:
POSTGRES_USER: "keycloak" POSTGRES_USER: "keycloak"
POSTGRES_PASSWORD: "{{ postgres_passwords.keycloak }}" POSTGRES_PASSWORD: "{{ postgres_passwords.keycloak }}"
POSTGRES_DB: "keycloak" POSTGRES_DB: "keycloak"
app: app:
image: "quay.io/keycloak/keycloak:20.0.1" image: "quay.io/keycloak/keycloak:{{ services.keycloak.version }}"
restart: "unless-stopped" restart: "unless-stopped"
networks: networks:
- "keycloak" - "keycloak"
- "postfix" - "postfix"
- "external_services" - "external_services"
command: "start --db=postgres --db-url=jdbc:postgresql://postgres:5432/keycloak --db-username=keycloak --db-password={{ postgres_passwords.keycloak }} --hostname={{ keycloak.domain }} --proxy=edge --https-port=8080 --http-relative-path=/auth" command: "start --db=postgres --db-url=jdbc:postgresql://postgres:5432/keycloak --db-username=keycloak --db-password={{ postgres_passwords.keycloak }} --hostname={{ services.keycloak.domain }} --proxy=edge --https-port=8080 --http-relative-path=/auth"
environment: environment:
VIRTUAL_HOST: "{{ keycloak.domain }}" VIRTUAL_HOST: "{{ services.keycloak.domain }}"
VIRTUAL_PORT: "8080" VIRTUAL_PORT: "8080"
LETSENCRYPT_HOST: "{{ keycloak.domain }}" LETSENCRYPT_HOST: "{{ services.keycloak.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks: networks:

View file

@ -2,7 +2,7 @@
- name: create mailu volume folders - name: create mailu volume folders
file: file:
name: "{{ mailu.volume_folder }}/{{ volume }}" name: "{{ services.mailu.volume_folder }}/{{ volume }}"
state: directory state: directory
loop: loop:
- redis - redis
@ -20,20 +20,20 @@
- name: upload mailu.env file - name: upload mailu.env file
template: template:
src: mailu.env.j2 src: mailu.env.j2
dest: "{{ mailu.volume_folder}}/mailu.env" dest: "{{ services.mailu.volume_folder}}/mailu.env"
- name: hard link to Let's Encrypt TLS certificate - name: hard link to Let's Encrypt TLS certificate
file: file:
src: "{{ nginx.volume_folder }}/certs/{{ mailu.domain }}/fullchain.pem" src: "{{ services.nginx_proxy.volume_folder }}/certs/{{ services.mailu.domain }}/fullchain.pem"
dest: "{{ mailu.volume_folder }}/certs/cert.pem" dest: "{{ services.mailu.volume_folder }}/certs/cert.pem"
state: hard state: hard
force: yes force: yes
when: letsencrypt_enabled when: letsencrypt_enabled
- name: hard link to Let's Encrypt TLS key - name: hard link to Let's Encrypt TLS key
file: file:
src: "{{ nginx.volume_folder }}/certs/{{ mailu.domain }}/key.pem" src: "{{ services.nginx_proxy.volume_folder }}/certs/{{ services.mailu.domain }}/key.pem"
dest: "{{ mailu.volume_folder }}/certs/key.pem" dest: "{{ services.mailu.volume_folder }}/certs/key.pem"
state: hard state: hard
force: yes force: yes
when: letsencrypt_enabled when: letsencrypt_enabled
@ -49,30 +49,30 @@
image: redis:alpine image: redis:alpine
restart: always restart: always
volumes: volumes:
- "{{ mailu.volume_folder }}/redis:/data" - "{{ services.mailu.volume_folder }}/redis:/data"
database: database:
image: mailu/postgresql:{{ mailu.version }} image: mailu/postgresql:{{ services.mailu.version }}
restart: always restart: always
env_file: "{{ mailu.volume_folder}}/mailu.env" env_file: "{{ services.mailu.volume_folder}}/mailu.env"
volumes: volumes:
- "{{ mailu.volume_folder }}/data/psql_db:/data" - "{{ services.mailu.volume_folder }}/data/psql_db:/data"
- "{{ mailu.volume_folder }}/data/psql_backup:/backup" - "{{ services.mailu.volume_folder }}/data/psql_backup:/backup"
networks: networks:
- default - default
- external_services - external_services
front: front:
image: mailu/nginx:{{ mailu.version }} image: mailu/nginx:{{ services.mailu.version }}
restart: always restart: always
env_file: "{{ mailu.volume_folder}}/mailu.env" env_file: "{{ services.mailu.volume_folder}}/mailu.env"
environment: environment:
VIRTUAL_HOST: "{{ mailu.domain }}" VIRTUAL_HOST: "{{ services.mailu.domain }}"
LETSENCRYPT_HOST: "{{ mailu.domain }}" LETSENCRYPT_HOST: "{{ services.mailu.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
volumes: volumes:
- "{{ mailu.volume_folder }}/certs:/certs" - "{{ services.mailu.volume_folder }}/certs:/certs"
- "{{ mailu.volume_folder }}/overrides/nginx:/overrides" - "{{ services.mailu.volume_folder }}/overrides/nginx:/overrides"
expose: expose:
- "80" - "80"
ports: ports:
@ -85,70 +85,70 @@
- external_services - external_services
resolver: resolver:
image: mailu/unbound:{{ mailu.version }} image: mailu/unbound:{{ services.mailu.version }}
restart: always restart: always
env_file: "{{ mailu.volume_folder}}/mailu.env" env_file: "{{ services.mailu.volume_folder}}/mailu.env"
networks: networks:
default: default:
ipv4_address: "{{ mailu.dns }}" ipv4_address: "{{ services.mailu.dns }}"
admin: admin:
image: mailu/admin:{{ mailu.version }} image: mailu/admin:{{ services.mailu.version }}
restart: always restart: always
env_file: "{{ mailu.volume_folder}}/mailu.env" env_file: "{{ services.mailu.volume_folder}}/mailu.env"
volumes: volumes:
- "{{ mailu.volume_folder }}/data:/data" - "{{ services.mailu.volume_folder }}/data:/data"
- "{{ mailu.volume_folder }}/dkim:/dkim" - "{{ services.mailu.volume_folder }}/dkim:/dkim"
depends_on: depends_on:
- redis - redis
imap: imap:
image: mailu/dovecot:{{ mailu.version }} image: mailu/dovecot:{{ services.mailu.version }}
restart: always restart: always
env_file: "{{ mailu.volume_folder}}/mailu.env" env_file: "{{ services.mailu.volume_folder}}/mailu.env"
volumes: volumes:
- "{{ mailu.volume_folder }}/mail:/mail" - "{{ services.mailu.volume_folder }}/mail:/mail"
- "{{ mailu.volume_folder }}/overrides:/overrides" - "{{ services.mailu.volume_folder }}/overrides:/overrides"
depends_on: depends_on:
- front - front
smtp: smtp:
image: mailu/postfix:{{ mailu.version }} image: mailu/postfix:{{ services.mailu.version }}
restart: always restart: always
env_file: "{{ mailu.volume_folder}}/mailu.env" env_file: "{{ services.mailu.volume_folder}}/mailu.env"
volumes: volumes:
- "{{ mailu.volume_folder }}/overrides:/overrides" - "{{ services.mailu.volume_folder }}/overrides:/overrides"
depends_on: depends_on:
- front - front
- resolver - resolver
dns: dns:
- "{{ mailu.dns }}" - "{{ services.mailu.dns }}"
antispam: antispam:
image: mailu/rspamd:{{ mailu.version }} image: mailu/rspamd:{{ services.mailu.version }}
restart: always restart: always
env_file: "{{ mailu.volume_folder}}/mailu.env" env_file: "{{ services.mailu.volume_folder}}/mailu.env"
volumes: volumes:
- "{{ mailu.volume_folder }}/filter:/var/lib/rspamd" - "{{ services.mailu.volume_folder }}/filter:/var/lib/rspamd"
- "{{ mailu.volume_folder }}/dkim:/dkim" - "{{ services.mailu.volume_folder }}/dkim:/dkim"
- "{{ mailu.volume_folder }}/overrides/rspamd:/etc/rspamd/override.d" - "{{ services.mailu.volume_folder }}/overrides/rspamd:/etc/rspamd/override.d"
depends_on: depends_on:
- front - front
- resolver - resolver
dns: dns:
- "{{ mailu.dns }}" - "{{ services.mailu.dns }}"
webmail: webmail:
image: mailu/rainloop:1.6 image: mailu/rainloop:1.6
restart: always restart: always
env_file: "{{ mailu.volume_folder}}/mailu.env" env_file: "{{ services.mailu.volume_folder}}/mailu.env"
volumes: volumes:
- "{{ mailu.volume_folder }}/webmail:/data" - "{{ services.mailu.volume_folder }}/webmail:/data"
depends_on: depends_on:
- front - front
- resolver - resolver
dns: dns:
- "{{ mailu.dns }}" - "{{ services.mailu.dns }}"
networks: networks:
default: default:
@ -156,7 +156,7 @@
ipam: ipam:
driver: default driver: default
config: config:
- subnet: "{{ mailu.subnet }}" - subnet: "{{ services.mailu.subnet }}"
external_services: external_services:
external: external:
name: external_services name: external_services

View file

@ -1,6 +1,6 @@
- name: create mastodon volume folders - name: create mastodon volume folders
file: file:
name: "{{ mastodon.volume_folder }}/{{ volume }}" name: "{{ services.mastodon.volume_folder }}/{{ volume }}"
state: directory state: directory
owner: "991" owner: "991"
group: "991" group: "991"
@ -14,12 +14,12 @@
- name: Copy mastodon environment file - name: Copy mastodon environment file
template: template:
src: files/configs/mastodon/env_file.j2 src: files/configs/mastodon/env_file.j2
dest: "{{ mastodon.volume_folder }}/env_file" dest: "{{ services.mastodon.volume_folder }}/env_file"
- name: upload vhost config for root domain - name: upload vhost config for root domain
template: template:
src: files/configs/mastodon/vhost-mastodon src: files/configs/mastodon/vhost-mastodon
dest: "{{ nginx.volume_folder }}/vhost/{{ mastodon.domain }}" dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.mastodon.domain }}"
- name: set up mastodon - name: set up mastodon
docker_compose: docker_compose:
@ -37,7 +37,7 @@
healthcheck: healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres'] test: ['CMD', 'pg_isready', '-U', 'postgres']
volumes: volumes:
- "{{ mastodon.volume_folder }}/postgres_data:/var/lib/postgresql/data" - "{{ services.mastodon.volume_folder }}/postgres_data:/var/lib/postgresql/data"
environment: environment:
- 'POSTGRES_HOST_AUTH_METHOD=trust' - 'POSTGRES_HOST_AUTH_METHOD=trust'
@ -49,12 +49,12 @@
healthcheck: healthcheck:
test: ['CMD', 'redis-cli', 'ping'] test: ['CMD', 'redis-cli', 'ping']
volumes: volumes:
- "{{ mastodon.volume_folder }}/redis_data:/data" - "{{ services.mastodon.volume_folder }}/redis_data:/data"
web: web:
image: "tootsuite/mastodon:{{ mastodon_version }}" image: "tootsuite/mastodon:{{ services.mastodon.version }}"
restart: always restart: always
env_file: "{{ mastodon.volume_folder }}/env_file" env_file: "{{ services.mastodon.volume_folder }}/env_file"
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000" command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
networks: networks:
- external_services - external_services
@ -66,18 +66,18 @@
- db - db
- redis - redis
volumes: volumes:
- "{{ mastodon.volume_folder }}/mastodon_data:/mastodon/public/system" - "{{ services.mastodon.volume_folder }}/mastodon_data:/mastodon/public/system"
environment: environment:
VIRTUAL_HOST: "{{ mastodon.domain }}" VIRTUAL_HOST: "{{ services.mastodon.domain }}"
VIRTUAL_PORT: "3000" VIRTUAL_PORT: "3000"
VIRTUAL_PATH: "/" VIRTUAL_PATH: "/"
LETSENCRYPT_HOST: "{{ mastodon.domain }}" LETSENCRYPT_HOST: "{{ services.mastodon.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
streaming: streaming:
image: "tootsuite/mastodon:{{ mastodon_version }}" image: "tootsuite/mastodon:{{ services.mastodon.version }}"
restart: always restart: always
env_file: "{{ mastodon.volume_folder }}/env_file" env_file: "{{ services.mastodon.volume_folder }}/env_file"
command: node ./streaming command: node ./streaming
networks: networks:
- external_services - external_services
@ -91,14 +91,14 @@
- db - db
- redis - redis
environment: environment:
VIRTUAL_HOST: "{{ mastodon.domain }}" VIRTUAL_HOST: "{{ services.mastodon.domain }}"
VIRTUAL_PORT: "4000" VIRTUAL_PORT: "4000"
VIRTUAL_PATH: "/api/v1/streaming" VIRTUAL_PATH: "/api/v1/streaming"
sidekiq: sidekiq:
image: "tootsuite/mastodon:{{ mastodon_version }}" image: "tootsuite/mastodon:{{ services.mastodon.version }}"
restart: always restart: always
env_file: "{{ mastodon.volume_folder }}/env_file" env_file: "{{ services.mastodon.volume_folder }}/env_file"
command: bundle exec sidekiq -c 32 command: bundle exec sidekiq -c 32
environment: environment:
DB_POOL: 32 DB_POOL: 32
@ -110,7 +110,7 @@
- external_services - external_services
- internal_network - internal_network
volumes: volumes:
- "{{ mastodon.volume_folder }}/mastodon_data:/mastodon/public/system" - "{{ services.mastodon.volume_folder }}/mastodon_data:/mastodon/public/system"
healthcheck: healthcheck:
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"] test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
@ -121,5 +121,3 @@
external: true external: true
internal_network: internal_network:
internal: true internal: true
vars:
mastodon_version: "v4.0.2"

View file

@ -1,7 +1,7 @@
--- ---
- name: create matrix volume folders - name: create matrix volume folders
file: file:
name: "{{ matrix.volume_folder }}/{{ volume }}" name: "{{ services.matrix.volume_folder }}/{{ volume }}"
state: directory state: directory
owner: "991" owner: "991"
group: "991" group: "991"
@ -14,12 +14,12 @@
- name: create matrix DB folder - name: create matrix DB folder
file: file:
name: "{{ matrix.volume_folder }}/db" name: "{{ services.matrix.volume_folder }}/db"
state: "directory" state: "directory"
- name: create riot volume folders - name: create riot volume folders
file: file:
name: "{{ riot.volume_folder }}/{{ volume }}" name: "{{ services.riot.volume_folder }}/{{ volume }}"
state: directory state: directory
loop: loop:
- "data" - "data"
@ -29,38 +29,38 @@
- name: upload riot config.json - name: upload riot config.json
template: template:
src: files/configs/riot/config.json src: files/configs/riot/config.json
dest: "{{ riot.volume_folder }}/data/config.json" dest: "{{ services.riot.volume_folder }}/data/config.json"
- name: upload riot.im.conf - name: upload riot.im.conf
template: template:
src: files/configs/riot/riot.im.conf src: files/configs/riot/riot.im.conf
dest: "{{ riot.volume_folder }}/data/riot.im.conf" dest: "{{ services.riot.volume_folder }}/data/riot.im.conf"
- name: upload vhost config for root domain - name: upload vhost config for root domain
template: template:
src: files/configs/matrix/vhost-root src: files/configs/matrix/vhost-root
dest: "{{ nginx.volume_folder }}/vhost/{{ base_domain }}" dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ base_domain }}"
- name: upload vhost config for matrix domain - name: upload vhost config for matrix domain
template: template:
src: files/configs/matrix/vhost-matrix src: files/configs/matrix/vhost-matrix
dest: "{{ nginx.volume_folder }}/vhost/{{ matrix.domain }}" dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.matrix.domain }}"
- name: upload vhost config for riot domain - name: upload vhost config for riot domain
template: template:
src: files/configs/matrix/vhost-riot src: files/configs/matrix/vhost-riot
dest: "{{ nginx.volume_folder }}/vhost/{{ item }}" dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ item }}"
loop: "{{ riot.domains }}" loop: "{{ services.riot.domains }}"
- name: upload homeserver.yaml - name: upload homeserver.yaml
template: template:
src: "files/configs/matrix/homeserver.yaml.j2" src: "files/configs/matrix/homeserver.yaml.j2"
dest: "{{ matrix.volume_folder }}/data/homeserver.yaml" dest: "{{ services.matrix.volume_folder }}/data/homeserver.yaml"
- name: upload matrix logging config - name: upload matrix logging config
template: template:
src: "files/configs/matrix/matrix.data.coop.log.config" src: "files/configs/matrix/matrix.data.coop.log.config"
dest: "{{ matrix.volume_folder }}/data/matrix.data.coop.log.config" dest: "{{ services.matrix.volume_folder }}/data/matrix.data.coop.log.config"
- name: set up matrix and riot - name: set up matrix and riot
docker_compose: docker_compose:
@ -76,32 +76,32 @@
networks: networks:
- matrix - matrix
volumes: volumes:
- "{{ matrix.volume_folder }}/db:/var/lib/postgresql/data" - "{{ services.matrix.volume_folder }}/db:/var/lib/postgresql/data"
environment: environment:
POSTGRES_USER: "synapse" POSTGRES_USER: "synapse"
POSTGRES_PASSWORD: "{{ postgres_passwords.matrix }}" POSTGRES_PASSWORD: "{{ postgres_passwords.matrix }}"
matrix_app: matrix_app:
container_name: matrix container_name: matrix
image: matrixdotorg/synapse:v1.63.1 image: matrixdotorg/synapse:{{ services.matrix.version }}
restart: unless-stopped restart: unless-stopped
networks: networks:
- matrix - matrix
- external_services - external_services
volumes: volumes:
- "{{ matrix.volume_folder }}/data:/data" - "{{ services.matrix.volume_folder }}/data:/data"
environment: environment:
SYNAPSE_CONFIG_PATH: "/data/homeserver.yaml" SYNAPSE_CONFIG_PATH: "/data/homeserver.yaml"
SYNAPSE_CACHE_FACTOR: "2" SYNAPSE_CACHE_FACTOR: "2"
SYNAPSE_LOG_LEVEL: "INFO" SYNAPSE_LOG_LEVEL: "INFO"
VIRTUAL_HOST: "{{ matrix.domain }}" VIRTUAL_HOST: "{{ services.matrix.domain }}"
VIRTUAL_PORT: "8008" VIRTUAL_PORT: "8008"
LETSENCRYPT_HOST: "{{ matrix.domain }}" LETSENCRYPT_HOST: "{{ services.matrix.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
riot: riot:
container_name: riot_app container_name: riot_app
image: avhost/docker-matrix-riot:v1.11.8 image: avhost/docker-matrix-riot:{{ services.riot.version }}
restart: unless-stopped restart: unless-stopped
networks: networks:
- matrix - matrix
@ -109,11 +109,11 @@
expose: expose:
- 8080 - 8080
volumes: volumes:
- "{{ riot.volume_folder }}/data:/data" - "{{ services.riot.volume_folder }}/data:/data"
environment: environment:
VIRTUAL_HOST: "{{ riot.domains|join(',') }}" VIRTUAL_HOST: "{{ services.riot.domains|join(',') }}"
VIRTUAL_PORT: "8080" VIRTUAL_PORT: "8080"
LETSENCRYPT_HOST: "{{ riot.domains|join(',') }}" LETSENCRYPT_HOST: "{{ services.riot.domains|join(',') }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks: networks:

View file

@ -3,7 +3,7 @@
- name: setup netdata docker container for system monitoring - name: setup netdata docker container for system monitoring
docker_container: docker_container:
name: netdata name: netdata
image: netdata/netdata image: netdata/netdata:{{ services.netdata.version }}
restart_policy: unless-stopped restart_policy: unless-stopped
hostname: "hevonen.servers.{{ base_domain }}" hostname: "hevonen.servers.{{ base_domain }}"
capabilities: capabilities:
@ -17,8 +17,8 @@
networks: networks:
- name: external_services - name: external_services
env: env:
VIRTUAL_HOST : "{{ netdata.domain }}" VIRTUAL_HOST : "{{ services.netdata.domain }}"
LETSENCRYPT_HOST: "{{ netdata.domain }}" LETSENCRYPT_HOST: "{{ services.netdata.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
PGID: "999" PGID: "999"
labels: labels:

View file

@ -2,7 +2,7 @@
- name: upload vhost config for cloud.data.coop - name: upload vhost config for cloud.data.coop
template: template:
src: files/configs/nextcloud/vhost src: files/configs/nextcloud/vhost
dest: "{{ nginx.volume_folder }}/vhost/{{ nextcloud.domain }}" dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.nextcloud.domain }}"
notify: "restart nginx" notify: "restart nginx"
- name: setup nextcloud containers - name: setup nextcloud containers
@ -17,7 +17,7 @@
networks: networks:
- "nextcloud" - "nextcloud"
volumes: volumes:
- "{{ nextcloud.volume_folder }}/postgres:/var/lib/postgresql/data" - "{{ services.nextcloud.volume_folder }}/postgres:/var/lib/postgresql/data"
environment: environment:
POSTGRES_DB: "nextcloud" POSTGRES_DB: "nextcloud"
POSTGRES_PASSWORD: "{{ postgres_passwords.nextcloud }}" POSTGRES_PASSWORD: "{{ postgres_passwords.nextcloud }}"
@ -33,7 +33,7 @@
- "nextcloud" - "nextcloud"
cron: cron:
image: "nextcloud:25-apache" image: "nextcloud:{{ services.nextcloud.version }}"
restart: "unless-stopped" restart: "unless-stopped"
entrypoint: "/cron.sh" entrypoint: "/cron.sh"
networks: networks:
@ -45,14 +45,14 @@
- "redis" - "redis"
app: app:
image: "nextcloud:25-apache" image: "nextcloud:{{ services.nextcloud.version }}"
restart: "unless-stopped" restart: "unless-stopped"
networks: networks:
- "nextcloud" - "nextcloud"
- "postfix" - "postfix"
- "external_services" - "external_services"
volumes: volumes:
- "{{ nextcloud.volume_folder }}/app:/var/www/html" - "{{ services.nextcloud.volume_folder }}/app:/var/www/html"
environment: environment:
VIRTUAL_HOST: "{{ nextcloud.domain }}" VIRTUAL_HOST: "{{ nextcloud.domain }}"
LETSENCRYPT_HOST: "{{ nextcloud.domain }}" LETSENCRYPT_HOST: "{{ nextcloud.domain }}"

View file

@ -2,7 +2,7 @@
- name: create nginx-proxy volume folders - name: create nginx-proxy volume folders
file: file:
name: "{{ nginx.volume_folder }}/{{ volume }}" name: "{{ services.nginx_proxy.volume_folder }}/{{ volume }}"
state: directory state: directory
loop: loop:
- conf - conf
@ -16,7 +16,7 @@
- name: nginx proxy container - name: nginx proxy container
docker_container: docker_container:
name: nginx-proxy name: nginx-proxy
image: nginxproxy/nginx-proxy:1.0-alpine image: nginxproxy/nginx-proxy:{{ services.nginx_proxy.version }}
restart_policy: always restart_policy: always
networks: networks:
- name: external_services - name: external_services
@ -24,23 +24,23 @@
- "80:80" - "80:80"
- "443:443" - "443:443"
volumes: volumes:
- "{{ nginx.volume_folder }}/conf:/etc/nginx/conf.d" - "{{ services.nginx_proxy.volume_folder }}/conf:/etc/nginx/conf.d"
- "{{ nginx.volume_folder }}/vhost:/etc/nginx/vhost.d" - "{{ services.nginx_proxy.volume_folder }}/vhost:/etc/nginx/vhost.d"
- "{{ nginx.volume_folder }}/html:/usr/share/nginx/html" - "{{ services.nginx_proxy.volume_folder }}/html:/usr/share/nginx/html"
- "{{ nginx.volume_folder }}/dhparam:/etc/nginx/dhparam" - "{{ services.nginx_proxy.volume_folder }}/dhparam:/etc/nginx/dhparam"
- "{{ nginx.volume_folder }}/certs:/etc/nginx/certs:ro" - "{{ services.nginx_proxy.volume_folder }}/certs:/etc/nginx/certs:ro"
- /var/run/docker.sock:/tmp/docker.sock:ro - /var/run/docker.sock:/tmp/docker.sock:ro
- name: nginx letsencrypt container - name: nginx letsencrypt container
docker_container: docker_container:
name: nginx-proxy-le name: nginx-proxy-le
image: nginxproxy/acme-companion:2.2 image: nginxproxy/acme-companion:{{ services.nginx_acme_companion.version }}
restart_policy: always restart_policy: always
volumes: volumes:
- "{{ nginx.volume_folder }}/vhost:/etc/nginx/vhost.d" - "{{ services.nginx_proxy.volume_folder }}/vhost:/etc/nginx/vhost.d"
- "{{ nginx.volume_folder }}/html:/usr/share/nginx/html" - "{{ services.nginx_proxy.volume_folder }}/html:/usr/share/nginx/html"
- "{{ nginx.volume_folder }}/dhparam:/etc/nginx/dhparam:ro" - "{{ services.nginx_proxy.volume_folder }}/dhparam:/etc/nginx/dhparam:ro"
- "{{ nginx.volume_folder }}/certs:/etc/nginx/certs" - "{{ services.nginx_proxy.volume_folder }}/certs:/etc/nginx/certs"
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
env: env:
NGINX_PROXY_CONTAINER: nginx-proxy NGINX_PROXY_CONTAINER: nginx-proxy

View file

@ -1,7 +1,7 @@
--- ---
- name: create ldap volume folders - name: create ldap volume folders
file: file:
name: "{{ ldap.volume_folder }}/{{ volume }}" name: "{{ services.openldap.volume_folder }}/{{ volume }}"
state: directory state: directory
loop: loop:
- "var/lib/ldap" - "var/lib/ldap"
@ -17,19 +17,19 @@
- name: openLDAP container - name: openLDAP container
docker_container: docker_container:
name: openldap name: openldap
image: osixia/openldap:1.5.0 image: osixia/openldap:{{ services.openldap.version }}
tty: true tty: true
interactive: true interactive: true
restart_policy: unless-stopped restart_policy: unless-stopped
volumes: volumes:
- "{{ ldap.volume_folder }}/var/lib/ldap:/var/lib/ldap" - "{{ services.openldap.volume_folder }}/var/lib/ldap:/var/lib/ldap"
- "{{ ldap.volume_folder }}/etc/slapd.d:/etc/ldap/slapd.d" - "{{ services.openldap.volume_folder }}/etc/slapd.d:/etc/ldap/slapd.d"
- "{{ ldap.volume_folder }}/certs:/container/service/slapd/assets/certs/" - "{{ services.openldap.volume_folder }}/certs:/container/service/slapd/assets/certs/"
published_ports: published_ports:
- "389:389" - "389:389"
- "636:636" - "636:636"
hostname: "{{ ldap.domain }}" hostname: "{{ services.openldap.domain }}"
domainname: "{{ ldap.domain }}" # important: same as hostname domainname: "{{ services.openldap.domain }}" # important: same as hostname
networks: networks:
- name: ldap - name: ldap
env: env:
@ -58,7 +58,7 @@
- name: phpLDAPadmin container - name: phpLDAPadmin container
docker_container: docker_container:
name: phpldapadmin name: phpldapadmin
image: osixia/phpldapadmin:0.9.0 image: osixia/phpldapadmin:{{ services.phpldapadmin.version }}
restart_policy: unless-stopped restart_policy: unless-stopped
networks: networks:
- name: external_services - name: external_services
@ -68,6 +68,6 @@
PHPLDAPADMIN_HTTPS: "false" PHPLDAPADMIN_HTTPS: "false"
PHPLDAPADMIN_TRUST_PROXY_SSL: "true" PHPLDAPADMIN_TRUST_PROXY_SSL: "true"
VIRTUAL_HOST: "{{ ldap.domain }}" VIRTUAL_HOST: "{{ services.openldap.domain }}"
LETSENCRYPT_HOST: "{{ ldap.domain }}" LETSENCRYPT_HOST: "{{ services.openldap.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"

View file

@ -13,13 +13,13 @@
networks: networks:
- "passit" - "passit"
volumes: volumes:
- "{{ passit.volume_folder }}/data:/var/lib/postgresql/data" - "{{ services.passit.volume_folder }}/data:/var/lib/postgresql/data"
environment: environment:
POSTGRES_USER: "passit" POSTGRES_USER: "passit"
POSTGRES_PASSWORD: "{{ postgres_passwords.passit }}" POSTGRES_PASSWORD: "{{ postgres_passwords.passit }}"
passit_app: passit_app:
image: "passit/passit:stable" image: "passit/passit:{{ services.passit.version }}"
command: "bin/start.sh" command: "bin/start.sh"
restart: "always" restart: "always"
networks: networks:
@ -31,11 +31,11 @@
SECRET_KEY: "{{ passit_secret_key }}" SECRET_KEY: "{{ passit_secret_key }}"
IS_DEBUG: 'False' IS_DEBUG: 'False'
EMAIL_URL: "smtp://noop@{{ smtp_host }}:{{ smtp_port }}" EMAIL_URL: "smtp://noop@{{ smtp_host }}:{{ smtp_port }}"
DEFAULT_FROM_EMAIL: "noreply@{{ passit.domain }}" DEFAULT_FROM_EMAIL: "noreply@{{ services.passit.domain }}"
EMAIL_CONFIRMATION_HOST: "https://{{ passit.domain }}" EMAIL_CONFIRMATION_HOST: "https://{{ services.passit.domain }}"
FIDO_SERVER_ID: "{{ passit.domain }}" FIDO_SERVER_ID: "{{ services.passit.domain }}"
VIRTUAL_HOST: "{{ passit.domain }}" VIRTUAL_HOST: "{{ services.passit.domain }}"
LETSENCRYPT_HOST: "{{ passit.domain }}" LETSENCRYPT_HOST: "{{ services.passit.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks: networks:

View file

@ -2,21 +2,21 @@
- name: create portainer volume folder - name: create portainer volume folder
file: file:
name: "{{ portainer.volume_folder }}" name: "{{ services.portainer.volume_folder }}"
state: directory state: directory
- name: run portainer - name: run portainer
docker_container: docker_container:
name: portainer name: portainer
image: portainer/portainer-ee:2.16.2 image: portainer/portainer-ee:{{ services.portainer.version }}
restart_policy: always restart_policy: always
networks: networks:
- name: external_services - name: external_services
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- "{{ portainer.volume_folder }}:/data" - "{{ services.portainer.volume_folder }}:/data"
env: env:
VIRTUAL_HOST: "{{ portainer.domain }}" VIRTUAL_HOST: "{{ services.portainer.domain }}"
VIRTUAL_PORT: "9000" VIRTUAL_PORT: "9000"
LETSENCRYPT_HOST: "{{ portainer.domain }}" LETSENCRYPT_HOST: "{{ services.portainer.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"

View file

@ -10,7 +10,7 @@
- name: setup postfix docker container for outgoing mail - name: setup postfix docker container for outgoing mail
docker_container: docker_container:
name: postfix name: postfix
image: boky/postfix:v3.5.0 image: boky/postfix:{{ services.postfix.version }}
restart_policy: always restart_policy: always
networks: networks:
- name: postfix - name: postfix

View file

@ -2,7 +2,7 @@
- name: create privatebin volume folders - name: create privatebin volume folders
file: file:
name: "{{ privatebin.volume_folder }}/{{ volume }}" name: "{{ services.privatebin.volume_folder }}/{{ volume }}"
state: directory state: directory
loop: loop:
- cfg - cfg
@ -13,19 +13,19 @@
- name: upload privatebin config - name: upload privatebin config
template: template:
src: files/configs/privatebin-conf.php src: files/configs/privatebin-conf.php
dest: "{{ privatebin.volume_folder }}/cfg/conf.php" dest: "{{ services.privatebin.volume_folder }}/cfg/conf.php"
- name: privatebin app container - name: privatebin app container
docker_container: docker_container:
name: privatebin name: privatebin
image: jgeusebroek/privatebin:latest image: jgeusebroek/privatebin:{{ services.privatebin.version }}
restart_policy: unless-stopped restart_policy: unless-stopped
volumes: volumes:
- "{{ privatebin.volume_folder }}/cfg:/privatebin/cfg" - "{{ services.privatebin.volume_folder }}/cfg:/privatebin/cfg"
- "{{ privatebin.volume_folder }}/data:/privatebin/data" - "{{ services.privatebin.volume_folder }}/data:/privatebin/data"
networks: networks:
- name: external_services - name: external_services
env: env:
VIRTUAL_HOST: "{{ privatebin.domain }}" VIRTUAL_HOST: "{{ services.privatebin.domain }}"
LETSENCRYPT_HOST: "{{ privatebin.domain }}" LETSENCRYPT_HOST: "{{ services.privatebin.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"

View file

@ -1,12 +1,12 @@
- name: Create rallly volume folders - name: Create rallly volume folders
file: file:
name: "{{ rallly.volume_folder }}/postgres" name: "{{ services.rallly.volume_folder }}/postgres"
state: directory state: directory
- name: Copy Rallly environment file - name: Copy Rallly environment file
template: template:
src: files/configs/rallly/env_file.j2 src: files/configs/rallly/env_file.j2
dest: "{{ rallly.volume_folder }}/env_file" dest: "{{ services.rallly.volume_folder }}/env_file"
- name: Set up Rallly - name: Set up Rallly
docker_compose: docker_compose:
@ -22,7 +22,7 @@
networks: networks:
rallly_internal: rallly_internal:
volumes: volumes:
- "{{ rallly.volume_folder }}/postgres:/var/lib/postgresql/data" - "{{ services.rallly.volume_folder }}/postgres:/var/lib/postgresql/data"
environment: environment:
POSTGRES_PASSWORD: "{{ postgres_passwords.rallly }}" POSTGRES_PASSWORD: "{{ postgres_passwords.rallly }}"
POSTGRES_DB: "rallly_db" POSTGRES_DB: "rallly_db"
@ -35,7 +35,7 @@
com.centurylinklabs.watchtower.enable: "true" com.centurylinklabs.watchtower.enable: "true"
rallly: rallly:
image: "lukevella/rallly:a21f92bf74308d66cfcd545d49b81eba0211a222" image: "lukevella/rallly:{{ services.rallly.version }}"
restart: "always" restart: "always"
networks: networks:
rallly_internal: rallly_internal:
@ -45,11 +45,11 @@
rallly_db: rallly_db:
condition: "service_healthy" condition: "service_healthy"
env_file: env_file:
- "{{ rallly.volume_folder }}/env_file" - "{{ services.rallly.volume_folder }}/env_file"
environment: environment:
VIRTUAL_HOST: "{{ rallly.domain }}" VIRTUAL_HOST: "{{ services.rallly.domain }}"
VIRTUAL_PORT: "3000" VIRTUAL_PORT: "3000"
LETSENCRYPT_HOST: "{{ rallly.domain }}" LETSENCRYPT_HOST: "{{ services.rallly.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
labels: labels:
com.centurylinklabs.watchtower.enable: "true" com.centurylinklabs.watchtower.enable: "true"

View file

@ -8,12 +8,12 @@
version: '3.6' version: '3.6'
services: services:
restic-backup: restic-backup:
image: mazzolino/restic:1.6.0 image: mazzolino/restic:{{ services.restic.version }}
restart: always restart: always
environment: environment:
RUN_ON_STARTUP: "true" RUN_ON_STARTUP: "true"
BACKUP_CRON: "0 30 3 * * *" BACKUP_CRON: "0 30 3 * * *"
RESTIC_REPOSITORY: "rest:https://{{ restic.user }}:{{ restic_secrets.user_password }}@{{ restic.domain }}/{{ restic.repository }}" RESTIC_REPOSITORY: "rest:https://{{ services.restic.user }}:{{ restic_secrets.user_password }}@{{ services.restic.domain }}/{{ services.restic.repository }}"
RESTIC_PASSWORD: "{{ restic_secrets.repository_password }}" RESTIC_PASSWORD: "{{ restic_secrets.repository_password }}"
RESTIC_BACKUP_SOURCES: "/mnt/volumes" RESTIC_BACKUP_SOURCES: "/mnt/volumes"
RESTIC_BACKUP_ARGS: >- RESTIC_BACKUP_ARGS: >-
@ -30,10 +30,10 @@
- /docker-volumes:/mnt/volumes:ro - /docker-volumes:/mnt/volumes:ro
restic-prune: restic-prune:
image: "mazzolino/restic:1.6.0" image: "mazzolino/restic:{{ services.restic.version }}"
environment: environment:
RUN_ON_STARTUP: "true" RUN_ON_STARTUP: "true"
PRUNE_CRON: "0 0 4 * * *" PRUNE_CRON: "0 0 4 * * *"
RESTIC_REPOSITORY: "rest:https://{{ restic.user }}:{{ restic_secrets.user_password }}@{{ restic.domain }}/{{ restic.repository }}" RESTIC_REPOSITORY: "rest:https://{{ services.restic.user }}:{{ restic_secrets.user_password }}@{{ services.restic.domain }}/{{ services.restic.repository }}"
RESTIC_PASSWORD: "{{ restic_secrets.repository_password }}" RESTIC_PASSWORD: "{{ restic_secrets.repository_password }}"
TZ: Europe/copenhagen TZ: Europe/copenhagen

View file

@ -8,7 +8,7 @@
- name: external_services - name: external_services
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- "{{ docker_registry.volume_folder }}/auth/config.json:/config.json" - "{{ services.docker_registry.volume_folder }}/auth/config.json:/config.json"
env: env:
WATCHTOWER_LABEL_ENABLE: "true" WATCHTOWER_LABEL_ENABLE: "true"
WATCHTOWER_POLL_INTERVAL: "60" WATCHTOWER_POLL_INTERVAL: "60"

View file

@ -26,7 +26,7 @@ SECRET_KEY={{ mailu_secret_key }}
# PUBLIC_IPV6= ::1 (default: ::1) # PUBLIC_IPV6= ::1 (default: ::1)
# Subnet of the docker network. This should not conflict with any networks to which your system is connected. (Internal and external!) # Subnet of the docker network. This should not conflict with any networks to which your system is connected. (Internal and external!)
SUBNET={{ mailu.subnet }} SUBNET={{ services.mailu.subnet }}
# Main mail domain # Main mail domain
DOMAIN=data.coop DOMAIN=data.coop