Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/medienhaus/medienhaus-docker

The medienhaus/ Docker composition
https://github.com/medienhaus/medienhaus-docker

docker-compose matrix-org

Last synced: 28 days ago
JSON representation

The medienhaus/ Docker composition

Awesome Lists containing this project

README

        

### medienhaus/

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

[Website](https://medienhaus.dev/) — [Fediverse](https://chaos.social/@medienhaus)


# medienhaus-docker

This repository contains our Docker composition for a containerized runtime environment of [medienhaus-spaces](https://github.com/medienhaus/medienhaus-spaces/) + [medienhaus-api](https://github.com/medienhaus/medienhaus-api/) + [medienhaus-cms](https://github.com/medienhaus/medienhaus-cms/) including [matrix-synapse](https://github.com/matrix-org/synapse/), [element-web](https://github.com/vector-im/element-web/), [etherpad-lite](https://github.com/ether/etherpad-lite/), [spacedeck-open](https://github.com/medienhaus/spacedeck-open/), and [lldap](https://github.com/lldap/lldap).

🧩 For *local development* of [medienhaus-spaces](https://github.com/medienhaus/medienhaus-spaces/), use the simplified [medienhaus-docker-dev](https://github.com/medienhaus/medienhaus-docker-dev/) composition.

## Instructions

0. `git clone` the `medienhaus-docker` repository and change directory


```
git clone https://github.com/medienhaus/medienhaus-docker.git && \
cd medienhaus-docker/
```

1. fetch contents of submodules


```
git submodule update --init
```

2. 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
```

3. create `docker-compose.yml` file from example


```
cp docker-compose.example.yml docker-compose.yml
```
⚠️ For *production*, please use [`docker-compose.example.websecure.yml`](docker-compose.example.websecure.yml) with secured `https` context❗️
```
cp docker-compose.example.websecure.yml docker-compose.yml
```

4. create config files from `template/*` files and `.env` variables


```
./scripts/envsubst.sh
```

5. start docker composition


```
docker compose up -d
```

6. 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
```


7. 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
```


8. re-start docker composition including `medienhaus-*` services


```
docker compose up -d
```

9. 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)

10. 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/ |