mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 14:34:53 +03:00
Added GoAccess analytics
This commit is contained in:
parent
cdf11541c2
commit
0160d7b58f
|
@ -41,6 +41,7 @@
|
||||||
"use_heroku": "n",
|
"use_heroku": "n",
|
||||||
"use_travisci": "n",
|
"use_travisci": "n",
|
||||||
"keep_local_envs_in_vcs": "y",
|
"keep_local_envs_in_vcs": "y",
|
||||||
|
"use_goaccess": "n",
|
||||||
|
|
||||||
"debug": "n"
|
"debug": "n"
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,6 +118,9 @@ To see how your containers are doing run::
|
||||||
|
|
||||||
docker-compose -f production.yml ps
|
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
|
Example: Supervisor
|
||||||
-------------------
|
-------------------
|
||||||
|
|
|
@ -9,7 +9,11 @@ www.{% raw %}{$DOMAIN_NAME}{% endraw %} {
|
||||||
header_upstream X-Forwarded-Proto {scheme}
|
header_upstream X-Forwarded-Proto {scheme}
|
||||||
header_upstream X-CSRFToken {~csrftoken}
|
header_upstream X-CSRFToken {~csrftoken}
|
||||||
}
|
}
|
||||||
|
{%- if cookiecutter.use_goaccess == "y" %}
|
||||||
|
log / /var/log/caddy/requests.log "{combined}"
|
||||||
|
{%- else %}
|
||||||
log stdout
|
log stdout
|
||||||
|
{%- endif %}
|
||||||
errors stdout
|
errors stdout
|
||||||
gzip
|
gzip
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ volumes:
|
||||||
production_postgres_data: {}
|
production_postgres_data: {}
|
||||||
production_postgres_data_backups: {}
|
production_postgres_data_backups: {}
|
||||||
production_caddy: {}
|
production_caddy: {}
|
||||||
|
production_caddy_log: {}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
||||||
|
@ -39,6 +40,7 @@ services:
|
||||||
- django
|
- django
|
||||||
volumes:
|
volumes:
|
||||||
- production_caddy:/root/.caddy
|
- production_caddy:/root/.caddy
|
||||||
|
- production_caddy_log:/var/log/caddy
|
||||||
env_file:
|
env_file:
|
||||||
- ./.envs/.production/.caddy
|
- ./.envs/.production/.caddy
|
||||||
ports:
|
ports:
|
||||||
|
@ -67,3 +69,11 @@ services:
|
||||||
command: /start-flower
|
command: /start-flower
|
||||||
|
|
||||||
{%- endif %}
|
{%- 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