-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
79 additions
and
0 deletions.
There are no files selected for viewing
79 changes: 79 additions & 0 deletions
79
site/content/en/docs/administration/advanced/custom_certificates.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
title: 'Custom Certificates' | ||
linkTitle: 'Custom Certificates' | ||
description: 'Use Custom Certificates in CVAT' | ||
weight: 100 | ||
--- | ||
|
||
CVAT use traefik as a reverse proxy to manage SSL certificates. By default, traefik uses Let's Encrypt to generate SSL certificates. However, you can use your own certificates instead of Let's Encrypt. | ||
|
||
See: | ||
|
||
- [Setup Custom Certificates](#setup-custom-certificates) | ||
- [Create Certificates Directory](#create-certificates-directory) | ||
- [Change Traefik Configuration](#change-traefik-configuration) | ||
- [Start CVAT](#start-cvat) | ||
|
||
|
||
## Setup Custom Certificates | ||
|
||
### Create Certificates Directory | ||
|
||
Create a `certs` directory in the root of the project: | ||
|
||
```bash | ||
mkdir -p ./certs | ||
|
||
``` | ||
|
||
Move your certificates to the `./certs` directory: | ||
|
||
```bash | ||
mv /path/to/cert.pem ./certs/cert.pem | ||
mv /path/to/key.pem ./certs/key.pem | ||
``` | ||
|
||
### Change Traefik Configuration | ||
|
||
Create `tls.yml` file in the `./traefik/rules` directory with the following content: | ||
|
||
```yaml | ||
tls: | ||
stores: | ||
default: | ||
defaultCertificate: | ||
certFile: /certs/cert.pem | ||
keyFile: /certs/key.pem | ||
``` | ||
Edit the `docker-compose.https.yml` file and add the following lines: | ||
|
||
```yaml | ||
environment: | ||
TRAEFIK_ENTRYPOINTS_web_ADDRESS: :80 | ||
TRAEFIK_ENTRYPOINTS_web_HTTP_REDIRECTIONS_ENTRYPOINT_TO: websecure | ||
TRAEFIK_ENTRYPOINTS_web_HTTP_REDIRECTIONS_ENTRYPOINT_SCHEME: https | ||
TRAEFIK_ENTRYPOINTS_websecure_ADDRESS: :443 | ||
# Disable Let's Encrypt | ||
# TRAEFIK_CERTIFICATESRESOLVERS_lets-encrypt_ACME_EMAIL: "${ACME_EMAIL:?Please set the ACME_EMAIL env variable}" | ||
# TRAEFIK_CERTIFICATESRESOLVERS_lets-encrypt_ACME_TLSCHALLENGE: "true" | ||
# TRAEFIK_CERTIFICATESRESOLVERS_lets-encrypt_ACME_STORAGE: /letsencrypt/acme.json | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
# Add certificates volume and tls.yml rules | ||
volumes: | ||
- ./certs:/certs | ||
- ./tls.yml:/etc/traefik/rules/tls.yml | ||
``` | ||
|
||
### Start CVAT | ||
|
||
Start CVAT with the following command: | ||
|
||
```bash | ||
docker-compose -f docker-compose.yml -f docker-compose.https.yml up -d | ||
``` | ||
|
||
|
||
|