feat(sites): add infra.mareshq.com
This commit is contained in:
parent
4c8df2eb22
commit
4b658dd283
22 changed files with 504 additions and 0 deletions
3
sites/infra.mareshq.com/.eslintrc.json
Normal file
3
sites/infra.mareshq.com/.eslintrc.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": "next/core-web-vitals"
|
||||
}
|
||||
37
sites/infra.mareshq.com/.gitignore
vendored
Normal file
37
sites/infra.mareshq.com/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
29
sites/infra.mareshq.com/.gitlab-ci.yml
Normal file
29
sites/infra.mareshq.com/.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
default:
|
||||
image: sikalabs/ci
|
||||
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
IMAGE: $CI_REGISTRY_IMAGE/infra.mareshq.com
|
||||
IMAGE_TAG: $CI_COMMIT_BRANCH-$CI_COMMIT_SHORT_SHA
|
||||
|
||||
build:
|
||||
stage: build
|
||||
before_script:
|
||||
- docker info
|
||||
script:
|
||||
- echo $CI_REGISTRY_PASSWORD | docker login --username $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
|
||||
- docker build --tag $IMAGE:$IMAGE_TAG --file ./build/Containerfile --build-arg SITE=infra.mareshq.com .
|
||||
- docker push $IMAGE:$IMAGE_TAG
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
script:
|
||||
- helm upgrade --install --namespace internal-static-sites -f ./sites/infra.mareshq.com/helm-values.yaml --set image.tag=$IMAGE_TAG --set image.pullSecretBase64=$REGISTRY_PULL_SECRET_BASE64 infra-mareshq-com ./deploy/charts/static-site
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
environment:
|
||||
name: infra-mareshq-com
|
||||
url: https://infra.mareshq.com
|
||||
7
sites/infra.mareshq.com/.vscode/settings.json
vendored
Normal file
7
sites/infra.mareshq.com/.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
||||
}
|
||||
34
sites/infra.mareshq.com/NEXT.README.md
Normal file
34
sites/infra.mareshq.com/NEXT.README.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
||||
|
||||
## Getting Started
|
||||
|
||||
First, run the development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
|
||||
|
||||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
|
||||
|
||||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
||||
3
sites/infra.mareshq.com/README.md
Normal file
3
sites/infra.mareshq.com/README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# signpost.mareshq.com
|
||||
|
||||
Crossroad for all my services currently running
|
||||
30
sites/infra.mareshq.com/content/dedicated-servers.json
Normal file
30
sites/infra.mareshq.com/content/dedicated-servers.json
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
[
|
||||
{
|
||||
"name": "loris",
|
||||
"provider": "hetzner-dedicated",
|
||||
"zone": "fsn1",
|
||||
"ip": "142.132.144.165",
|
||||
"belongsTo": "kubernetes/bee.k8s.vxm.cz"
|
||||
},
|
||||
{
|
||||
"name": "otary",
|
||||
"provider": "hetzner-dedicated",
|
||||
"zone": "fsn1",
|
||||
"ip": "167.235.7.102",
|
||||
"belongsTo": "kubernetes/bee.k8s.vxm.cz"
|
||||
},
|
||||
{
|
||||
"name": "rhino",
|
||||
"provider": "hetzner-dedicated",
|
||||
"zone": "fsn1",
|
||||
"ip": "167.235.7.101",
|
||||
"belongsTo": "kubernetes/bee.k8s.vxm.cz"
|
||||
},
|
||||
{
|
||||
"name": "maple",
|
||||
"provider": "hetzner-dedicated",
|
||||
"zone": "fsn1",
|
||||
"ip": "138.201.254.39",
|
||||
"belongsTo": "acaslab/pterodcatyl"
|
||||
}
|
||||
]
|
||||
8
sites/infra.mareshq.com/content/kubernetes.json
Normal file
8
sites/infra.mareshq.com/content/kubernetes.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[
|
||||
{
|
||||
"name": "bee",
|
||||
"provider": "k3s",
|
||||
"zone": "fsn1",
|
||||
"url": "bee.k8s.vxm.cz"
|
||||
}
|
||||
]
|
||||
21
sites/infra.mareshq.com/content/links.json
Normal file
21
sites/infra.mareshq.com/content/links.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[
|
||||
{ "name": "GitLab", "url": "https://gitlab.mareshq.com" },
|
||||
{ "name": "Sentry", "url": "https://sentry.mareshq.com" },
|
||||
{
|
||||
"name": "Prometheus",
|
||||
"url": "https://prometheus.cloud.mareshq.com"
|
||||
},
|
||||
{
|
||||
"name": "Alert Manager",
|
||||
"url": "https://alertmanager.cloud.mareshq.com"
|
||||
},
|
||||
{ "name": "Grafana", "url": "https://grafana.cloud.mareshq.com" },
|
||||
{
|
||||
"name": "bee.k8s.vxm.cz",
|
||||
"url": "https://signpost.cloud.mareshq.com"
|
||||
},
|
||||
{
|
||||
"name": "signpost.mareshq.com",
|
||||
"url": "https://signpost.mareshq.com"
|
||||
}
|
||||
]
|
||||
9
sites/infra.mareshq.com/content/loadbalancers.json
Normal file
9
sites/infra.mareshq.com/content/loadbalancers.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[
|
||||
{
|
||||
"name": "bee-k8s",
|
||||
"provider": "hetzner-cloud",
|
||||
"zone": "fsn1",
|
||||
"ip": "49.12.17.251",
|
||||
"belongsTo": "kubernetes/bee.k8s.vxm.cz"
|
||||
}
|
||||
]
|
||||
44
sites/infra.mareshq.com/content/virtual-servers.json
Normal file
44
sites/infra.mareshq.com/content/virtual-servers.json
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
[
|
||||
{
|
||||
"name": "gitlab",
|
||||
"provider": "hetzner-cloud",
|
||||
"zone": "fsn1",
|
||||
"ip": "142.132.144.165",
|
||||
"belongsTo": "gitlab"
|
||||
},
|
||||
{
|
||||
"name": "sentry",
|
||||
"provider": "hetzner-cloud",
|
||||
"zone": "fsn1",
|
||||
"ip": "167.235.7.102",
|
||||
"belongsTo": "sentry"
|
||||
},
|
||||
{
|
||||
"name": "willow",
|
||||
"provider": "hetzner-cloud",
|
||||
"zone": "fsn1",
|
||||
"ip": "142.132.229.156",
|
||||
"belongsTo": "wsj"
|
||||
},
|
||||
{
|
||||
"name": "alder",
|
||||
"provider": "hetzner-cloud",
|
||||
"zone": "fsn1",
|
||||
"ip": "188.34.153.130",
|
||||
"belongsTo": "acaslab/pterodactyl"
|
||||
},
|
||||
{
|
||||
"name": "gitlab-runner-micro",
|
||||
"provider": "hetzner-cloud",
|
||||
"zone": "fsn1",
|
||||
"ip": "142.132.182.136",
|
||||
"belongsTo": "gitlab"
|
||||
},
|
||||
{
|
||||
"name": "controlplane-bee-k8s",
|
||||
"provider": "hetzner-cloud",
|
||||
"zone": "fsn1",
|
||||
"ip": "167.235.226.67",
|
||||
"belongsTo": "kubernetes/bee.k8s.vxm.cz"
|
||||
}
|
||||
]
|
||||
18
sites/infra.mareshq.com/helm-values.yaml
Normal file
18
sites/infra.mareshq.com/helm-values.yaml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
image:
|
||||
repository: registry.mareshq.com/mareshq/internal-static-sites/infra.mareshq.com
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: nginx
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
kubernetes.io/tls-acme: 'true'
|
||||
hosts:
|
||||
- host: infra.mareshq.com
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls:
|
||||
- secretName: infra-mareshq-com
|
||||
hosts:
|
||||
- infra.mareshq.com
|
||||
5
sites/infra.mareshq.com/next-env.d.ts
vendored
Normal file
5
sites/infra.mareshq.com/next-env.d.ts
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||
12
sites/infra.mareshq.com/next.config.js
Normal file
12
sites/infra.mareshq.com/next.config.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/** @type {import('next').NextConfig} */
|
||||
module.exports = {
|
||||
reactStrictMode: true,
|
||||
};
|
||||
|
||||
const withTM = require('next-transpile-modules')([
|
||||
'@themes/infra',
|
||||
'@themes/common',
|
||||
'@themes/signpost',
|
||||
]);
|
||||
|
||||
module.exports = withTM(module.exports);
|
||||
27
sites/infra.mareshq.com/package.json
Normal file
27
sites/infra.mareshq.com/package.json
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"name": "@sites/www.vxm.cz",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build && next export",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "12.0.7",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "16.11.7",
|
||||
"@types/react": "17.0.34",
|
||||
"autoprefixer": "^10.4.0",
|
||||
"eslint": "7",
|
||||
"eslint-config-next": "12.0.3",
|
||||
"next-transpile-modules": "^9.0.0",
|
||||
"postcss": "^8.3.11",
|
||||
"tailwindcss": "^3.0.8",
|
||||
"typescript": "4.4.4"
|
||||
}
|
||||
}
|
||||
8
sites/infra.mareshq.com/pages/_app.tsx
Normal file
8
sites/infra.mareshq.com/pages/_app.tsx
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import '../styles/globals.css';
|
||||
import type { AppProps } from 'next/app';
|
||||
|
||||
function App({ Component, pageProps }: AppProps) {
|
||||
return <Component {...pageProps} />;
|
||||
}
|
||||
|
||||
export default App;
|
||||
164
sites/infra.mareshq.com/pages/index.tsx
Normal file
164
sites/infra.mareshq.com/pages/index.tsx
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
import type { NextPage } from 'next';
|
||||
import Head from 'next/head';
|
||||
import Layout from '@themes/infra/components/Layout';
|
||||
import Link from '@themes/signpost/components/Link';
|
||||
import links from '../content/links.json';
|
||||
import dedicatedServers from '../content/dedicated-servers.json';
|
||||
import virtualServers from '../content/virtual-servers.json';
|
||||
import loadbalancers from '../content/loadbalancers.json';
|
||||
import kubernetes from '../content/kubernetes.json';
|
||||
|
||||
const Home: NextPage = () => {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>infra.mareshq.com</title>
|
||||
<meta
|
||||
name="description"
|
||||
content="Vojtech Mares (MaresHQ) Infrastructure overview"
|
||||
/>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<Layout>
|
||||
<h3 className="text-gray-600">infra.mareshq.com</h3>
|
||||
|
||||
<main>
|
||||
<h1 className="font-sans font-bold text-4xl">
|
||||
MaresHQ Infrastructure
|
||||
</h1>
|
||||
<div className="grid grid-cols-12 gap-4">
|
||||
<div className="col-span-3">
|
||||
<div className="mt-4">
|
||||
<h2 className="text-3xl font-bold">links</h2>
|
||||
<ul>
|
||||
{links.map((l) => (
|
||||
<li className="my-2">
|
||||
<Link title={l.name} url={l.url} />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-span-9">
|
||||
<div className="mt-4">
|
||||
<h2 className="text-3xl font-bold">
|
||||
virtual servers
|
||||
</h2>
|
||||
<table className="table-fixed w-full">
|
||||
<thead className="text-left">
|
||||
<tr>
|
||||
<th>name</th>
|
||||
<th>provider</th>
|
||||
<th>zone</th>
|
||||
<th>ip</th>
|
||||
<th>belongs to</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{virtualServers.map((vs) => (
|
||||
<tr>
|
||||
<td>{vs.name}</td>
|
||||
<td>{vs.provider}</td>
|
||||
<td>{vs.zone}</td>
|
||||
<td>
|
||||
<code>{vs.ip}</code>
|
||||
</td>
|
||||
<td>{vs.belongsTo}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div className="mt-4">
|
||||
<h2 className="text-3xl font-bold">
|
||||
dedicated servers
|
||||
</h2>
|
||||
<table className="table-fixed w-full">
|
||||
<thead className="text-left">
|
||||
<tr>
|
||||
<th>name</th>
|
||||
<th>provider</th>
|
||||
<th>zone</th>
|
||||
<th>ip</th>
|
||||
<th>belongs to</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{dedicatedServers.map((ds) => (
|
||||
<tr>
|
||||
<td>{ds.name}</td>
|
||||
<td>{ds.provider}</td>
|
||||
<td>{ds.zone}</td>
|
||||
<td>
|
||||
<code>{ds.ip}</code>
|
||||
</td>
|
||||
<td>{ds.belongsTo}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div className="mt-4">
|
||||
<h2 className="text-3xl font-bold">load balancers</h2>
|
||||
<table className="table-fixed w-full">
|
||||
<thead className="text-left">
|
||||
<tr>
|
||||
<th>name</th>
|
||||
<th>provider</th>
|
||||
<th>zone</th>
|
||||
<th>ip</th>
|
||||
<th>belongs to</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loadbalancers.map((lb) => (
|
||||
<tr>
|
||||
<td>{lb.name}</td>
|
||||
<td>{lb.provider}</td>
|
||||
<td>{lb.zone}</td>
|
||||
<td>
|
||||
<code>{lb.ip}</code>
|
||||
</td>
|
||||
<td>{lb.belongsTo}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div className="mt-4">
|
||||
<h2 className="text-3xl font-bold">
|
||||
kubernetes clusters
|
||||
</h2>
|
||||
<table className="table-fixed w-full">
|
||||
<thead className="text-left">
|
||||
<tr>
|
||||
<th>name</th>
|
||||
<th>provider</th>
|
||||
<th>zone</th>
|
||||
<th>url</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{kubernetes.map((k8s) => (
|
||||
<tr>
|
||||
<td>{k8s.name}</td>
|
||||
<td>{k8s.provider}</td>
|
||||
<td>{k8s.zone}</td>
|
||||
<td>{k8s.url}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Home;
|
||||
6
sites/infra.mareshq.com/postcss.config.js
Normal file
6
sites/infra.mareshq.com/postcss.config.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
BIN
sites/infra.mareshq.com/public/favicon.ico
Normal file
BIN
sites/infra.mareshq.com/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
3
sites/infra.mareshq.com/styles/globals.css
Normal file
3
sites/infra.mareshq.com/styles/globals.css
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
16
sites/infra.mareshq.com/tailwind.config.js
Normal file
16
sites/infra.mareshq.com/tailwind.config.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
module.exports = {
|
||||
content: [
|
||||
'./**/*.tsx',
|
||||
'./../../themes/infra/**/*.tsx',
|
||||
'./../../themes/common/**/*.tsx',
|
||||
'./../../themes/signpost/**/*.tsx',
|
||||
],
|
||||
darkMode: false, // or 'media' or 'class'
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
variants: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
20
sites/infra.mareshq.com/tsconfig.json
Normal file
20
sites/infra.mareshq.com/tsconfig.json
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in a new issue