mirror of
https://github.com/TxtDot/documentation.git
synced 2024-11-22 12:56:22 +03:00
Separated self-hosting guide into 2 pages, bugfixes
This commit is contained in:
parent
a2d7f48503
commit
2750ec3a27
2 changed files with 25 additions and 24 deletions
18
docs/docker.md
Normal file
18
docs/docker.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Docker
|
||||
|
||||
If you prefer hosting without Docker, see [Self-Hosting](selfhost.md) instead.
|
||||
|
||||
Docker Engine and Docker Compose are required.
|
||||
|
||||
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,
|
||||
[let us know](https://github.com/txtdot/txtdot/issues),
|
||||
we'll consider setting up a GitHub Actions workflow.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/txtdot/txtdot.git
|
||||
cd txtdot
|
||||
docker compose build
|
||||
docker compose up -d
|
||||
```
|
|
@ -1,8 +1,8 @@
|
|||
# Self-Hosting
|
||||
|
||||
## Without Docker
|
||||
If you prefer hosting with Docker, see [Docker](docker.md) instead.
|
||||
|
||||
### Install nodejs and npm
|
||||
## Install nodejs and npm
|
||||
|
||||
For Debian, Ubuntu: packages in the repository are so old,
|
||||
consider installing them with [NodeSource](https://github.com/nodesource/distributions#installation-instructions).
|
||||
|
@ -18,7 +18,7 @@ sudo pacman -S nodejs npm
|
|||
doas apk add nodejs npm
|
||||
```
|
||||
|
||||
### User for txtdot
|
||||
## Create a user for txtdot
|
||||
|
||||
Almost all distros except Alpine:
|
||||
```bash
|
||||
|
@ -26,14 +26,14 @@ sudo useradd -r -m -s /sbin/nologin -U txtdot
|
|||
sudo -u txtdot bash
|
||||
```
|
||||
|
||||
Alpine Linux with busybox + doas:
|
||||
Alpine Linux with busybox and doas:
|
||||
```bash
|
||||
doas addgroup -S txtdot
|
||||
doas adduser -h /home/txtdot -s /sbin/nologin -G txtdot -S -D txtdot
|
||||
doas -u txtdot bash
|
||||
```
|
||||
|
||||
### Build, config and launch
|
||||
## Build, config and launch
|
||||
|
||||
Clone the git repository, cd into it:
|
||||
```bash
|
||||
|
@ -41,7 +41,7 @@ git clone https://github.com/txtdot/txtdot.git src
|
|||
cd src
|
||||
```
|
||||
|
||||
Copy and modify the sample config file (see the Environment section):
|
||||
Copy and modify the sample config file (see the [Configuring](env.md) section):
|
||||
```bash
|
||||
cp .env.example .env
|
||||
nano .env
|
||||
|
@ -63,7 +63,7 @@ Log out from the txtdot account:
|
|||
exit
|
||||
```
|
||||
|
||||
### Add txtdot to autostart
|
||||
## Add txtdot to autostart
|
||||
Either using systemd unit file:
|
||||
```bash
|
||||
wget https://raw.githubusercontent.com/TxtDot/txtdot/main/config/txtdot.service
|
||||
|
@ -93,20 +93,3 @@ sudo crontab -u txtdot -e
|
|||
@reboot sleep 10 && cd /home/txtdot/src && npm run start
|
||||
# Save the file and exit
|
||||
```
|
||||
|
||||
## With Docker
|
||||
|
||||
Docker Engine and Docker Compose are required.
|
||||
|
||||
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,
|
||||
[let us know](https://github.com/txtdot/txtdot/issues),
|
||||
we'll consider setting up a GitHub Actions workflow.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/txtdot/txtdot.git
|
||||
cd txtdot
|
||||
docker compose build
|
||||
docker compose up -d
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue