Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

configuration

Alper Alkanf3e1497924b5
diff --git a/Dockerfile b/Dockerfile
index 1e1ea2a06..1f456f0f6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -18,15 +18,12 @@ RUN npm install -g pnpm && pnpm install && npm run build
# Stage 2
FROM nginx:stable-alpine
ENV TZ=Etc/UTC
-ENV JSFOLDER=/usr/share/nginx/html/static/js/*.js
-RUN rm -rf /usr/share/nginx/html/*
RUN apk add --no-cache tzdata && cp /usr/share/zoneinfo/$TZ /etc/localtime
+RUN rm -rf /usr/share/nginx/html/*
COPY --from=build /app/deployment/default.conf /etc/nginx/conf.d/default.conf
-COPY --from=build /app/build /usr/share/nginx/html
COPY --from=build /app/start-nginx.sh /usr/bin/start-nginx.sh
RUN chmod +x /usr/bin/start-nginx.sh
-WORKDIR /usr/share/nginx/html
-COPY --from=build /app/build .
-ENTRYPOINT [ "sh", "/usr/bin/start-nginx.sh" ]
+COPY --from=build /app/build /usr/share/nginx/html
+ENTRYPOINT ["/usr/bin/start-nginx.sh"]
EXPOSE 80
-HEALTHCHECK CMD curl -f http://localhost/ || exit 1
+HEALTHCHECK CMD curl -f http://localhost/ || exit
diff --git a/start-nginx.sh b/start-nginx.sh
index 7c49cf5d7..b8511eae1 100644
--- a/start-nginx.sh
+++ b/start-nginx.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-export EXISTING_VARS=$(printenv | awk -F= '{print $1}' | sed 's/^/\$/g' | paste -sd,);
-for file in $JSFOLDER;
+export EXISTING_VARS=$(printenv | awk -F= '{print $1}' | sed 's/^/\$/g' | paste -sd,);
+for file in /usr/share/nginx/html/static/js/*.js
do
- cat $file | envsubst $EXISTING_VARS | tee $file > /dev/null 2>&1
+ cat $file | envsubst $EXISTING_VARS | tee $file > /dev/null 2>&1
done
-nginx -g 'daemon off;'
+nginx -g 'daemon off;'
\ No newline at end of file