This commit is contained in:
parent
2fac183bc8
commit
b23a687923
2 changed files with 3 additions and 0 deletions
|
@ -18,3 +18,5 @@ COPY --chown=nobody:nogroup nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
# Copy what we've installed/built from production
|
# Copy what we've installed/built from production
|
||||||
COPY --chown=nobody:nogroup --from=build /home/node/app/build /usr/share/nginx/html/
|
COPY --chown=nobody:nogroup --from=build /home/node/app/build /usr/share/nginx/html/
|
||||||
|
|
||||||
|
# Caching directory
|
||||||
|
RUN mkdir -p /var/run/nginx-cache
|
||||||
|
|
|
@ -18,6 +18,7 @@ server {
|
||||||
# https://plausible.io/docs/proxy/guides/nginx
|
# https://plausible.io/docs/proxy/guides/nginx
|
||||||
set $plausible_script_url https://plausible.io/js/script.js; # Change this if you use a different variant of the script
|
set $plausible_script_url https://plausible.io/js/script.js; # Change this if you use a different variant of the script
|
||||||
set $plausible_event_url https://plausible.io/api/event;
|
set $plausible_event_url https://plausible.io/api/event;
|
||||||
|
proxy_cache_path /var/run/nginx-cache/jscache levels=1:2 keys_zone=jscache:100m inactive=30d use_temp_path=off max_size=100m;
|
||||||
location = /js/script.js {
|
location = /js/script.js {
|
||||||
proxy_pass $plausible_script_url;
|
proxy_pass $plausible_script_url;
|
||||||
proxy_set_header Host plausible.io;
|
proxy_set_header Host plausible.io;
|
||||||
|
|
Loading…
Reference in a new issue