Skip to content

Commit f5761f6

Browse files
committed
Merge branch 'main' of github.com:zendoc-io/zendoc.io
2 parents 8c7f6b0 + e70a071 commit f5761f6

File tree

25 files changed

+272
-81
lines changed

25 files changed

+272
-81
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Dockerfile
2+
.dockerignore
3+
node_modules
4+
npm-debug.log
5+
README.md
6+
.next
7+
.git

.github/workflows/build-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: self-hosted
11+
runs-on: [self-hosted, testing]
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4

.github/workflows/prod-deploy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy Docker Container
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
deploy:
8+
runs-on: [self-hosted, production]
9+
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v3
13+
14+
- name: Build and tag Docker image
15+
run: |
16+
docker build -t zendoc.io:latest .
17+
18+
- name: Stop existing container
19+
run: |
20+
docker stop zendoc.io || true
21+
docker rm zendoc.io || true
22+
continue-on-error: true
23+
24+
- name: Deploy container
25+
run: |
26+
docker run -d --name zendoc.io \
27+
-p 4000:3000 \
28+
-e DB_USER="${{ secrets.DB_USER }}" \
29+
-e DB_PASS="${{ secrets.DB_PASS }}" \
30+
-e DB_HOST="${{ secrets.DB_HOST }}" \
31+
-e DB_PORT="${{ secrets.DB_PORT }}" \
32+
-e DB_DB="${{ secrets.DB_DB }}" \
33+
-e ENCRYPTION_KEY="${{ secrets.ENCRYPTION_KEY }}" \
34+
-e SMTP_HOST="${{ secrets.SMTP_HOST }}" \
35+
-e SMTP_PORT="${{ secrets.SMTP_PORT }}" \
36+
-e SMTP_PASSWORD="${{ secrets.SMTP_PASSWORD }}" \
37+
-e SMTP_USER="${{ secrets.SMTP_USER }}" \
38+
-e SMTP_FROM="${{ secrets.SMTP_FROM }}" \
39+
--restart unless-stopped \
40+
zendoc.io:latest

Dockerfile

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# syntax=docker.io/docker/dockerfile:1
2+
3+
FROM node:18-alpine AS base
4+
5+
# Install dependencies only when needed
6+
FROM base AS deps
7+
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
8+
RUN apk add --no-cache libc6-compat
9+
WORKDIR /app
10+
11+
# Install dependencies based on the preferred package manager
12+
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
13+
RUN \
14+
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
15+
elif [ -f package-lock.json ]; then npm ci; \
16+
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
17+
else echo "Lockfile not found." && exit 1; \
18+
fi
19+
20+
21+
# Rebuild the source code only when needed
22+
FROM base AS builder
23+
WORKDIR /app
24+
COPY --from=deps /app/node_modules ./node_modules
25+
COPY . .
26+
27+
# Next.js collects completely anonymous telemetry data about general usage.
28+
# Learn more here: https://nextjs.org/telemetry
29+
# Uncomment the following line in case you want to disable telemetry during the build.
30+
# ENV NEXT_TELEMETRY_DISABLED=1
31+
32+
RUN \
33+
if [ -f yarn.lock ]; then yarn run build; \
34+
elif [ -f package-lock.json ]; then npm run build; \
35+
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
36+
else echo "Lockfile not found." && exit 1; \
37+
fi
38+
39+
# Production image, copy all the files and run next
40+
FROM base AS runner
41+
WORKDIR /app
42+
43+
ENV NODE_ENV=production
44+
# Uncomment the following line in case you want to disable telemetry during runtime.
45+
# ENV NEXT_TELEMETRY_DISABLED=1
46+
47+
RUN addgroup --system --gid 1001 nodejs
48+
RUN adduser --system --uid 1001 nextjs
49+
50+
COPY --from=builder /app/public ./public
51+
52+
# Automatically leverage output traces to reduce image size
53+
# https://nextjs.org/docs/advanced-features/output-file-tracing
54+
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
55+
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
56+
57+
USER nextjs
58+
59+
EXPOSE 3000
60+
61+
ENV PORT=3000
62+
63+
# server.js is created by next build from the standalone output
64+
# https://nextjs.org/docs/pages/api-reference/config/next-config-js/output
65+
ENV HOSTNAME="0.0.0.0"
66+
CMD ["node", "server.js"]

next.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
4+
output: "standalone",
45
webpack(config) {
56
// Grab the existing rule that handles SVG imports
67
const fileLoaderRule = config.module.rules.find((rule: any) =>
2.29 KB
Loading
12 KB
Loading

src/app/(default)/feature-roadmap/page.tsx

Lines changed: 57 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ import ExpandableContainers from "@/src/components/informationDisplay/Expandable
55
import StatusIndicator from "./_components/StatusIndicator";
66
import NewsletterSection from "@/src/components/sections/NewsletterSection";
77
import GitHubIcon from "@/public/icons/github.svg";
8+
import { Metadata } from "next";
9+
10+
export const metadata: Metadata = {
11+
title: "Feature Roadmap - Zendoc",
12+
description:
13+
"Here you can see which features already exist and which ones are coming in the future.",
14+
};
815

916
export default function FeatureRoadmapPage() {
1017
const style = {
@@ -18,56 +25,56 @@ export default function FeatureRoadmapPage() {
1825
description: string;
1926
expanded?: boolean;
2027
}[] = [
21-
{
22-
title: "A solid project base",
23-
status: "current-objective",
24-
description:
25-
"This is more of a necessity than a feature. Zendoc needs a solid foundation including secure authentication, efficient data access and lots more.",
26-
expanded: true,
27-
},
28-
{
29-
title: "Config Manager",
30-
status: "planned",
31-
description:
32-
"Using our config manager, you are able to reuse your configuration files on the fly and over the network for devices and services alike.",
33-
},
34-
{
35-
title: "Custom markdown documents",
36-
status: "planned",
37-
description:
38-
"An integrated markdown viewer and editor ensures that you can edit your documents directly in Zendoc.",
39-
},
40-
{
41-
title: "Hardware",
42-
status: "planned",
43-
description:
44-
"Using our Zendoc Agents, we collect hardware information for the documentation and other Zendoc tools.",
45-
},
46-
{
47-
title: "Network documentation",
48-
status: "planned",
49-
description:
50-
"We want to create a system that allows you to have an always up-to-date network documentation. This will allow you to monitor, visualize and debug most networks.",
51-
},
52-
{
53-
title: "Monitoring",
54-
status: "planned",
55-
description:
56-
"With our Monitoring module, we give you access to all information about your devices and services. This helps us to build a complete infrastructure overview for you.",
57-
},
58-
{
59-
title: "Daemon",
60-
status: "planned",
61-
description:
62-
"Our Daemon (Agent) is a locally running piece of software that provides your Zendoc instance with all the information and control needed.",
63-
},
64-
{
65-
title: "Enterprise features",
66-
status: "planned",
67-
description:
68-
"To make Zendoc accessible to businesses we want to add essential features like a permission system, API, LDAP/AD and SSO support.",
69-
},
70-
];
28+
{
29+
title: "A solid project base",
30+
status: "current-objective",
31+
description:
32+
"This is more of a necessity than a feature. Zendoc needs a solid foundation including secure authentication, efficient data access and lots more.",
33+
expanded: true,
34+
},
35+
{
36+
title: "Config Manager",
37+
status: "planned",
38+
description:
39+
"Using our config manager, you are able to reuse your configuration files on the fly and over the network for devices and services alike.",
40+
},
41+
{
42+
title: "Custom markdown documents",
43+
status: "planned",
44+
description:
45+
"An integrated markdown viewer and editor ensures that you can edit your documents directly in Zendoc.",
46+
},
47+
{
48+
title: "Hardware",
49+
status: "planned",
50+
description:
51+
"Using our Zendoc Agents, we collect hardware information for the documentation and other Zendoc tools.",
52+
},
53+
{
54+
title: "Network documentation",
55+
status: "planned",
56+
description:
57+
"We want to create a system that allows you to have an always up-to-date network documentation. This will allow you to monitor, visualize and debug most networks.",
58+
},
59+
{
60+
title: "Monitoring",
61+
status: "planned",
62+
description:
63+
"With our Monitoring module, we give you access to all information about your devices and services. This helps us to build a complete infrastructure overview for you.",
64+
},
65+
{
66+
title: "Daemon",
67+
status: "planned",
68+
description:
69+
"Our Daemon (Agent) is a locally running piece of software that provides your Zendoc instance with all the information and control needed.",
70+
},
71+
{
72+
title: "Enterprise features",
73+
status: "planned",
74+
description:
75+
"To make Zendoc accessible to businesses we want to add essential features like a permission system, API, LDAP/AD and SSO support.",
76+
},
77+
];
7178

7279
return (
7380
<div>

src/app/(default)/imprint/page.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
import { Metadata } from "next";
12
import React from "react";
23

4+
export const metadata: Metadata = {
5+
title: "Imprint - Zendoc",
6+
description:
7+
"Use Zendoc to automate your documentation and keep track of your infrastructure.",
8+
};
9+
310
export default function Imprint() {
411
const companyData = {
512
name: "Merckel u. Witzdam GbR",
@@ -17,7 +24,7 @@ export default function Imprint() {
1724
};
1825

1926
return (
20-
<div className="mx-auto max-w-4xl bg-white p-8 pt-24 text-gray-800">
27+
<div className="mx-auto max-w-4xl bg-white px-3 pb-3 pt-24 text-gray-800">
2128
<h1 className="mb-6 text-3xl font-bold">Imprint</h1>
2229

2330
<div className="mb-6">
@@ -48,12 +55,12 @@ export default function Imprint() {
4855
<p>
4956
<strong>Phone:</strong> {companyData.phone}
5057
</p>
51-
<p>
58+
<a className="block" href={`mailto:${companyData.email}`}>
5259
<strong>Email:</strong> {companyData.email}
53-
</p>
54-
<p>
60+
</a>
61+
<a className="block" href={companyData.website}>
5562
<strong>Website:</strong> {companyData.website}
56-
</p>
63+
</a>
5764
</div>
5865
</section>
5966

src/app/(default)/layout.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ import RedditIcon from "@/public/icons/reddit.svg";
66
import DiscordIcon from "@/public/icons/discord.svg";
77
import FooterLink from "@/src/components/footer/FooterLink";
88
import Header from "@/src/components/header/Header";
9+
import { Metadata } from "next";
10+
11+
export const metadata: Metadata = {
12+
openGraph: {
13+
siteName: "Zendoc",
14+
images: [{ url: "https://zendoc.io/icon.png" }],
15+
},
16+
};
917

1018
export default function DefaultLayout({
1119
children,
@@ -21,12 +29,10 @@ export default function DefaultLayout({
2129
description?: string;
2230
}[];
2331
}[] = [
24-
{ name: "Home", link: "/" },
25-
{ name: "Feature roadmap", link: "/feature-roadmap" },
26-
{ name: "Transparency", link: "/transparency" },
27-
{ name: "Imprint", link: "/imprint" },
28-
{ name: "Privacy", link: "/privacy" },
29-
];
32+
{ name: "Home", link: "/" },
33+
{ name: "Feature roadmap", link: "/feature-roadmap" },
34+
{ name: "Transparency", link: "/transparency" },
35+
];
3036

3137
return (
3238
<div>
@@ -81,7 +87,7 @@ export default function DefaultLayout({
8187
</div>
8288
<div>
8389
<p className="mb-3 mt-5 text-sm">
84-
© 2023 Zendoc. All rights reserved.
90+
© {new Date().getFullYear()} Zendoc. All rights reserved.
8591
</p>
8692
<div className="flex items-center gap-3 text-sm">
8793
<FooterLink href="/imprint">Imprint</FooterLink>

0 commit comments

Comments
 (0)