|
|
|
The most important part of setup is described directly in [readme](https://gitlab.fi.muni.cz/cybersec/tns/pwndocimportautomator/-/blob/main/README.md). Here are steps for various customizations.
|
|
|
|
|
|
|
|
## Use a custom port
|
|
|
|
|
|
|
|
By default all comunication is going over port 8433 and it's highly recommended to keep it that way. However, if neccesary, it can be moved to different port using the following steps.
|
|
|
|
|
|
|
|
1. Create `docker-compose.custom.yml`
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
pwndoc-frontend:
|
|
|
|
build:
|
|
|
|
context: ./pwndoc/frontend
|
|
|
|
args:
|
|
|
|
API_PORT: 443
|
|
|
|
|
|
|
|
gateway:
|
|
|
|
ports:
|
|
|
|
- "443:443"
|
|
|
|
# note that docker-compose merges configuration, i.e. the app will be both on the default port 8443 and 443 defined here
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Run docker-compose with two files.
|
|
|
|
|
|
|
|
`docker-compose -f docker-compose.yml -f docker-compose.custom.yml up --build -d`
|
|
|
|
|
|
|
|
|
|
|
|
## Valid HTTPS Server Certificate
|
|
|
|
|
|
|
|
1. Obtain a valid HTTPS certificate (Let's Encrypt, Internal CA, ...). You'll need three files:
|
|
|
|
- `cert.pem` (includes the whole chain if neccesary)
|
|
|
|
- `key.pem`
|
|
|
|
- `keys.pass` (contains string password for encrypted key)
|
|
|
|
2. Create a folder `nginx/https-keys`
|
|
|
|
3. Create `docker-compose.custom.yml`
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
gateway:
|
|
|
|
volumes:
|
|
|
|
- ./nginx/https-keys:/etc/ssl/private:ro # :ro sets the folder as read only
|
|
|
|
```
|
|
|
|
|
|
|
|
4. Run docker-compose with two files.
|
|
|
|
|
|
|
|
`docker-compose -f docker-compose.yml -f docker-compose.custom.yml up --build -d`
|
|
|
|
5. Profit?
|
|
|
|
|
|
|
|
If your private key is not encrypted (and you don't want it to be), you can comment out `ssl_password_file /etc/ssl/private/keys.pass;` in `nginx/nginx.conf`. |