With a Self-Hosted Webviz Instance Behind a Reverse Proxy
This is a complex example that incorporates all the smaller subcomponents in the other examples. This is useful for production environments that require the full functionality of the system.
This Bag Database will:
- Use LDAP for authentication
- Run the Bag Database and Webviz behind a Traefik reverse proxy
- Use Traefik to enforce SSL on all connections
- Automatically generate a signed SSL certificate for
bagdb.example.com
through Let’s Encrypt - Use the self-hosted Webviz instance for opening bag files
To make the docker-compose.yml file a bit cleaner, environment variables for many of the containers have been pulled out into separate files. These configuration files, and the associated Docker compose file, are located here. All of these files should be saved in the same directory, and if you are going to run a server based on them, make sure you edit them to add your own passwords, domain name, and user information.
Configuration Files
- bagdb.env
- Environment variables for the Bag Database, such as importantant ROS topics, server connections, etc.
- openldap.env
- Environment variables for the LDAP server.
- postgres.env
- Environment variables for the PostGIS server.
- webviz-default.conf
- A custom configuration file for the Webviz’s nginx server.
- Change the
location
variable here because it will be running under an alias at/webviz
in our reverse proxy.
- docker-compose.yml
- Main docker-compose.yml file. If everything is configured correctly, the system can be started with
docker-compose up -d
- After everything is running, you will be able to access the server at
https://bagdb.example.com
.
- Main docker-compose.yml file. If everything is configured correctly, the system can be started with
- people.ldif
- An example LDIF file for creating a “People” group in your LDAP server.
-
After starting the server, run
ldapadd -x -D cn=admin,dc=example,dc=com -W -f people.ldif
to add this group.
- user.ldif
- An example LDIF file that defines a single user.
- Customize this for each user
-
After you’ve added the People group, run
ldapadd -x -D cn=admin,dc=example,dc=com -W -f user.ldif
to add this person to the server.