From d3163053ba3ea9051ab2c4b4e745589a83d2e11d Mon Sep 17 00:00:00 2001 From: azurejelly <178000437+azurejelly@users.noreply.github.com> Date: Fri, 25 Jul 2025 19:15:25 -0400 Subject: [PATCH 1/3] docs: add FAQ and video conversion pages, move to docs/ folder --- README.md | 79 +++------------------------------------- docs/DOCKER.md | 47 ++++++++++++++++++++++++ docs/FAQ.md | 20 ++++++++++ docs/GETTING_STARTED.md | 38 +++++++++++++++++++ docs/VIDEO_CONVERSION.md | 14 +++++++ 5 files changed, 124 insertions(+), 74 deletions(-) create mode 100644 docs/DOCKER.md create mode 100644 docs/FAQ.md create mode 100644 docs/GETTING_STARTED.md create mode 100644 docs/VIDEO_CONVERSION.md diff --git a/README.md b/README.md index 9572037..ee8ed84 100644 --- a/README.md +++ b/README.md @@ -16,81 +16,12 @@ VERT is built in Svelte and TypeScript. * Non-local video conversion is available with our official instance, but the [daemon](https://github.com/VERT-sh/vertd) is easily self-hostable to maintain privacy and fully local functionality. -## Getting Started +## Documentation -### Prerequisites - -Make sure you have the following installed: - -- [Bun](https://bun.sh/) - -### Installation -```sh -# Clone the repository -git clone https://github.com/VERT-sh/vert.git -cd vert -# Install dependencies -bun i -``` - -### Running Locally - -To run the project locally, run `bun dev`. - -This will start a development server. Open your browser and navigate to `http://localhost:5173` to see the application. - -### Building for Production - -Before building for production, make sure you create a `.env` file in the root of the project with the following content: - -```sh -PUB_HOSTNAME=example.com # change to your domain, only gets used for Plausible (for now) -PUB_PLAUSIBLE_URL=https://plausible.example.com # can be empty if not using Plausible -PUB_ENV=production # "production", "development" or "nightly" -PUB_VERTD_URL=https://vertd.vert.sh # default vertd instance -``` - -To build the project for production, run `bun run build` - -This will build the site to the `build` folder. You should then use a web server like [nginx](https://nginx.org) to serve the files inside that folder. - -If using nginx, you can use the [nginx.conf](./nginx.conf) file as a starting point. Make sure you keep [cross-origin isolation](https://web.dev/articles/cross-origin-isolation-guide) enabled. - -### With Docker - -Clone the repository, then build a Docker image with: -```shell -$ docker build -t vert-sh/vert \ - --build-arg PUB_ENV=production \ - --build-arg PUB_HOSTNAME=vert.sh \ - --build-arg PUB_PLAUSIBLE_URL=https://plausible.example.com \ - --build-arg PUB_VERTD_URL=https://vertd.vert.sh . -``` - -You can then run it by using: -```shell -$ docker run -d \ - --restart unless-stopped \ - -p 3000:80 \ - --name "vert" \ - vert-sh/vert -``` - -This will do the following: -- Use the previously built image as the container `vert`, in detached mode -- Continuously restart the container until manually stopped -- Map `3000/tcp` (host) to `80/tcp` (container) - -We also have a [`docker-compose.yml`](./docker-compose.yml) file available. Use `docker compose up` if you want to start the stack, or `docker compose down` to bring it down. You can pass `--build` to `docker compose up` to rebuild the Docker image (useful if you've changed any of the environment variables) as well as `-d` to start it in detached mode. You can read more about Docker Compose in general [here](https://docs.docker.com/compose/intro/compose-application-model/). - -While there's an image you can pull instead of cloning the repo and building the image yourself, you will not be able to update any of the environment variables (e.g. `PUB_PLAUSIBLE_URL`) as they're baked directly into the image and not obtained during runtime. If you're okay with this, you can simply run this command instead: -```shell -$ docker run -d \ - --restart unless-stopped \ - -p 3000:80 \ - --name "vert" \ - ghcr.io/vert-sh/vert:latest -``` +- [FAQ](./docs/FAQ.md) +- [Getting Started](./docs/GETTING_STARTED.md) +- [Using Docker](./docs/DOCKER.md) +- [Video Conversion](./docs/VIDEO_CONVERSION.md) ## License diff --git a/docs/DOCKER.md b/docs/DOCKER.md new file mode 100644 index 0000000..673b7ab --- /dev/null +++ b/docs/DOCKER.md @@ -0,0 +1,47 @@ +## Using Docker + +This file covers how to run VERT under a Docker container. + +### Manually building the image +First, clone the repository: +```shell +$ git clone https://github.com/VERT-sh/VERT +$ cd VERT/ +``` + +Then build a Docker image with: +```shell +$ docker build -t vert-sh/vert \ + --build-arg PUB_ENV=production \ + --build-arg PUB_HOSTNAME=vert.sh \ + --build-arg PUB_PLAUSIBLE_URL=https://plausible.example.com \ + --build-arg PUB_VERTD_URL=https://vertd.vert.sh \ + --build-arg PUB_DONATION_URL=https://donations.vert.sh \ + --build-arg PUB_STRIPE_KEY="" . +``` + +You can then run it by using: +```shell +$ docker run -d \ + --restart unless-stopped \ + -p 3000:80 \ + --name "vert" \ + vert-sh/vert +``` + +This will do the following: +- Use the previously built image as the container `vert`, in detached mode +- Continuously restart the container until manually stopped +- Map `3000/tcp` (host) to `80/tcp` (container) + +We also have a [`docker-compose.yml`](./docker-compose.yml) file available. Use `docker compose up` if you want to start the stack, or `docker compose down` to bring it down. You can pass `--build` to `docker compose up` to rebuild the Docker image (useful if you've changed any of the environment variables) as well as `-d` to start it in detached mode. You can read more about Docker Compose in general [here](https://docs.docker.com/compose/intro/compose-application-model/). + +### Using an image from the GitHub Container Registry +While there's an image you can pull instead of cloning the repo and building the image yourself, you will not be able to update any of the environment variables (e.g. `PUB_PLAUSIBLE_URL`) as they're baked directly into the image and not obtained during runtime. If you're okay with this, you can simply run this command instead: +```shell +$ docker run -d \ + --restart unless-stopped \ + -p 3000:80 \ + --name "vert" \ + ghcr.io/vert-sh/vert:latest +``` \ No newline at end of file diff --git a/docs/FAQ.md b/docs/FAQ.md new file mode 100644 index 0000000..1eaa773 --- /dev/null +++ b/docs/FAQ.md @@ -0,0 +1,20 @@ +## FAQ + +This file covers frequently asked questions. + +### Why VERT? +**File converters have always disappointed us.** They're ugly, riddled with ads, and most importantly; slow. We decided to solve this problem once and for all by making an alternative that solves all those problems, and more. + +All non-video files are converted completely on-device; this means that there's no delay between sending and receiving the files from a server, and we never get to snoop on the files you convert. + +### What happens with video files? +Video files get uploaded to our lightning-fast RTX 4000 Ada server. Your videos stay on there for an hour if you do not convert them. If you do convert the file, the video will stay on the server for an hour, or until it is downloaded. The file will then be deleted from our server. + +### Can I host my own video file converter? +Yes. Check out the [Video Conversion](./VIDEO_CONVERSION.md) page. + +### What about analytics? +We use [Plausible](https://plausible.io/privacy-focused-web-analytics), a privacy-focused analytics tool, to gather completely anonymous statistics. All data is anonymized and aggregated, and no identifiable information is ever sent or stored. You can view the analytics [here](https://ats.vert.sh/vert.sh) and choose to opt out in the [Settings](https://vert.sh/settings/) page. + +### What libraries does VERT use? +VERT uses FFmpeg for audio and video conversion, imagemagick for images and Pandoc for documents. A big thanks to them for maintaining such excellent libraries for so many years. \ No newline at end of file diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md new file mode 100644 index 0000000..c3537ba --- /dev/null +++ b/docs/GETTING_STARTED.md @@ -0,0 +1,38 @@ +## Getting Started + +This file covers how to get started with VERT. + +### Prerequisites +Make sure you have the following installed: +- [Bun](https://bun.sh/) + +### Installation +```sh +# Clone the repository +$ git clone https://github.com/VERT-sh/VERT +$ cd VERT/ + +# Install dependencies +$ bun i +``` + +### Running Locally + +To run the project locally, run `bun dev`. + +This will start a development server. Open your browser and navigate to `http://localhost:5173` to see the application. + +### Building for Production + +Before building for production, make sure you create a `.env` file in the root of the project with the following content: + +```sh +PUB_HOSTNAME=example.com # change to your domain, only gets used for Plausible (for now) +PUB_PLAUSIBLE_URL=https://plausible.example.com # can be empty if not using Plausible +PUB_ENV=production # "production", "development" or "nightly" +PUB_VERTD_URL=https://vertd.vert.sh # default vertd instance +``` + +To build the project for production, run `bun run build`. + +This will build the site to the `build` folder. You should then use a web server like [nginx](https://nginx.org) to serve the files inside that folder. \ No newline at end of file diff --git a/docs/VIDEO_CONVERSION.md b/docs/VIDEO_CONVERSION.md new file mode 100644 index 0000000..10f601f --- /dev/null +++ b/docs/VIDEO_CONVERSION.md @@ -0,0 +1,14 @@ +## Video conversion + +This file covers how video conversion works when using VERT. + +On VERT, video uploads to a server for processing by default. This is because video conversion is hard to do in a browser as it uses a lot of resources, and will end up running very slowly (if it even works at all). + +Our answer to this is [`vertd`](https://github.com/VERT-sh/vertd), which is a simple FFmpeg wrapper built in Rust. If you don't understand all that technical jargon, it basically allows you to convert videos using the full capacity of your computer, which results in much faster conversion. It runs on your computer (or a server somewhere, if you know what you're doing), and the VERT web interface reaches out to it in order to convert your videos. + +We host an official instance of [`vertd`](https://github.com/VERT-sh/vertd) so you do not have to host it yourself for convenience, but considering you're here, you probably want to host it for yourself. Essentially: + +- Download the latest release of `vertd` for your machine [here](https://github.com/VERT-sh/vertd/releases) +- Run the server +- Connect the VERT UI to your local `vertd` instance by entering its IP & port + - By default, `vertd` runs a HTTP server on port `24153`, so you would put `http://localhost:24153` in the "Instance URL" setting found in VERT's settings (assuming you are running it on your own PC) From 4f54d92494dddb62129cd27c18a04bce57190af6 Mon Sep 17 00:00:00 2001 From: azurejelly <178000437+azurejelly@users.noreply.github.com> Date: Fri, 25 Jul 2025 19:16:36 -0400 Subject: [PATCH 2/3] ci(docker): add missing environment variables --- .github/workflows/docker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 06a7901..425c138 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -56,3 +56,5 @@ jobs: PUB_HOSTNAME=${{ vars.PUB_HOSTNAME || '' }} PUB_PLAUSIBLE_URL=${{ vars.PUB_PLAUSIBLE_URL || '' }} PUB_VERTD_URL=https://vertd.vert.sh + PUB_DONATION_URL=https://donations.vert.sh + PUB_STRIPE_KEY=${{ vars.PUB_STRIPE_KEY || '' }} From c62633bd23a721110640d8d20c40a19c0593db37 Mon Sep 17 00:00:00 2001 From: azurejelly <178000437+azurejelly@users.noreply.github.com> Date: Fri, 25 Jul 2025 19:17:17 -0400 Subject: [PATCH 3/3] chore(docker): move nginx config to a separate folder Also kept the example SSL config from #82 in case it is useful to someone --- Dockerfile | 4 ++-- nginx/default-ssl.conf | 26 ++++++++++++++++++++++++++ nginx/default.conf | 15 +++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 nginx/default-ssl.conf create mode 100644 nginx/default.conf diff --git a/Dockerfile b/Dockerfile index 5ae62a4..e076900 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,6 +26,6 @@ RUN bun run build FROM nginx:stable-alpine -COPY ./nginx.conf /etc/nginx/conf.d/default.conf +COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf -COPY --from=builder /app/build /usr/share/nginx/html +COPY --from=builder /app/build /usr/share/nginx/html \ No newline at end of file diff --git a/nginx/default-ssl.conf b/nginx/default-ssl.conf new file mode 100644 index 0000000..ad3dad4 --- /dev/null +++ b/nginx/default-ssl.conf @@ -0,0 +1,26 @@ +server { + listen 80; + server_name vert; + + # Redirect all HTTP traffic to HTTPS + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl; + server_name vert; + + ssl_certificate /etc/ssl/vert/vert.crt; + ssl_certificate_key /etc/ssl/vert/vert.key; + + root /usr/share/nginx/html; + index index.html; + + client_max_body_size 10M; + + location / { + try_files $uri $uri/ /index.html; + } + + error_page 404 /index.html; +} \ No newline at end of file diff --git a/nginx/default.conf b/nginx/default.conf new file mode 100644 index 0000000..b8f487b --- /dev/null +++ b/nginx/default.conf @@ -0,0 +1,15 @@ +server { + listen 80; + server_name vert; + + root /usr/share/nginx/html; + index index.html; + + client_max_body_size 10M; + + location / { + try_files $uri $uri/ /index.html; + } + + error_page 404 /index.html; +} \ No newline at end of file