docs: 📝 Remove support for from-source installs
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 5s
Build Docker Images / lint (push) Failing after 10s
Build Docker Images / check (push) Failing after 10s
Build Docker Images / tests (push) Failing after 6s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / build (push) Failing after 5s
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Mirror to Codeberg / Mirror (push) Failing after 0s
Nix Build / check (push) Failing after 5s

This commit is contained in:
Jesse Wierzbinski 2025-02-15 18:49:31 +01:00
parent e5b44cb946
commit e6c7e8a597
No known key found for this signature in database
2 changed files with 13 additions and 56 deletions

View file

@ -7,10 +7,6 @@ Versia Server includes a built-in, scripting-compatible CLI that can be used to
Versia Server includes a built-in CLI for managing the server. To use it, simply run the following command:
```bash
# Development
bun cli help
# Source installs
bun run dist/cli.js help
# Docker
# Replace `versia` with the name of your container
docker compose exec -it versia /bin/sh /app/entrypoint.sh cli help
@ -22,4 +18,4 @@ You can use the `help` command to see a list of available commands. These includ
Some CLI commands that return data as tables can be used in scripts. To convert them to JSON or CSV, some commands allow you to specify a `--format` flag that can be either `"json"` or `"csv"`. See `cli help` or `cli <command> -h` for more information.
Flags can be used in any order and anywhere in the script (except for the `cli` command itself).
Flags can be used in any order and anywhere in the script (except for the `cli` command itself).

View file

@ -2,20 +2,16 @@
## Requirements
- The [Bun Runtime](https://bun.sh), version 1.2.0 or later (usage of the latest version is recommended)
- Versia Server will not work on lower versions than 1.2.0.
- A PostgreSQL database
- (Optional but recommended) A Linux-based operating system
- (Optional if you want search) A working [Sonic](https://github.com/valeriansaliou/sonic) instance
- A Linux-based operating system. Kernel version `6.1` or later is recommended.
- Basic knowledge of Docker and Docker Compose.
> [!WARNING]
> Versia Server has not been tested on Windows or macOS. It is recommended to use a Linux-based operating system to run Versia Server.
## Installation
> [!INFO]
>
> We will not be offering support to Windows or macOS users. If you are using one of these operating systems, please use a virtual machine or container to run Versia Server.
## With Docker/Podman
Docker is the recommended way to run Versia Server (Podman also works). To run Versia Server with Docker, follow these steps:
> Traditional "from-source" installation is not supported, as the server is designed to be run in a containerized environment. This guide will cover how to run the server using Docker.
>
> You may still run the server without Docker, but I can't guarantee that it will work properly.
1. Download the `docker-compose.yml` file from the repository
@ -35,7 +31,9 @@ curl -o config.example.toml https://raw.githubusercontent.com/versia-pub/server/
5. Run the following command to start the server:
> [!WARNING]
> The first time you start the server, it will generate keys which will be printed in logs. The server will not start until you put these keys in the config file.
> The first time you start the server, it will complain about missing keys in the configuration file.
>
> These will be autogenerated and printed to the console, so you can copy them to your `config.toml` file.
```bash
docker compose up
@ -45,41 +43,6 @@ You may need root privileges to run Docker commands.
To check server logs, run `docker compose logs versia`. The server will likely stop if there is an error, so you can check the logs to see what went wrong.
## From Source
1. Clone this repository
```bash
git clone https://github.com/versia-pub/server.git
```
2. Install the dependencies
```bash
bun install
```
1. Set up a PostgreSQL database (you need a special extension, please look at [the database documentation](./database.md))
2. (If you want search)
Create a [Sonic](https://github.com/valeriansaliou/sonic) instance (using Docker is recommended). For a [`docker-compose`] file, copy the `sonic` service from the [`docker-compose.yml`](https://github.com/versia-pub/server/blob/v0.7.0/docker-compose.yml) file. Don't forget to fill in the `config.cfg` for Sonic!
1. Build everything:
```bash
bun run build
```
4. Copy the `config.example.toml` file to `config.toml` inside `dist/config/` and fill in the values (you can leave most things to the default, but you will need to configure things such as the database connection)
5. Move to the `dist/` directory
```bash
cd dist
```
You may now start the server with `bun run cli/index.js start`. All other code not in the `dist/` directory can be removed.
## Running the Server
Database migrations are run automatically on startup.
@ -88,8 +51,6 @@ Please see the [CLI documentation](../cli/index.md) for more information on how
## Updating the server
Updating the server is as simple as pulling the latest changes from the repository and running `bun run build` again. You may need to run `bun install` again if there are new dependencies.
For Docker, you can run `docker-compose pull` to update the Docker images.
Updating the server is as simple as running `docker-compose pull` to update the Docker images, then `docker-compose up` to restart the server.
Sometimes, new configuration options are added to `config.example.toml`. If you see a new option in the example file, you should add it to your `config.toml` file.