7ea44ca25a
* Update Dockerfile Install 'logrotate' for nginx log. Issue https://github.com/laradock/laradock/issues/1357 * Create nginx Create 'logrotate' file for nginx log. Issue https://github.com/laradock/laradock/issues/1357 * Update Dockerfile Copy 'logrotate' config file. Issue https://github.com/laradock/laradock/issues/1357 * Update nginx Add 'nodateext' logrotate option to archive with sequence number * Update startup.sh Add line to start 'crond' demon * Update nginx Update permissions
14 lines
458 B
Bash
14 lines
458 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
|
|
|
|
# Start crond in background
|
|
crond -l 2 -b
|
|
|
|
# Start nginx in foreground
|
|
nginx
|