From 60f1a9a95f283159b55e878f0fb760a2fc91c0e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Sat, 19 Jan 2019 18:11:50 +0100 Subject: [PATCH] Adding fider and openldap services. --- roles/docker/files/composefiles/fider.yml | 43 ++++++++++++++ roles/docker/files/composefiles/openldap.yml | 61 ++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 roles/docker/files/composefiles/fider.yml create mode 100644 roles/docker/files/composefiles/openldap.yml diff --git a/roles/docker/files/composefiles/fider.yml b/roles/docker/files/composefiles/fider.yml new file mode 100644 index 0000000..6673712 --- /dev/null +++ b/roles/docker/files/composefiles/fider.yml @@ -0,0 +1,43 @@ +version: '3' +services: + db: + restart: always + image: postgres + networks: + - fider + volumes: + - /var/fider/pg_data:/var/lib/postgresql/data + environment: + POSTGRES_USER: fider + POSTGRES_PASSWORD: "SOMESTRONGPASSWORD" + + app: + restart: always + image: getfider/fider:stable + ports: + - "9999:3000" + networks: + - fider + - external_services + environment: + GO_ENV: production + DATABASE_URL: postgres://fider:SOMESTRONGPASSWORD@db:5432/fider?sslmode=disable + JWT_SECRET: LONGRANDOMSTRING + + EMAIL_NOREPLY: noreply@data.coop + EMAIL_SMTP_HOST: smtp.fastmail.com + EMAIL_SMTP_PORT: 587 + EMAIL_SMTP_USERNAME: a_smtp_user + EMAIL_SMTP_PASSWORD: password_for_smtp_user + + VIRTUAL_HOST: feedback.data.coop + LETSENCRYPT_HOST: feedback.data.coop + LETSENCRYPT_EMAIL: valberg@orn.li + + depends_on: + - db + +networks: + fider: + external_services: + external: true diff --git a/roles/docker/files/composefiles/openldap.yml b/roles/docker/files/composefiles/openldap.yml new file mode 100644 index 0000000..d1908c3 --- /dev/null +++ b/roles/docker/files/composefiles/openldap.yml @@ -0,0 +1,61 @@ +version: '3' +services: + openldap: + image: osixia/openldap:1.2.2 + container_name: openldap + environment: + LDAP_LOG_LEVEL: "256" + LDAP_ORGANISATION: "data.coop" + LDAP_DOMAIN: "data.coop" + LDAP_BASE_DN: "" + LDAP_ADMIN_PASSWORD: "admin" + LDAP_CONFIG_PASSWORD: "config" + LDAP_READONLY_USER: "true" + LDAP_READONLY_USER_USERNAME: "readonly" + LDAP_READONLY_USER_PASSWORD: "readonly" + LDAP_RFC2307BIS_SCHEMA: "false" + LDAP_BACKEND: "mdb" + LDAP_TLS: "true" + LDAP_TLS_CRT_FILENAME: "ldap.crt" + LDAP_TLS_KEY_FILENAME: "ldap.key" + LDAP_TLS_CA_CRT_FILENAME: "ca.crt" + LDAP_TLS_ENFORCE: "false" + LDAP_TLS_CIPHER_SUITE: "SECURE256:-VERS-SSL3.0" + LDAP_TLS_PROTOCOL_MIN: "3.1" + LDAP_TLS_VERIFY_CLIENT: "demand" + LDAP_REPLICATION: "false" + KEEP_EXISTING_CONFIG: "false" + LDAP_REMOVE_CONFIG_AFTER_SETUP: "true" + LDAP_SSL_HELPER_PREFIX: "ldap" + tty: true + stdin_open: true + volumes: + - /var/lib/ldap + - /etc/ldap/slapd.d + - /container/service/slapd/assets/certs/ + ports: + - "389:389" + - "636:636" + domainname: "ldap.data.coop" # important: same as hostname + hostname: "ldap.data.coop" + networks: + - external_services + + phpldapadmin: + image: osixia/phpldapadmin:latest + container_name: phpldapadmin + environment: + PHPLDAPADMIN_LDAP_HOSTS: "openldap" + PHPLDAPADMIN_HTTPS: "false" + PHPLDAPADMIN_TRUST_PROXY_SSL: "true" + VIRTUAL_HOST: ldap.data.coop + LETSENCRYPT_HOST: ldap.data.coop + LETSENCRYPT_EMAIL: valberg@orn.li + depends_on: + - openldap + networks: + - external_services + +networks: + external_services: + external: true