1
1
# user
2
- system_user : " django"
3
- system_group : " www-data"
4
- system_user_home : " /home/{{ system_user }}"
2
+ django_system_user : " django"
3
+ django_system_group : " www-data"
4
+ django_system_user_home : " /home/{{ django_system_user }}"
5
5
6
6
# git
7
- git_url :
8
- git_version : " master"
9
- git_key :
10
- git_key_filename : " id_ed25519"
11
- remove_git_key : True
7
+ django_git_url :
8
+ django_git_version : " master"
9
+ django_git_key :
10
+ django_git_key_filename : " id_ed25519"
11
+ django_remove_git_key : True
12
12
13
13
# system-wide dependencies
14
- python_source_version : " 3.6"
15
- python_version : " python3.6" # or python3.x
16
- system_wide_dependencies :
14
+ django_python_source_version : " 3.6"
15
+ django_python_version : " python3.6" # or python3.x
16
+ django_system_wide_dependencies :
17
17
- build-essential
18
18
- git
19
19
- python3.6-dev
20
20
21
21
# service
22
- service_name : " {{ system_user }}"
23
- service_type : " notify"
24
- service_restart : " on-failure"
25
- service_group : " {{ system_group }}"
26
- service_unit_after : " network.target"
27
- service_install_wantedby : " multi-user.target"
28
- pid_socks_dir : " /var/run/{{ service_name }}"
29
- manage_services : False
22
+ django_service_name : " {{ django_system_user }}"
23
+ django_service_type : " notify"
24
+ django_service_restart : " on-failure"
25
+ django_service_group : " {{ django_system_group }}"
26
+ django_service_unit_after : " network.target"
27
+ django_service_install_wantedby : " multi-user.target"
28
+ django_pid_socks_dir : " /var/run/{{ django_service_name }}"
29
+ django_manage_services : False
30
30
31
- env_name : " prod"
32
- codebase_path : " {{ system_user_home }}/app"
33
- versioned_path : " {{ codebase_path }}-versioned"
34
- checkout_path : " {{ versioned_path }}/{{ ansible_date_time['epoch'] }}"
35
- venv_path : " {{ system_user_home }}/.virtualenvs/{{ system_user }}"
36
- log_path : " /var/log/{{ service_name }}"
37
- pid_file : " {{ pid_socks_dir }}/{{ service_name }}.pid"
38
- proxy_read_timeout : " 300s"
31
+ django_env_name : " prod"
32
+ django_codebase_path : " {{ django_system_user_home }}/app"
33
+ django_versioned_path : " {{ django_codebase_path }}-versioned"
34
+ django_checkout_path : " {{ django_versioned_path }}/{{ ansible_date_time['epoch'] }}"
35
+ django_venv_path : " {{ django_system_user_home }}/.virtualenvs/{{ django_system_user }}"
36
+ django_log_path : " /var/log/{{ django_service_name }}"
37
+ django_pid_file : " {{ django_pid_socks_dir }}/{{ django_service_name }}.pid"
38
+ django_proxy_read_timeout : " 300s"
39
39
40
40
# Python packages
41
- recreate_virtual_env : False
41
+ django_recreate_virtual_env : False
42
42
43
43
# # pipenv
44
- use_pipenv : False
44
+ django_use_pipenv : False
45
45
46
46
# # pip
47
- use_regular_old_pip : True
48
- pip_paths :
49
- - " {{ checkout_path }}/requirements.txt"
47
+ django_use_regular_old_pip : True
48
+ django_pip_paths :
49
+ - " {{ django_checkout_path }}/requirements.txt"
50
50
51
51
# # other pip packages not in requirements files
52
- pip_packages :
52
+ django_pip_packages :
53
53
- celery
54
54
- uwsgi
55
55
56
56
# Django
57
- local_settings_path :
57
+ django_local_settings_path :
58
58
django_init_commands :
59
59
- migrate --noinput
60
60
- collectstatic --noinput
61
- static_path : " /var/www/static/"
62
- media_path : " /var/www/media/"
61
+ django_static_path : " /var/www/static/"
62
+ django_media_path : " /var/www/media/"
63
63
django_settings_module :
64
64
65
65
# # Django settings
@@ -83,9 +83,9 @@ django_settings:
83
83
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
84
84
}
85
85
}
86
- STATIC_ROOT : " '{{ static_path }}'"
86
+ STATIC_ROOT : " '{{ django_static_path }}'"
87
87
STATIC_URL : " '/static/'"
88
- MEDIA_ROOT : " '{{ media_path }}'"
88
+ MEDIA_ROOT : " '{{ django_media_path }}'"
89
89
MEDIA_URL : " '/media/'"
90
90
EMAIL_BACKEND : " 'django.core.mail.backends.console.EmailBackend'"
91
91
EMAIL_HOST : " 'localhost'"
@@ -94,40 +94,40 @@ django_settings:
94
94
ALLOWED_HOSTS : " []"
95
95
DEBUG : True
96
96
# # python statements included at the top of settings file
97
- top_python_statements :
97
+ django_top_python_statements :
98
98
- import os
99
99
# # python statements included at the bottom of settings file
100
- bottom_python_statements :
100
+ django_bottom_python_statements :
101
101
102
102
# wsgi
103
- wsgi_module :
104
- wsgi_processes : 3
105
- wsgi_harakiri : 240
106
- wsgi_max_requests : 5000
107
- wsgi_http :
108
- wsgi_socket : " {{ pid_socks_dir }}/{{ service_name }}.sock"
109
- wsgi_chmod_socket : 777
110
- wsgi_user : " {{ system_user }}"
111
- wsgi_group : " www-data"
112
- wsgi_vacuum : True
113
- wsgi_master : True
114
- wsgi_logto : " {{ log_path }}/uwsgi_{{ service_name }}.log"
115
- wsgi_virtualenv : " {{ venv_path }}"
116
- wsgi_static_map : " /static={{ static_path }}"
117
- wsgi_buffer_size : 8192
118
- wsgi_env : " HTTPS=on"
119
- wsgi_stats : " {{ pid_socks_dir }}/{{ service_name }}_stats.sock"
120
- wsgi_enable_threads : False
121
- wsgi_memory_report : False
103
+ django_wsgi_module :
104
+ django_wsgi_processes : 3
105
+ django_wsgi_harakiri : 240
106
+ django_wsgi_max_requests : 5000
107
+ django_wsgi_http :
108
+ django_wsgi_socket : " {{ django_pid_socks_dir }}/{{ django_service_name }}.sock"
109
+ django_wsgi_chmod_socket : 777
110
+ django_wsgi_user : " {{ django_system_user }}"
111
+ django_wsgi_group : " www-data"
112
+ django_wsgi_vacuum : True
113
+ django_wsgi_master : True
114
+ django_wsgi_logto : " {{ django_log_path }}/uwsgi_{{ django_service_name }}.log"
115
+ django_wsgi_virtualenv : " {{ django_venv_path }}"
116
+ django_wsgi_static_map : " /static={{ django_static_path }}"
117
+ django_wsgi_buffer_size : 8192
118
+ django_wsgi_env : " HTTPS=on"
119
+ django_wsgi_stats : " {{ django_pid_socks_dir }}/{{ django_service_name }}_stats.sock"
120
+ django_wsgi_enable_threads : False
121
+ django_wsgi_memory_report : False
122
122
123
123
# celery
124
- enable_celery : True
125
- celery_app :
126
- celeryd_nodes : " {{ service_name }}"
127
- celeryd_service_name : " celeryd-{{ service_name }}"
128
- celerybeat_service_name : " celerybeat-{{ service_name }}"
129
- celeryd_opts : " --time-limit=300 --concurrency=8"
130
- celeryd_log_level : " INFO"
131
- celerybeat_log_level : " INFO"
132
- celeryd_pid_file :
133
- celery_beat_pid_file :
124
+ django_enable_celery : True
125
+ django_celery_app :
126
+ django_celeryd_nodes : " {{ django_service_name }}"
127
+ django_celeryd_service_name : " celeryd-{{ django_service_name }}"
128
+ django_celerybeat_service_name : " celerybeat-{{ django_service_name }}"
129
+ django_celeryd_opts : " --time-limit=300 --concurrency=8"
130
+ django_celeryd_log_level : " INFO"
131
+ django_celerybeat_log_level : " INFO"
132
+ django_celeryd_pid_file :
133
+ django_celery_beat_pid_file :
0 commit comments