Skip to content

medienhaus/medienhaus-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

medienhaus/

Customizable, modular, free and open-source environment for decentralized, distributed communication and collaboration without third-party dependencies.

WebsiteFediverse


medienhaus-docker

This repository contains our Docker composition for a containerized runtime environment of medienhaus-spaces + medienhaus-api + medienhaus-cms including matrix-synapse, element-web, etherpad-lite, spacedeck-open, and lldap.

🧩 For local development of medienhaus-spaces, use the simplified medienhaus-docker-dev composition.

Instructions

  1. git clone the medienhaus-docker repository and change directory

    git clone https://github.com/medienhaus/medienhaus-docker.git && \
    cd medienhaus-docker/
    
  2. fetch contents of submodules

    git submodule update --init
    
  3. create .env file from example

    cp .env.example .env
    
    ${VISUAL:-${EDITOR:-vim}} .env
    

    ⚠️ For production, please change at least the following environment variables❗️

    • ADMIN_CONTACT_LETSENCRYPT for issuing SSL certificates via traefik
    • BASE_URL to your fully qualified domain name, e.g. spaces.example.org
    • HTTP_SCHEMA to https for enabling https context for all services
    • change_me to generated long, random, and secure passwords/secrets

    💭 Generate long, random, and secure passwords/secrets via openssl command:

    openssl rand -hex 32
    

    💭 This can also be done programmatically, if the .env file does not(!) exist, via bash:

    if [[ ! -r .env ]]; then
      while IFS= read -r line; do
        sed "s/change_me/$(openssl rand -hex 32)/" <<< "$line"
      done < .env.example > .env
    fi
    
  4. create docker-compose.yml file from example

    cp docker-compose.example.yml docker-compose.yml
    

    ⚠️ For production, please use docker-compose.example.websecure.yml with secured https context❗️

    cp docker-compose.example.websecure.yml docker-compose.yml
    
  5. create config files from template/* files and .env variables

    ./scripts/envsubst.sh
    
  6. start docker composition

    docker compose up -d
    
  7. create matrix-synapse account for medienhaus-*

    ./scripts/init.sh
    
    ⚠️ For including medienhaus-api and/or medienhaus-cms, use these commands instead❗️

    For including medienhaus-api, run the following:

    ./scripts/init.sh --api
    

    For including medienhaus-cms, run the following:

    ./scripts/init.sh --cms
    

    For including medienhaus-api and medienhaus-cms, run the following:

    ./scripts/init.sh --all
    

    The script can list these commands with the --help argument:

    ./scripts/init.sh --help
    

  1. re-create config files from template/* files and .env variables including medienhaus-* services

    ./scripts/envsubst.sh
    

    ⚠️ For including medienhaus-api and/or medienhaus-cms, use these commands instead❗️

    For including medienhaus-api, run the following:

    ./scripts/envsubst.sh --api
    

    For including medienhaus-cms, run the following:

    ./scripts/envsubst.sh --cms
    

    For including medienhaus-api and medienhaus-cms, run the following:

    ./scripts/envsubst.sh --all
    

    The script can list these commands with the --help argument:

    ./scripts/envsubst.sh --help
    

  1. re-start docker composition including medienhaus-* services

    docker compose up -d
    
  2. set up lldap user account(s) via: http://ldap.localhost/

    • username: admin (configured via .env)
    • password: change_me (configured via .env)
    • create user account(s)
  3. open the medienhaus-spaces application and log in via: http://localhost/login

    • username: (configured via lldap)
    • password: (configured via lldap)

Destructions — reset everything and start from scratch

docker compose down && \
rm -rf data/etherpad && \
rm -rf data/matrix-synapse && \
rm -rf data/spacedeck && \
./scripts/envsubst.sh && \
docker compose up -d --build --force-recreate --wait && \
./scripts/init.sh && \
./scripts/envsubst.sh && \
docker compose up -d --build --force-recreate

💥 If you want to TAKE ALL THE SHORTCUTS YOU CAN TAKE, run scripts/reset.sh.

./scripts/reset.sh

⚠️ For including medienhaus-api and/or medienhaus-cms, use these commands instead❗️

For including medienhaus-api, run the following:

./scripts/reset.sh --api

For including medienhaus-cms, run the following:

./scripts/reset.sh --cms

For including medienhaus-api and medienhaus-cms, run the following:

./scripts/reset.sh --all

The script can list these commands with the --help argument:

./scripts/reset.sh --help

🧩 For convenience reasons, manually created lldap accounts are not deleted.


URLs / Links for default localhost setup

Application / Service URL / Link
medienhaus-spaces http://localhost/
medienhaus-api http://api.localhost/
medienhaus-cms http://cms.localhost/
matrix-synapse http://matrix.localhost/
element-web http://element.localhost/
etherpad-lite http://etherpad.localhost/
spacedeck-open http://spacedeck.localhost/
lldap http://ldap.localhost/