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 55bdd17
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,48 @@ flutter pub get && flutter pub run build_runner build --delete-conflicting-outpu
bash scripts/config-pre-commit.sh
```

### 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)
- Run the image using docker CLI
- Open terminal and pull the image using the following command:
- `docker pull linagora/twake-web:<tag>`
- If you want to customize the port add the following environment variable:
- `-p <host port>:<host port> -e TWAKECHAT_LISTEN_PORT=<host port>`
- Run the image using the following command:
- `docker run -d -p <host port>:<host port> -e TWAKECHAT_LISTEN_PORT=<host port> --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 with my port is `6868`:
- `docker run -d -p 6868:6868 -e TWAKECHAT_LISTEN_PORT=6868 --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`

# Special thanks
* <a href="https://github.com/krille-chan/fluffychat">FluffyChat</a> is the original repository of this project. A huge thanks to the upstream repository for their vital contributions, not only for this project but also for [Matrix SDK in Dart](https://github.com/famedly/matrix-dart-sdk)

Expand All @@ -91,4 +133,4 @@ 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
* 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

0 comments on commit 55bdd17

Please sign in to comment.