mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 17:47:08 +03:00
Switch use_certbot to the MUCH more explicit use_letsencrypt
This commit is contained in:
parent
8e258ee611
commit
a65a750464
|
@ -18,6 +18,6 @@
|
|||
"use_docker": "y",
|
||||
"use_heroku": "n",
|
||||
"js_task_runner": ["Gulp", "Grunt", "None"],
|
||||
"use_certbot": "n",
|
||||
"use_lets_encrypt": "n",
|
||||
"open_source_license": ["MIT", "BSD", "Apache Software License 2.0", "Not open source"]
|
||||
}
|
||||
|
|
|
@ -215,7 +215,7 @@ else:
|
|||
remove_packageJSON_file()
|
||||
|
||||
# 7. Removes all certbot/letsencrypt files if it isn't going to be used
|
||||
if '{{ cookiecutter.use_certbot }}'.lower() != 'y':
|
||||
if '{{ cookiecutter.use_lets_encrypt }}'.lower() != 'y':
|
||||
remove_certbot_files()
|
||||
|
||||
# 8. Display a warning if use_docker and use_grunt are selected. Grunt isn't
|
||||
|
@ -227,8 +227,8 @@ if '{{ cookiecutter.js_task_runner }}'.lower() in ['grunt', 'gulp'] and '{{ cook
|
|||
"js task runner service to your docker configuration manually."
|
||||
)
|
||||
|
||||
# 9. Removes the certbot/letsencrypt files and display a warning if use_certbot is selected and use_docker isn't.
|
||||
if '{{ cookiecutter.use_certbot }}'.lower() == 'y' and '{{ cookiecutter.use_docker }}'.lower() != 'y':
|
||||
# 9. Removes the certbot/letsencrypt files and display a warning if use_lets_encrypt is selected and use_docker isn't.
|
||||
if '{{ cookiecutter.use_lets_encrypt }}'.lower() == 'y' and '{{ cookiecutter.use_docker }}'.lower() != 'y':
|
||||
remove_certbot_files()
|
||||
print(
|
||||
"You selected to use certbot(letsencrypt) and didn't select to use docker. This is NOT supported out of the box for now. You "
|
||||
|
@ -236,7 +236,7 @@ if '{{ cookiecutter.use_certbot }}'.lower() == 'y' and '{{ cookiecutter.use_dock
|
|||
)
|
||||
|
||||
# 10. Directs the user to the documentation if certbot and docker are selected.
|
||||
if '{{ cookiecutter.use_certbot }}'.lower() == 'y' and '{{ cookiecutter.use_docker }}'.lower() == 'y':
|
||||
if '{{ cookiecutter.use_lets_encrypt }}'.lower() == 'y' and '{{ cookiecutter.use_docker }}'.lower() == 'y':
|
||||
print(
|
||||
"You selected to use certbot(letsencrypt), please see the documentation for instructions on how to use this in production. "
|
||||
"You must generate a dhparams.pem file before running docker-compose in a production environment."
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
FROM nginx:latest
|
||||
ADD nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
{% if cookiecutter.use_certbot == 'y' and cookiecutter.use_docker == 'y' %}
|
||||
{% if cookiecutter.use_lets_encrypt == 'y' and cookiecutter.use_docker == 'y' %}
|
||||
ADD start.sh /start.sh
|
||||
ADD nginx-secure.conf /etc/nginx/nginx-secure.conf
|
||||
ADD dhparams.pem /etc/ssl/private/dhparams.pem
|
||||
|
|
|
@ -35,7 +35,7 @@ http {
|
|||
listen 80;
|
||||
charset utf-8;
|
||||
|
||||
{% if cookiecutter.use_certbot == 'y' and cookiecutter.use_docker == 'y' %}
|
||||
{% if cookiecutter.use_lets_encrypt == 'y' and cookiecutter.use_docker == 'y' %}
|
||||
server_name ___my.example.com___ ;
|
||||
|
||||
location /.well-known/acme-challenge {
|
||||
|
|
|
@ -27,12 +27,12 @@ services:
|
|||
build: ./compose/nginx
|
||||
depends_on:
|
||||
- django
|
||||
{% if cookiecutter.use_certbot == 'y' %}
|
||||
{% if cookiecutter.use_lets_encrypt == 'y' %}
|
||||
- certbot
|
||||
{% endif %}
|
||||
ports:
|
||||
- "0.0.0.0:80:80"
|
||||
{% if cookiecutter.use_certbot == 'y' %}
|
||||
{% if cookiecutter.use_lets_encrypt == 'y' %}
|
||||
environment:
|
||||
- MY_DOMAIN_NAME={{ cookiecutter.domain_name }}
|
||||
ports:
|
||||
|
|
Loading…
Reference in New Issue
Block a user