Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/

name: Demo
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
concurrency: deploy-group # optional: ensure only one action runs at a time
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
9 changes: 0 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,3 @@ jobs:
make_latest: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy:
name: Deploy demo app
needs: docker
runs-on: ubuntu-latest
steps:
- name: Deploy to Coolify
run: |
curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}'
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ COPY ./server/Cargo.toml ./server/Cargo.lock ./
ARG pkg=chat-rs-api

RUN apt-get update -qq && apt-get install -y -qq pkg-config libpq-dev && apt-get clean
RUN --mount=type=cache,id=s/6916a5c5-fde9-46e7-934c-cf425dd70d0e-rust_target,target=/app/target \
--mount=type=cache,id=s/6916a5c5-fde9-46e7-934c-cf425dd70d0e-cargo_registry,target=/usr/local/cargo/registry \
--mount=type=cache,id=s/6916a5c5-fde9-46e7-934c-cf425dd70d0e-cargo_git,target=/usr/local/cargo/git \
RUN --mount=type=cache,id=rust_target,target=/app/target \
--mount=type=cache,id=cargo_registry,target=/usr/local/cargo/registry \
--mount=type=cache,id=cargo_git,target=/usr/local/cargo/git \
set -eux; \
cargo build --release; \
objcopy --compress-debug-sections target/release/$pkg ./run-server
Expand All @@ -29,7 +29,7 @@ ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"

COPY ./web/package.json ./web/pnpm-lock.yaml ./
RUN --mount=type=cache,id=s/6916a5c5-fde9-46e7-934c-cf425dd70d0e-pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile

COPY ./web/src src
COPY ./web/public public
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A fast, secure, self-hostable chat application built with Rust, TypeScript, and React. Chat with multiple AI providers using your own API keys, with real-time streaming built-in.

Demo link: https://rs-chat-demo.up.railway.app/ (⚠️ This is a demo - don't expect your account/chats to be there when you come back. It may intermittently delete all data. Please also don't enter any sensitive information or confidential data)
Demo link: https://rs-chat.fly.dev/ (⚠️ This is a demo - don't expect your account/chats to be there when you come back. It may intermittently delete all data. Please also don't enter any sensitive information or confidential data)

## ✨ Features

Expand Down
40 changes: 40 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
app = "rs-chat"
primary_region = "ewr"

[build]

[env]
RUST_LOG = "info"
RS_CHAT_SERVER_ADDRESS = "https://rs-chat.fly.dev"
DOCKER_CERT_PATH = "/certs"
DOCKER_TLS_VERIFY = "1"

[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = "stop"
auto_start_machines = true
min_machines_running = 0
processes = ["app"]

[[vm]]
memory = "1gb"
cpu_kind = "shared"
cpus = 2

[mounts]
source = "data"
destination = "/data"
initial_size = "2gb"

[[files]]
guest_path = "/certs/ca.pem"
secret_name = "DOCKER_CA_CERT"

[[files]]
guest_path = "/certs/cert.pem"
secret_name = "DOCKER_CLIENT_CERT"

[[files]]
guest_path = "/certs/key.pem"
secret_name = "DOCKER_CLIENT_KEY"
Loading