# How to Set Up a Docker Container (Advanced)

Source: https://help.sendent.com/sendent-nextcloud-workspace/nextcloud-for-ms-teams/how-to-set-up-a-docker-container-advanced

If you have prior experience with setting up containers, here you may found the mere details on getting Sendent for MS Teams running.

## Docker Compose file

```yaml
version: '3.9'
services:
  sendent.msteams:
    image: rg.nl-ams.scw.cloud/sendent-public/sendent-msteams:latest
    build:
      context: ../
      dockerfile: ./Dockerfile
    restart: on-failure
	environment:
      - BASE_URL=<YOURDOMAIN>
      - MSAPP_TYPE=
	  - MSAPP_ID=
	  - MSAPP_PASSWORD=
	  - MSAPP_TENANT_ID=
	  - DEFAULT_NEXTCLOUD_URL=<YOURNEXTCLOUDDOMAIN>
      - PROXY_ALLOWLIST=<YOURNEXTCLOUDDOMAIN>
    ports:
      - "4200:4200"
    volumes:
      - ./docker-config:/usr/src/app/docker-config
    networks:
      - node_network
networks:
  node_network:
```

The following table explains the environment variables.

| **Name** | **Description** | **Example** |
|---|---|---|
| BASE\_URL | This should be the FQDN referencing to your publicly available docker image through reverse proxy. | https://msteams.sendent.dev |
| MSAPP\_TYPE | Default: SingleTenant | SingleTenant |
| MSAPP\_ID | This is the Azure Bot’s app-id. | 20d67bc1-6f95-4c2d-a49c-e8463163e30d |
| MSAPP\_PASSWORD | This is the Azure Bot’s password | Example\_password\_123! |
| MSAPP\_TENANT\_ID | Your Azure Tenant ID | 92785bec-a2fa-434b-9105-9325e5cb721c |
| DEFAULT\_NEXTCLOUD\_URL | Your Nextcloud server FQDN. | https://nextcloud.sendent.dev |
| PROXY\_ALLOWLIST | The Nextcloud servers the container may forward requests to, separated by commas. Optional: if empty, only the `DEFAULT_NEXTCLOUD_URL` server is allowed. | [nextcloud.sendent.dev](http://nextcloud.sendent.dev) |

## Proxy allowlist

From 3.0.0, the container only forwards requests to the hosts in `PROXY_ALLOWLIST`. It takes comma-separated hostnames or URLs, and only the hostname is compared. If it is not set, the container falls back to the hostname of `DEFAULT_NEXTCLOUD_URL`. If neither is set, it forwards to any host and logs a warning.

Changes apply when the container restarts. The Teams app package does not change. Details: [How to configure the proxy allowlist](https://help.sendent.com/nextcloud-for-ms-teams/how-to-configure-the-proxy-allowlist).

## Reverse proxy

Please ensure that either if NGINX or APACHE is used the maximum body size is increased.

- NGINX: `client_max_body_size  250M;` (this sets the maximum file upload size to 250 MB).
- APACHE: `LimitRequestBody 262144000` (this sets the maximum file upload size to roughly 250 MB).

## Updating to 3.0.0

- Add every Nextcloud server your users sign in to to `PROXY_ALLOWLIST`, unless the `DEFAULT_NEXTCLOUD_URL` server is the only one. Sign-in to any other server fails with "Forbidden: Target URL is not in the allowlist".
- Upload a new app package with the `manifest.json` from `https://<YOURDOMAIN>/manifest.json` and the 3.0.0 icons, see [How to download and modify your manifest.json file](https://help.sendent.com/nextcloud-for-ms-teams/how-to-download-and-modify-your-manifest-json-file). It renames the app to Nextcloud for MS Teams. Its version is already 3.0.0. The old package keeps working without the new name and icons.
