Skip to content

Commit

Permalink
TW-2036: Add readme to guide build docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhhdev committed Sep 30, 2024
1 parent 637644f commit b158dab
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,55 @@ bash scripts/config-pre-commit.sh
* <a href="https://github.com/madsrh/WoodenBeaver">WoodenBeaver</a> sound theme for the notification sound.

* The Matrix Foundation for making and maintaining the [emoji translations](https://github.com/matrix-org/matrix-doc/blob/main/data-definitions/sas-emoji.json) used for emoji verification, licensed Apache 2.0

### Setup to build web version using Docker

- Go to the [docker hub](https://hub.docker.com/r/linagora/twake-web/tags)
- Pull the image using `docker pull linagora/twake-web:<tag>`
- Create a config file `config.json` in the root of the project with the following
[docs](https://github.com/linagora/twake-on-matrix/blob/main/docs/configurations/config_web_app_for_public_platform.md)
- Two options to build the web version:
- Run the image using docker desktop
- Open docker desktop
- Open [Image](linagora/twake-web/) and select the image you pulled
- Click on Run and open `Options Settings`
- Config the container name
- Config the host port
- Config the volume with host path and container path
- Host path should be the root of the the config.json file (.../config.json)
- Container path should be the root of the project: /usr/share/nginx/html/web/config.json
- Click on Run
- Open the browser and go to `http://localhost:<hostport>`
- Run the image using docker CLI
- Open terminal and pull the image using the following command:
- `docker pull linagora/twake-web:<tag>`
- Run the image using the following command:
- `docker run -d -p <host port>:80 --name <container name> -v <host path>:/usr/share/nginx/html/web/config.json linagora/twake-web:<tag>`
- Open the browser and go to `http://localhost:<hostport>`

### Sample for build docker image using Docker CLI

- Create a config file `config.json` with `matrix.org`

```
{
"app_grid_dashboard_available": true,
"application_name": "Twake Chat",
"application_welcome_message": "Welcome to Twake Chat!",
"default_homeserver": "matrix.org",
"hide_redacted_events": false,
"hide_unknown_events": false,
"homeserver": "https://matrix.org/",
"issue_id": "",
"privacy_url": "https://twake.app/en/privacy/",
"render_html": true
}
```

- Open terminal and login to docker
- `docker login`
- Pull the image with tag `v2.6.5` using the following command:
- `docker pull linagora/twake-web:v2.6.5`
- Run the image using the following command:
- `docker run -d -p 8080:80 --name twake-web -v /path/to/config.json:/usr/share/nginx/html/web/config.json linagora/twake-web:v2.6.5`
- Open the browser and go to `http://localhost:8080`

0 comments on commit b158dab

Please sign in to comment.