Skip to content

Commit

Permalink
Deploy website - based on c55a06d5d79e8d87f4a9c2d354d603bca138e156
Browse files Browse the repository at this point in the history
  • Loading branch information
ivictbor committed Oct 10, 2024
1 parent e17e6c1 commit 54831e5
Show file tree
Hide file tree
Showing 114 changed files with 143 additions and 131 deletions.
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<link rel="search" type="application/opensearchdescription+xml" title="Vue &amp; Node admin panel framework" href="/opensearch.xml">

<script src="/scripts/adminforth.js"></script><link rel="stylesheet" href="/assets/css/styles.ce766278.css">
<script src="/assets/js/runtime~main.b942f566.js" defer="defer"></script>
<script src="/assets/js/runtime~main.9a4d0037.js" defer="defer"></script>
<script src="/assets/js/main.58daaebd.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
1 change: 0 additions & 1 deletion assets/js/0f528969.6a8b9a79.js

This file was deleted.

1 change: 1 addition & 0 deletions assets/js/0f528969.72e0fac7.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion assets/js/4a260936.a8f76e67.js

This file was deleted.

1 change: 1 addition & 0 deletions assets/js/4a260936.c636fabf.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion assets/js/dbfc4782.1aa13a01.js

This file was deleted.

1 change: 1 addition & 0 deletions assets/js/dbfc4782.b2d59e40.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions blog/ai-blog/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion blog/archive/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<link rel="search" type="application/opensearchdescription+xml" title="Vue &amp; Node admin panel framework" href="/opensearch.xml">

<script src="/scripts/adminforth.js"></script><link rel="stylesheet" href="/assets/css/styles.ce766278.css">
<script src="/assets/js/runtime~main.b942f566.js" defer="defer"></script>
<script src="/assets/js/runtime~main.9a4d0037.js" defer="defer"></script>
<script src="/assets/js/main.58daaebd.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
10 changes: 6 additions & 4 deletions blog/atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<id>https://adminforth.dev/blog/ai-blog/</id>
<link href="https://adminforth.dev/blog/ai-blog/"/>
<updated>2024-10-01T00:00:00.000Z</updated>
<summary type="html"><![CDATA[Many developers today are using copilots to write code faster and think less about syntax.]]></summary>
<content type="html"><![CDATA[<p>Many developers today are using copilots to write code faster and think less about syntax.</p>
<p>But what about writing plain text? For example blogs and micro-blogs? Sometimes you want to share your progress and thoughts but you are lazy for typing. Then you can give a try to AI-assisted blogging. Our Open-Source AdminForth framework has couple of new AI-capable plugins to write text and generate images.</p>
<summary type="html"><![CDATA[Many developers today are using copilots to write code faster and relax their minds for some routine tasks.]]></summary>
<content type="html"><![CDATA[<p>Many developers today are using copilots to write code faster and relax their minds for some routine tasks.</p>
<p>But what about writing plain text? For example blogs and micro-blogs: sometimes you want to share your progress but you are lazy for typing. Then you can give a try to AI-assisted blogging. Our Open-Source AdminForth framework has couple of new AI-capable plugins to write text and generate images.</p>
<p><img decoding="async" loading="lazy" alt="alt text" src="https://adminforth.dev/assets/images/nuxtBlog-d00baa7e1b41d87869b09d475045fa7b.gif" width="1999" height="1499" class="img_ev3q"></p>
<p>You can also touch it live <a href="https://blog-demo.adminforth.dev/admin" target="_blank" rel="noopener noreferrer">here</a>.</p>
<p>You can also touch a blog which we will create in <a href="https://blog-demo.adminforth.dev/admin" target="_blank" rel="noopener noreferrer">live</a>.</p>
<p>For AI plugins are backed by OpenAI API, but their architecture allows to be easily extended for other AI providers once OpenAI competitors will reach the same or better level of quality.</p>
<p>Here we will suggest you simple as 1-2-3 steps to build and host a blog with AI assistant which will help you to write posts.</p>
<p>Our tech stack will include:</p>
Expand Down Expand Up @@ -101,6 +101,8 @@ Set up your avatar (you can generate it with AI) and public name in user setting
<p>We will dockerize app to make it easy to deploy with many ways. We will wrap both Node.js adminforth app and Nuxt.js app into single container for simplicity using supervisor. However you can split them into two containers and deploy them separately e.g. using docker compose.</p>
<p>Please note that in this demo example we routing requests to Nuxt.js app from AdminForth app using http-proxy.
While this will work fine, it might give slower serving then if you would route traffik using dedicated reverse proxies like traefik or nginx.</p>
<p>Create <code>bundleNow.ts</code> file in root project directory:</p>
<div class="language-ts codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#f8f8f2;--prism-background-color:#272822"><div class="codeBlockTitle_Ktv7">./bundleNow.ts</div><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-ts codeBlock_bY9V thin-scrollbar" style="color:#f8f8f2;background-color:#272822"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#f8f8f2"><span class="token keyword" style="color:#66d9ef">import</span><span class="token plain"> </span><span class="token punctuation" style="color:#f8f8f2">{</span><span class="token plain"> admin </span><span class="token punctuation" style="color:#f8f8f2">}</span><span class="token plain"> </span><span class="token keyword" style="color:#66d9ef">from</span><span class="token plain"> </span><span class="token string" style="color:#a6e22e">'./index.js'</span><span class="token punctuation" style="color:#f8f8f2">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token keyword" style="color:#66d9ef">await</span><span class="token plain"> admin</span><span class="token punctuation" style="color:#f8f8f2">.</span><span class="token function" style="color:#e6db74">bundleNow</span><span class="token punctuation" style="color:#f8f8f2">(</span><span class="token punctuation" style="color:#f8f8f2">{</span><span class="token plain"> hotReload</span><span class="token operator" style="color:#66d9ef">:</span><span class="token plain"> </span><span class="token boolean" style="color:#ae81ff">false</span><span class="token punctuation" style="color:#f8f8f2">}</span><span class="token punctuation" style="color:#f8f8f2">)</span><span class="token punctuation" style="color:#f8f8f2">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token builtin" style="color:#e6db74">console</span><span class="token punctuation" style="color:#f8f8f2">.</span><span class="token function" style="color:#e6db74">log</span><span class="token punctuation" style="color:#f8f8f2">(</span><span class="token string" style="color:#a6e22e">'Bundling AdminForth done.'</span><span class="token punctuation" style="color:#f8f8f2">)</span><span class="token punctuation" style="color:#f8f8f2">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<p>Create <code>Dockerfile</code> in root project directory:</p>
<div class="language-dockerfile codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#f8f8f2;--prism-background-color:#272822"><div class="codeBlockTitle_Ktv7">./Dockerfile</div><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-dockerfile codeBlock_bY9V thin-scrollbar" style="color:#f8f8f2;background-color:#272822"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#f8f8f2"><span class="token instruction keyword" style="color:#66d9ef">FROM</span><span class="token instruction"> node:20-alpine</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token instruction keyword" style="color:#66d9ef">EXPOSE</span><span class="token instruction"> 3500</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token instruction keyword" style="color:#66d9ef">WORKDIR</span><span class="token instruction"> /app</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token instruction keyword" style="color:#66d9ef">RUN</span><span class="token instruction"> apk add --no-cache supervisor</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token instruction keyword" style="color:#66d9ef">COPY</span><span class="token instruction"> package.json package-lock.json ./</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token instruction keyword" style="color:#66d9ef">RUN</span><span class="token instruction"> npm ci</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token instruction keyword" style="color:#66d9ef">COPY</span><span class="token instruction"> seo/package.json seo/package-lock.json seo/</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token instruction keyword" style="color:#66d9ef">RUN</span><span class="token instruction"> cd seo &amp;&amp; npm ci</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token instruction keyword" style="color:#66d9ef">COPY</span><span class="token instruction"> . .</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token instruction keyword" style="color:#66d9ef">RUN</span><span class="token instruction"> npx tsx bundleNow.ts</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token instruction keyword" style="color:#66d9ef">RUN</span><span class="token instruction"> cd seo &amp;&amp; npm run build</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token instruction keyword" style="color:#66d9ef">RUN</span><span class="token instruction"> cat &gt; /etc/supervisord.conf &lt;&lt;EOF</span><span class="token plain"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">[supervisord]</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">nodaemon=true</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">[program:app]</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">command=npm run startLive</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">directory=/app</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">autostart=true</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">autorestart=true</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">stdout_logfile=/dev/stdout</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">stderr_logfile=/dev/stderr</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">[program:seo]</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">command=sh -c "cd seo &amp;&amp; node .output/server/index.mjs"</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">directory=/app</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">autostart=true</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">autorestart=true</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">stdout_logfile=/dev/stdout</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">stderr_logfile=/dev/stderr</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">[program:prisma]</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">command=npx --yes prisma migrate dev --name init</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">directory=/app</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">autostart=true</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">stdout_logfile=/dev/stdout</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">stderr_logfile=/dev/stderr</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain">EOF</span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#f8f8f2"><span class="token plain"></span><span class="token instruction keyword" style="color:#66d9ef">CMD</span><span class="token instruction"> [</span><span class="token instruction string" style="color:#a6e22e">"supervisord"</span><span class="token instruction">, </span><span class="token instruction string" style="color:#a6e22e">"-c"</span><span class="token instruction">, </span><span class="token instruction string" style="color:#a6e22e">"/etc/supervisord.conf"</span><span class="token instruction">]</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<p>Create <code>.dockerignore</code> file in root project directory:</p>
Expand Down
2 changes: 1 addition & 1 deletion blog/chatgpt-plugin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<link rel="search" type="application/opensearchdescription+xml" title="Vue &amp; Node admin panel framework" href="/opensearch.xml">

<script src="/scripts/adminforth.js"></script><link rel="stylesheet" href="/assets/css/styles.ce766278.css">
<script src="/assets/js/runtime~main.b942f566.js" defer="defer"></script>
<script src="/assets/js/runtime~main.9a4d0037.js" defer="defer"></script>
<script src="/assets/js/main.58daaebd.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
Loading

0 comments on commit 54831e5

Please sign in to comment.