Skip to content

Installation using docker

Software Magico edited this page May 9, 2024 · 6 revisions

Customizing the application

On the file docker/.env you can customize easily some properties described on the configuration. Please take a look at the next sections to understand what can/must be changed:

Domain

Using localhost

You can deploy the application in your desktop computer for testing it also with docker. It is not recommended for a real environment but is an easy way to check the state of the art on this application and if it fits to your needs or not.

On docker/.env set:

machine_domain=localhost
[...]
#Frontend
protocol=http

And deploy the application using docker-compose command as usual. Ignore any information about SSL certificates as they are not available for localhost domain.

Using a custom domain

By default, I am assuming that you are deploying this application as a docker container on a server in the cloud. That means that probably you already have a domain that you must set on the application. Please, update machine_domain variable on docker/.env to match your existing domain.

machine_domain=mydomain.com
[...]
#Frontend
protocol=https

Parameter protocol is assuming that you have also an SSL certificate. If is not the case, please change to http. I recommend you to use a https protocol with a certificate. If you do not have a certificate, please take a look at Let's Encrypt. Check section Using REVERSE PROXY and Generating SSL.

Using a different database engine.

If you want to use a different database engine, add the correct jar dependency with the jdbc connector in backend/libraries. Configure these specific variables in the .env file:

database_type=postgresql  (hsqldb, h2, oracle, mysql, postgresql, ...)
database_name=database
database_password=mypass
database_user=myuser
database_port=5432

Security passwords

Variable jwt_secret is used for encrypting JWT token related to the REST API authorization. Please change it and avoid using the default one. If jwt_secret is left empty, the system will generate a random one on start. Random is more secure, but any user will be forced to log in into the system again if the server is restarted.

Variable database_encryption_key will encrypt some personal data information stored on a database, to ensure a higher level of privacy. If you want to check the content of your database using any other external software, please leave this variable with a blank value. Otherwise, change the default value to any other that only you know. Remember that if you set your database to be encrypted, the property database_populate_default_data must be set to never, as the pre-made script has data that is not encrypted and therefore incompatible with your encryption.

Using REVERSE PROXY and SSL certificates

Currently, we are using Traefik that handles the SSL certificate generation. No extra action is needed if you have your own domain. Wait for a few minutes and ensure that your domain is redirected to this application and Traefik will handle it.

Changing Traefik dashboard password

Remember that you can check the Traefik status accessing to its dashboard. By default, is protected by user admin and password 0b186336d5. I recommend changing it as soon as possible. For this purpose, you can use htpasswd tool on a Unix system:

echo $(htpasswd -nB user) | sed -e s/\\$/\\$\\$/g

The sed command is due to the docker-compose needs to scape any $ character to $$. Ensure that is the case in your output.

Finally, update the docker-compose.yml file with the obtained password, replacing the next line with the content obtained from the value obtained on the previous step:

  - "traefik.http.middlewares.auth.basicauth.users=admin:<<put here your new hashed password>>"

Regenerate the docker container with a docker-compose build --no-cache kendo-tournament-rproxy && docker-compose up -d kendo-tournament-rproxy and the new password will be used.

Clone this wiki locally