diff --git a/example/gateway/files/crontab_root b/example/gateway/files/crontab_root new file mode 100644 index 0000000..392122f --- /dev/null +++ b/example/gateway/files/crontab_root @@ -0,0 +1 @@ +@weekly service nginx reload >/dev/null 2>&1 diff --git a/example/gateway/nginx-http/Fockerfile b/example/gateway/nginx-http/Fockerfile index 9be8498..101e167 100644 --- a/example/gateway/nginx-http/Fockerfile +++ b/example/gateway/nginx-http/Fockerfile @@ -8,6 +8,8 @@ steps: /root/cookiecutter.json ] - [ files/nginx.conf, /root/nginx.conf ] + - [ ../files/crontab_root, + /root/crontab_root ] - run: - mkdir -p /root/nginx_template/\{\{cookiecutter.directory_name\}\} - mv -v /root/nginx.conf /root/nginx_template/\{\{cookiecutter.directory_name\}\}/nginx.conf @@ -20,3 +22,12 @@ steps: - rm -rvf /root/nginx_template - rm -rvf ./nginx_conf - mkdir -p /certbot/webroot + - run: + - sysrc nginx_enable=YES + - crontab -u root /root/crontab_root + - rm -v /root/crontab_root + - run: + - sysrc sshd_enable=NO + - sysrc sendmail_enable=NONE + - sysrc clear_tmp_enable=YES + - sysrc syslogd_flags="-ss" diff --git a/example/gateway/nginx-https/Fockerfile b/example/gateway/nginx-https/Fockerfile index 8cb0b67..3031316 100644 --- a/example/gateway/nginx-https/Fockerfile +++ b/example/gateway/nginx-https/Fockerfile @@ -8,6 +8,8 @@ steps: /root/cookiecutter.json ] - [ files/nginx.conf, /root/nginx.conf ] + - [ ../files/crontab_root, + /root/crontab_root ] - run: - mkdir -p /root/nginx_template/\{\{cookiecutter.directory_name\}\} - mv -v /root/nginx.conf /root/nginx_template/\{\{cookiecutter.directory_name\}\}/nginx.conf @@ -21,6 +23,10 @@ steps: - rm -rvf ./nginx_conf - mkdir -p /usr/local/etc/letsencrypt - mkdir -p /certbot/webroot + - run: + - sysrc nginx_enable=YES + - crontab -u root /root/crontab_root + - rm -v /root/crontab_root - run: - sysrc sshd_enable=NO - sysrc sendmail_enable=NONE