Skip to content

Instructions to enable SSL #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion docs/installation/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,32 @@ The last step is to start the scheduler :
$ docker-compose up -d celery_beat
```

You can now use OpenCVE with your own dockerized instance of it.
You can now use OpenCVE with your own dockerized instance of it.

## Enable SSL ##

Create a certificate (example for a self-signed certificate) and save it to the conf directory.
```
$ openssl req -newkey rsa:2048 -nodes -keyout ./conf/domain.key -x509 -days 365 -out ./conf/domain.crt
```

Modify the docker-compose.yml and add the following after `- ${OPENCVE_CONFIG_PATH}:/app/opencve.cfg:ro`
```
- ${OPENCVE_SSL_CRT}:/app/domain.crt:ro
- ${OPENCVE_SSL_KEY}:/app/domain.key:ro
```

As a second step change `webserver -b 0.0.0.0:8000` command to
```
webserver -b 0.0.0.0:8000 --certfile=/app/domain.crt --keyfile=/app/domain.key
```
Modify the .env file
```
$ echo 'OPENCVE_SSL_CRT=./conf/domain.crt' >> .env
$ echo 'OPENCVE_SSL_KEY=./conf/domain.key' >> .env
```
Restart the container
```
$ docker-compose down
$ docker-compose up -d
```