Installation guide¶
- Install Docker Engine for the desired operating system in accordance with the documentation: https://docs.docker.com/engine/install/.
- Log in to the private registry of Docker images of the CodeScoring system using the command
docker login REGISTRY_URL, with the URL, login and password received from the vendor. - Download the archive with platform files received from the vendor and unpack it.
- Go to the created directory in the console.
-
Copy the template file with settings:
As a rule, no changes to the file are required for correct operation. If you need to configure CodeScoring to work through a proxy, please refer to the instructions.
-
Copy the template file with secrets:
If necessary, configure settings in a new file. If you do not change the parameters in the file, then by default the system will be available athttp://localhost:8081.- List of domains for proper operation of CSRF protection. It is recommended to list localhost on the internal and external ports, as well as the external domain (or ip:port combination). Specifying the protocol is mandatory, for example:
DJANGO_CSRF_TRUSTED_ORIGINS=http://localhost:18000,https://localhost:8081,https://external ip:8081- Connection parameters to the PostgreSQL database. The database is supplied with the platform. Specifying accesses separately is a precaution and control measure. When using your own database, you must ensure that it corresponds to requirements.
POSTGRES_DB— database namePOSTGRES_USER— username. When using your own database, you must ensure that the user has the following rights: Superuser, Create role, Create DB, Replication, Bypass RLS.POSTGRES_PASSWORD- passwordPOSTGRES_HOST- the host on which the database is availablePOSTGRES_PORT- port on which the database is available
- platform secret
SECRET_KEY- random string of characters- System domain settings
NGINX_HOST- the host on which the system will be availableNGINX_PORT- port on which the system will be accessibleSITE_SCHEME- data transfer protocol, default https
- Exception paths
ANALYSIS_IGNORED_PATHS- list of paths that will be ignored by the system during analysis. More details on adding exclusion paths can be found here- System version
CODESCORING_VERSIONis a required variable. The current version can be found in the Changelog section- Compose-related settings
COMPOSE_PROJECT_NAME- docker compose project name, used to prefix the names of resources created by docker compose
# symbol
Do not use the
#symbol in parameters; it may be interpreted incorrectly by the system during installation.SSL Certificates
If you need to use self-signed certificates, please read the instructions for adding a certificate before starting the system.
-
Run the CodeScoring installation command (the command must be executed with system superuser rights):
-
To view the logs you can use the command:
-
After starting, the service will be available at the configured domain or address
http://localhost:8081. During the first launch, additional database migrations are performed; the operation may take longer than on subsequent runs.Note: for the platform to work via the HTTPS protocol, you need an external balancer that implements SSL termination.
-
To log in, you must first create a user with administrator rights using the following command: