From 630ccb7c3c6fb22c40ee5881ed802e4e42e12182 Mon Sep 17 00:00:00 2001 From: David Claeys Date: Fri, 30 Oct 2026 12:09:43 +0100 Subject: [PATCH] update readme --- README.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a7be737..505043f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,69 @@ # JetKVM Cloud -  + This repository provides prebuilt Docker images for the [JetKVM Cloud API](https://github.com/jetkvm/cloud-api).   -These images make it easy to self-host JetKVM Cloud without having to build the Docker image yourself. \ No newline at end of file +These images make it easy to self-host JetKVM Cloud without having to build the Docker image yourself. + +### Usage + +For information about how to use the image please see the [original documentation](https://github.com/jetkvm/cloud-api/blob/dev/compose.yaml). + +```yml +name: jetkvm-cloud-api + +networks: + jetkvm: + driver: bridge + +services: + db: + image: postgres + restart: unless-stopped + environment: + POSTGRES_PASSWORD: jetkvm + POSTGRES_USER: jetkvm + POSTGRES_DB: jetkvm + healthcheck: + test: ["CMD-SHELL", "pg_isready -U jetkvm -d jetkvm"] + interval: 5s + timeout: 5s + retries: 10 + start_period: 5s + ports: + - "5432:5432" + networks: + - jetkvm + volumes: + - ./postgresql:/var/lib/postgresql + + # Run database migrations before starting the apps + app-migrate: + image: 'git.claeyscloud.com/david/jetkvm-cloud:latest' + environment: + DATABASE_URL: postgres://jetkvm:jetkvm@db:5432/jetkvm + depends_on: + db: + condition: service_healthy + command: ["sh", "-c", "npx prisma migrate deploy"] + networks: + - jetkvm + restart: no + + app: + image: postgres + restart: unless-stopped + env_file: + environment: + PORT: 3000 + DATABASE_URL: postgres://jetkvm:jetkvm@db:5432/jetkvm + CORS_ORIGINS: https://jetkvm.example.com + depends_on: + db: + condition: service_healthy + app-migrate: + condition: service_completed_successfully + ports: + - "3000:3000" + networks: + - jetkvm +``` \ No newline at end of file