diff --git a/.env.example b/.env.example index bd8b6ba..596de72 100644 --- a/.env.example +++ b/.env.example @@ -5,7 +5,6 @@ #### # Used for determining the homeserver to use for short urls etc. -# VITE_DEFAULT_HOMESERVER=http://localhost:8008 # VITE_FALLBACK_STUN_ALLOWED=false # VITE_CUSTOM_THEME=true diff --git a/Dockerfile b/Dockerfile index e46c60e..3d7363a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN scripts/dockerbuild.sh FROM nginxinc/nginx-unprivileged:alpine COPY --from=builder /src/dist /app -COPY config/default.conf /etc/nginx/conf.d/ +COPY config/nginx.conf /etc/nginx/conf.d/ USER root diff --git a/README.md b/README.md index d666263..c80c790 100644 --- a/README.md +++ b/README.md @@ -15,20 +15,19 @@ Until prebuilt tarballs are available, you'll need to build Element Call from so git clone https://github.com/vector-im/element-call.git cd element-call yarn -cp .env.example .env -cp sample.config.json public/config.json -``` - -You can now edit the configuration in `.env` and `public/config.json` to your liking. (See the [configuration](#Configuration) section for details.) The most important thing is to set `VITE_DEFAULT_HOMESERVER` to the homeserver that the app should use, such as `https://call.ems.host`. - -Next, build the project: - -``` yarn build ``` If all went well, you can now find the build output under `dist` as a series of static files. These can be hosted using any web server of your choice. +You may also wish to add a configuration file (Element Call uses the domain it's hosted on as a Homeserver URL by default, +but you can change this in the config file). This goes in `public/config.json` - you can use the sample as a starting point: + +``` +cp config/config.sample.json public/config.json +# edit public/config.json +``` + Because Element Call uses client-side routing, your server must be able to route any requests to non-existing paths back to `/index.html`. For example, in Nginx you can achieve this with the `try_files` directive: ``` @@ -59,11 +58,9 @@ git clone https://github.com/vector-im/element-call.git cd element-call yarn yarn link matrix-js-sdk -cp .env.example .env -cp sample.config.json public/config.json ``` -By default, the app expects you to have [Synapse](https://matrix-org.github.io/synapse/latest/setup/installation.html) installed locally and running on port 8008. If you wish to use another homeserver, you can set it in your `.env` file. +By default, the app expects you to have [Synapse](https://matrix-org.github.io/synapse/latest/setup/installation.html) installed locally and running on port 8008. If you wish to use another homeserver, you can add a config file as above. You're now ready to launch the development server: diff --git a/config/config.sample.json b/config/config.sample.json new file mode 100644 index 0000000..7afb8f6 --- /dev/null +++ b/config/config.sample.json @@ -0,0 +1,8 @@ +{ + "default_server_config": { + "m.homeserver": { + "base_url": "https://call.ems.host", + "server_name": "call.ems.host" + } + } +} diff --git a/config/default.conf b/config/nginx.conf similarity index 100% rename from config/default.conf rename to config/nginx.conf diff --git a/sample.config.json b/sample.config.json deleted file mode 100644 index bd05a88..0000000 --- a/sample.config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rageshake": { - "submit_url": "https://element.io/bugreports/submit" - } -}