diff --git a/docs/docker.md b/docs/docker.md new file mode 100644 index 0000000..2b10a82 --- /dev/null +++ b/docs/docker.md @@ -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 +``` diff --git a/docs/selfhost.md b/docs/selfhost.md index 9ba9acd..a20fe36 100644 --- a/docs/selfhost.md +++ b/docs/selfhost.md @@ -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 -```