blackbirdchess-docker-dev/openresty/startup.sh

15 lines
499 B
Bash
Raw Normal View History

2023-02-01 17:06:56 +01:00
#!/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"
chmod 644 /etc/nginx/ssl/default.key
fi
# Start crond in background
crond -l 2 -b
# Start nginx in foreground
nginx