blackbirdchess-docker-dev/nginx/startup.sh
Vladyslav Shchepotin 7219b3543a Nginx: added OpenSSL for local development (#1527)
* feature(nginx): add OpenSSL
2018-11-13 20:44:51 +08:00

10 lines
387 B
Bash

#!/bin/bash
if [ ! -f /etc/nginx/ssl/default.crt ]; then
openssl genrsa -out "/etc/nginx/ssl/default.key" 2048
openssl req -new -key "/etc/nginx/ssl/default.key" -out "/etc/nginx/ssl/default.csr" -subj "/CN=default/O=default/C=UK"
openssl x509 -req -days 365 -in "/etc/nginx/ssl/default.csr" -signkey "/etc/nginx/ssl/default.key" -out "/etc/nginx/ssl/default.crt"
fi
nginx