diff --git a/.drone.yml b/.drone.yml index 7ef96cd..46a9050 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,6 +20,9 @@ steps: auto_tag: true auto_tag_suffix: linux-amd64 dockerfile: Dockerfile + build_args: + - PLAUSIBLE_CUSTOM_DOMAIN=plausible.dwysokinski.me + - PLAUSIBLE_SCRIPT_URI=/js/script.js trigger: event: @@ -59,6 +62,6 @@ depends_on: - linux-amd64 --- kind: signature -hmac: e25fbff4e2ab2267b31f9ca24a98138ba6bb5dfbabe8e6ffe0a519951169c6b5 +hmac: 17ba699e82ab418a0db23c707f56fe06961ce365aaf236266ec7cbfd2d900d87 ... diff --git a/Dockerfile b/Dockerfile index d9f8d73..081788e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,12 @@ -FROM node:14.19.2-alpine as builder +FROM node:14.21.3-alpine as builder -ENV NODE_ENV=production -ENV GATSBY_TELEMETRY_DISABLED=1 +ARG PLAUSIBLE_CUSTOM_DOMAIN="" +ARG PLAUSIBLE_SCRIPT_URI="" + +ENV PLAUSIBLE_CUSTOM_DOMAIN=$PLAUSIBLE_CUSTOM_DOMAIN \ + PLAUSIBLE_SCRIPT_URI=$PLAUSIBLE_SCRIPT_URI \ + NODE_ENV=production \ + GATSBY_TELEMETRY_DISABLED=1 RUN apk --no-cache add shadow \ gcc \ @@ -23,7 +28,7 @@ RUN yarn COPY . ./ RUN yarn build -FROM nginx:1.21-alpine +FROM nginx:1.23-alpine COPY --from=builder /usr/src/app/public /var/www COPY default.conf /etc/nginx/templates/default.conf.template EXPOSE 80 diff --git a/README.md b/README.md index 2b88a30..4c8d830 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Screenshot](/src/images/projects/dw.png?raw=true) +![Screenshot](src/images/projects/dw.png?raw=true) ## License diff --git a/gatsby-config.js b/gatsby-config.js index 80a592e..c96dbfe 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -65,5 +65,13 @@ module.exports = { }, }, }, + { + resolve: `@kichiyaki/gatsby-plugin-plausible`, + options: { + domain: DOMAIN, + customDomain: process.env.PLAUSIBLE_CUSTOM_DOMAIN, + scriptUri: process.env.PLAUSIBLE_SCRIPT_URI + }, + }, ], }; diff --git a/package.json b/package.json index 5f5313c..cb49666 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "version": "0.1.0", "author": "Dawid WysokiƄski ", "dependencies": { + "@kichiyaki/gatsby-plugin-plausible": "^0.0.9", "@kichiyaki/roboto": "^1.0.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", diff --git a/yarn.lock b/yarn.lock index bf5a0e6..3600bfb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1646,6 +1646,13 @@ "@babel/runtime" "^7.7.2" regenerator-runtime "^0.13.3" +"@kichiyaki/gatsby-plugin-plausible@^0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@kichiyaki/gatsby-plugin-plausible/-/gatsby-plugin-plausible-0.0.9.tgz#b4c0fed04e6de60fd9a78d4349aac524baad8e38" + integrity sha512-EXua0P867k9+tb82gor+6TMq7tP4UKEcqb4HSTvN+QVPZdJhICO45KawOg84GzfpSOX6cXyD8QTnGOJfMb/ATg== + dependencies: + minimatch "3.0.4" + "@kichiyaki/roboto@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@kichiyaki/roboto/-/roboto-1.0.0.tgz#6f5dfb40e2423940588946c952490b123ca8088b"