This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 3000; | |
# server_name example.com; | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
location / { | |
proxy_set_header X-Prerender-Token "YOUR PRERENDER IO TOKEN GOES HERE"; | |
set $prerender 0; | |
if ($http_user_agent ~* "googlebot|apis-google|mediapartners-google|adsbot|bingbot|yandex|baiduspider|twitterbot|facebookexternalhit|rogerbot|linkedinbot|embedly|quora link preview|showyoubot|outbrain|pinterest\/0\.|pinterestbot|slackbot|vkShare|W3C_Validator|whatsapp|facebot") { | |
set $prerender 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
const fs = require('fs') | |
const routes = require('../common/routes') | |
async function generateSitemap () { | |
let links = [] | |
links = getVueRoutes() | |
// const blogsSlugsRes = await getBlogsSlugs(); | |
// links = links.concat(blogSlugs.data.data); writeSlugsToSitemap(links) | |
}; | |
function getVueRoutes () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: ingress-service | |
namespace: default | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
nginx.ingress.kubernetes.io/rewrite-target: / | |
nginx.ingress.kubernetes.io/enable-cors: "true" | |
nginx.ingress.kubernetes.io/ssl-redirect: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: web | |
spec: | |
selector: | |
app: web | |
ports: | |
- port: 3000 | |
targetPort: 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: web | |
spec: | |
selector: | |
matchLabels: | |
app: web | |
template: | |
metadata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use node alpine | |
FROM node:13.11.0-alpine as builder | |
# set the working directory in the container | |
WORKDIR /app | |
# COPY the package json and package json lock files | |
COPY package*.json ./ | |
# perform npm install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 3000; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
try_files $uri $uri/ /index.html =404; | |
} | |
} |