Launching the UCW
Run the Server For Development
You can run your development environment using either docker or node:
- To run the widget with docker, run
docker compose up
- To run the widget with node, run
npm run dev
.
If Env=dev
in the ./apps/server/.env
file, the redis client will use a local in-memory object to handle the cache and avoid the error. However this should only be used for testing. The cached values won’t expire and will also be cleared on server restart.
Note: You might see an error about failure to connect redis. The widget doesn't rely on redis to start, but some providers’ logic require a redis instance. To fix this error you can start a local redis instance to make it available at localhost:6379 and the widget will be able to use it.
Deploying a Production Instance
For a production instance, it is easiest to use Docker. We provide docker files for both the server and the UI, along with a docker-compose file that runs all necessary containers, included Redis and ElasticSearch.
The simplest way to deploy this widget is via docker-compose, as shown below, however you can also use the dockerfiles directly.
Take a look at the docker-compose.yml file for more details on how it is set up.
docker compose up
Reminder About Sensitive Information
Secrets must be passed through environment variables instead of hardcoded in the code files.
Do not put any credentials in any of the code files. If you do so, it could get committed and leaked to the public.
Use the provided .env
files.