Skip to content

Commit

Permalink
fix CaddyFile
Browse files Browse the repository at this point in the history
Signed-off-by: Sukanya Rath <[email protected]>
  • Loading branch information
sukanya-rath committed May 1, 2024
1 parent 2f29047 commit 85034e5
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 47 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci_cd_on_pr_dev_sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ jobs:
triggers: ('frontend/')
build_file: ./frontend/Dockerfile
build_context: ./frontend
build_args: |
VITE_SNOWPLOW_URL=${{ secrets.VITE_SNOWPLOW_URL }}
- package: database-migrations
triggers: ('backend/db')
build_file: ./backend/db/Dockerfile
Expand Down
2 changes: 0 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Build static files
FROM node:lts-alpine AS build
ARG VITE_SNOWPLOW_URL
WORKDIR /app
COPY . .
ENV VITE_SNOWPLOW_URL=$VITE_SNOWPLOW_URL
RUN npm ci --ignore-scripts && \
npm run build

Expand Down
2 changes: 2 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<link rel="apple-touch-icon" href="bcid-apple-touch-icon.png">
<link rel="preload" href="https://fonts.googleapis.com/css?family=Material+Icons" as="style">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons">
<script type="text/javascript" src="/env.js"></script>
<title>FIN Pay Transparency</title>
</head>

Expand All @@ -18,6 +19,7 @@
<strong>Please enable JavaScript to continue.</strong>
</noscript>
<div id="app"></div>
<script src="/snowplow.js"></script>
<script type="module" src="/src/main.js"></script>
<!-- built files will be auto injected -->
</body>
Expand Down
20 changes: 20 additions & 0 deletions frontend/public/snowplow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// <!-- Snowplow starts plowing - Standalone vE.2.14.0 -->
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","https://www2.gov.bc.ca/StaticWebResources/static/sp/sp-2-14-0.js","snowplow"));
window.snowplow('newTracker','rt',window.config.SNOWPLOW_URL, {
appId: 'Snowplow_standalone',
cookieLifetime: 86400 * 548,
platform: 'web',
post: true,
forceSecureTracker: true,
contexts: {
webPage: true,
performanceTiming: true
}
});
window.snowplow('enableActivityTracking', 30, 30); // Ping every 30 seconds after 30 seconds
window.snowplow('enableLinkClickTracking');
window.snowplow('trackPageView');
// <!-- Snowplow stops plowing -->
3 changes: 0 additions & 3 deletions frontend/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ import 'viewerjs/dist/viewer.css';
import component from 'v-viewer';
import VueDOMPurifyHTML from 'vue-dompurify-html';

import { initializeSnowplow } from './snowplow';
/* istanbul ignore next */
initializeSnowplow(import.meta.env.VITE_SNOWPLOW_URL);

const myCustomLightTheme = {
dark: false,
Expand Down
40 changes: 0 additions & 40 deletions frontend/src/snowplow.js

This file was deleted.

0 comments on commit 85034e5

Please sign in to comment.