mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 06:24:52 +03:00
Added GoAccess analytics
This commit is contained in:
parent
cdf11541c2
commit
0160d7b58f
|
@ -41,6 +41,7 @@
|
|||
"use_heroku": "n",
|
||||
"use_travisci": "n",
|
||||
"keep_local_envs_in_vcs": "y",
|
||||
"use_goaccess": "n",
|
||||
|
||||
"debug": "n"
|
||||
}
|
||||
|
|
|
@ -118,6 +118,9 @@ To see how your containers are doing run::
|
|||
|
||||
docker-compose -f production.yml ps
|
||||
|
||||
To view the GoAccess analytics run::
|
||||
|
||||
docker-compose -f production.yml run --rm goaccess goaccess --log-format COMBINED --log-file /srv/logs/requests.log
|
||||
|
||||
Example: Supervisor
|
||||
-------------------
|
||||
|
|
|
@ -9,7 +9,11 @@ www.{% raw %}{$DOMAIN_NAME}{% endraw %} {
|
|||
header_upstream X-Forwarded-Proto {scheme}
|
||||
header_upstream X-CSRFToken {~csrftoken}
|
||||
}
|
||||
{%- if cookiecutter.use_goaccess == "y" %}
|
||||
log / /var/log/caddy/requests.log "{combined}"
|
||||
{%- else %}
|
||||
log stdout
|
||||
{%- endif %}
|
||||
errors stdout
|
||||
gzip
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ volumes:
|
|||
production_postgres_data: {}
|
||||
production_postgres_data_backups: {}
|
||||
production_caddy: {}
|
||||
production_caddy_log: {}
|
||||
|
||||
services:
|
||||
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
||||
|
@ -39,6 +40,7 @@ services:
|
|||
- django
|
||||
volumes:
|
||||
- production_caddy:/root/.caddy
|
||||
- production_caddy_log:/var/log/caddy
|
||||
env_file:
|
||||
- ./.envs/.production/.caddy
|
||||
ports:
|
||||
|
@ -67,3 +69,11 @@ services:
|
|||
command: /start-flower
|
||||
|
||||
{%- endif %}
|
||||
|
||||
{% if cookiecutter.use_goaccess == "y" %}
|
||||
goaccess:
|
||||
image: allinurl/goaccess
|
||||
volumes:
|
||||
- production_caddy_log:/srv/logs
|
||||
|
||||
{% endif %}
|
Loading…
Reference in New Issue
Block a user