mirror of
https://github.com/TxtDot/documentation.git
synced 2025-02-23 12:53:12 +03:00
Deploying to gh-pages from @ TxtDot/documentation@a978a32255 🚀
This commit is contained in:
parent
4211747fa4
commit
e27619b7ab
8 changed files with 1793 additions and 67 deletions
|
@ -12,6 +12,8 @@
|
|||
<link rel="prev" href="..">
|
||||
|
||||
|
||||
<link rel="next" href="../docker/">
|
||||
|
||||
|
||||
<link rel="icon" href="../assets/images/favicon.png">
|
||||
<meta name="generator" content="mkdocs-1.5.2, mkdocs-material-9.2.5">
|
||||
|
@ -313,28 +315,29 @@
|
|||
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#without-docker" class="md-nav__link">
|
||||
Without Docker
|
||||
<a href="#install-nodejs-and-npm" class="md-nav__link">
|
||||
Install nodejs and npm
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Without Docker">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#add-txtdot-to-autostart" class="md-nav__link">
|
||||
Add txtdot to autostart
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#with-docker" class="md-nav__link">
|
||||
With Docker
|
||||
<a href="#create-a-user-for-txtdot" class="md-nav__link">
|
||||
Create a user for txtdot
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#build-config-and-launch" class="md-nav__link">
|
||||
Build, config and launch
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#add-txtdot-to-autostart" class="md-nav__link">
|
||||
Add txtdot to autostart
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
@ -347,6 +350,63 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../docker/" class="md-nav__link">
|
||||
|
||||
|
||||
<span class="md-ellipsis">
|
||||
Docker
|
||||
</span>
|
||||
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../env/" class="md-nav__link">
|
||||
|
||||
|
||||
<span class="md-ellipsis">
|
||||
Configuring
|
||||
</span>
|
||||
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../reverse/" class="md-nav__link">
|
||||
|
||||
|
||||
<span class="md-ellipsis">
|
||||
Reverse Proxy
|
||||
</span>
|
||||
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
@ -374,28 +434,29 @@
|
|||
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#without-docker" class="md-nav__link">
|
||||
Without Docker
|
||||
<a href="#install-nodejs-and-npm" class="md-nav__link">
|
||||
Install nodejs and npm
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Without Docker">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#add-txtdot-to-autostart" class="md-nav__link">
|
||||
Add txtdot to autostart
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#with-docker" class="md-nav__link">
|
||||
With Docker
|
||||
<a href="#create-a-user-for-txtdot" class="md-nav__link">
|
||||
Create a user for txtdot
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#build-config-and-launch" class="md-nav__link">
|
||||
Build, config and launch
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#add-txtdot-to-autostart" class="md-nav__link">
|
||||
Add txtdot to autostart
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
@ -419,51 +480,60 @@
|
|||
|
||||
|
||||
<h1 id="self-hosting">Self-Hosting</h1>
|
||||
<h2 id="without-docker">Without Docker</h2>
|
||||
<p>Install Node and NPM:</p>
|
||||
<pre><code class="language-bash"># Debian, Ubuntu
|
||||
sudo apt install nodejs npm
|
||||
# CentOS
|
||||
<p>If you prefer hosting with Docker, see <a href="../docker/">Docker</a> instead.</p>
|
||||
<h2 id="install-nodejs-and-npm">Install nodejs and npm</h2>
|
||||
<p>For Debian, Ubuntu: packages in the repository are so old,
|
||||
consider installing them with <a href="https://github.com/nodesource/distributions#installation-instructions">NodeSource</a>.
|
||||
Minimal required version is NodeJS 18.</p>
|
||||
<p>Other distros:</p>
|
||||
<pre><code class="language-bash"># CentOS
|
||||
sudo yum install nodejs
|
||||
# Arch
|
||||
sudo pacman -S nodejs npm
|
||||
# Alpine
|
||||
doas apk add nodejs npm
|
||||
</code></pre>
|
||||
<p>Create a user for txtdot, log in:</p>
|
||||
<pre><code class="language-bash"># Not Alpine (coreutils)
|
||||
sudo useradd -r -m -s /sbin/nologin -U txtdot
|
||||
sudo -u txtdot -i
|
||||
|
||||
# Alpine (busybox)
|
||||
doas addgroup -S txtdot
|
||||
<h2 id="create-a-user-for-txtdot">Create a user for txtdot</h2>
|
||||
<p>Almost all distros except Alpine:</p>
|
||||
<pre><code class="language-bash">sudo useradd -r -m -s /sbin/nologin -U txtdot
|
||||
sudo -u txtdot bash
|
||||
</code></pre>
|
||||
<p>Alpine Linux with busybox and doas:</p>
|
||||
<pre><code class="language-bash">doas addgroup -S txtdot
|
||||
doas adduser -h /home/txtdot -s /sbin/nologin -G txtdot -S -D txtdot
|
||||
doas -u txtdot bash
|
||||
</code></pre>
|
||||
<p>Clone the repo: </p>
|
||||
<h2 id="build-config-and-launch">Build, config and launch</h2>
|
||||
<p>Clone the git repository, cd into it:</p>
|
||||
<pre><code class="language-bash">git clone https://github.com/txtdot/txtdot.git src
|
||||
cd src
|
||||
</code></pre>
|
||||
<p>Copy and modify the sample config file (see the <a href="../env/">Configuring</a> section):</p>
|
||||
<pre><code class="language-bash">cp .env.example .env
|
||||
nano .env
|
||||
</code></pre>
|
||||
<p>Install packages, compile TS:</p>
|
||||
<pre><code class="language-bash">cd src
|
||||
npm install
|
||||
<pre><code class="language-bash">npm install
|
||||
npm run build
|
||||
</code></pre>
|
||||
<p>Manually start the server to check if it works (Ctrl+C to exit):</p>
|
||||
<pre><code class="language-bash">npm run start
|
||||
</code></pre>
|
||||
<p>Log out from txtdot account: <code>exit</code></p>
|
||||
<h3 id="add-txtdot-to-autostart">Add txtdot to autostart</h3>
|
||||
<p>Log out from the txtdot account:</p>
|
||||
<pre><code class="language-bash">exit
|
||||
</code></pre>
|
||||
<h2 id="add-txtdot-to-autostart">Add txtdot to autostart</h2>
|
||||
<p>Either using systemd unit file:</p>
|
||||
<pre><code class="language-bash">wget https://github.com/TxtDot/txtdot/blob/main/txtdot.service
|
||||
<pre><code class="language-bash">wget https://raw.githubusercontent.com/TxtDot/txtdot/main/config/txtdot.service
|
||||
sudo chown root:root txtdot.service
|
||||
sudo chmod 755 txtdot.service
|
||||
sudo chmod 644 txtdot.service
|
||||
sudo mv txtdot.service /etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable txtdot
|
||||
sudo systemctl start txtdot
|
||||
</code></pre>
|
||||
<p>Or using OpenRC script:</p>
|
||||
<pre><code class="language-bash">wget -O txtdot https://github.com/TxtDot/txtdot/blob/main/txtdot.init
|
||||
<pre><code class="language-bash">wget -O txtdot https://raw.githubusercontent.com/TxtDot/txtdot/main/config/txtdot.init
|
||||
doas chown root:root txtdot
|
||||
doas chmod 755 txtdot
|
||||
doas mv txtdot /etc/init.d/
|
||||
|
@ -477,18 +547,6 @@ doas rc-service txtdot start
|
|||
@reboot sleep 10 && cd /home/txtdot/src && npm run start
|
||||
# Save the file and exit
|
||||
</code></pre>
|
||||
<h2 id="with-docker">With Docker</h2>
|
||||
<p>Docker Engine and Docker Compose are required.</p>
|
||||
<p>Note that built images are not provided via Docker Hub.
|
||||
If you can't or don't want to build them on your server
|
||||
and don't want to setup a CI/CD system,
|
||||
<a href="https://github.com/txtdot/txtdot/issues">let us know</a>,
|
||||
we'll consider setting up a GitHub Actions workflow.</p>
|
||||
<pre><code class="language-bash">git clone https://github.com/txtdot/txtdot.git
|
||||
cd txtdot
|
||||
docker compose build
|
||||
docker compose up -d
|
||||
</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue