In the root of your project, add .gitlab-ci.yml with the configuration below.
image: node:latest
stages:This gist contains example of how you can configure nginx reverse-proxy with autmatic container discovery, SSL certificates generation (using Let's Encrypt) and auto updates.
Features:
| /** | |
| * We collect this data from the performance entries instead of directly from GPT because the targeting | |
| * can can change between requests. Pulling data from googletag after a refresh will only give you the | |
| * cuurent state of GPT. | |
| */ | |
| (() => { | |
| function getUrlParams(search) { | |
| let hashes = search.split('&').filter(item => { | |
| return /^enc_prev_ius|^iu_parts|^prev_iu_szs|^prev_scp|^cust_params|^correlator/.test(item); |
| { | |
| "name": "browsersync-proxy-example", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "proxy.js", | |
| "scripts": { | |
| "start": "node ./proxy.js", | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "", |
| #!/bin/bash | |
| for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$') | |
| do | |
| git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes | |
| if [ $? -ne 0 ]; then | |
| echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint." | |
| exit 1 # exit with failure status | |
| fi | |
| done |