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
1 change: 1 addition & 0 deletions .github/workflows/release-examples-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- examples/waspello
- examples/waspleau
- examples/websockets-realtime-voting
- examples/ask-the-documents

name: Deploy ${{ matrix.app-dir }}

Expand Down
48 changes: 24 additions & 24 deletions examples/ask-the-documents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Ask The Documents Cover](./github.png)

Live at https://ask-the-documents-client.fly.dev/

## What does it do?

This is an example Wasp app that supports:
Expand All @@ -14,36 +16,34 @@ This is an example Wasp app that supports:

## Running it locally

First, makes sure you have Wasp installed.

```bash
curl -sSL https://get.wasp-lang.dev/installer.sh | sh
```
1. Make sure you have the latest version of Wasp installed.

Then, close this repo, position yourself in `custom-db` and start the database with:
```bash
curl -sSL https://get.wasp.sh/installer.sh | sh
```

```bash
cd custom-db
./run_db.sh
```
2. Start the database with:

Follow the instructions in the script.
```bash
wasp start db --db-image pgvector/pgvector:pg17
```

Fill the env variables in `.env.server`:
3. Copy `.env.server.example` to `.env.server` and fill out the environment variables.

```
OPENAI_API_KEY=<your_key>
DATABASE_URL=postgresql://postgres:devpass@localhost:5432/postgres
```
```bash
OPENAI_API_KEY="<your_openai_key>"
GOOGLE_CLIENT_ID="<your_google_client_id>"
GOOGLE_CLIENT_SECRET="<your_google_client_secret>"
```

Migrate the database with:
4. Migrate the database with:

```bash
wasp db migrate-dev
```
```bash
wasp db migrate-dev
```

Then, start the server with:
5. Start the server with:

```bash
wasp start
```
```bash
wasp start
```
3 changes: 0 additions & 3 deletions examples/ask-the-documents/custom-db/Dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion examples/ask-the-documents/custom-db/extensions.sql

This file was deleted.

6 changes: 0 additions & 6 deletions examples/ask-the-documents/custom-db/run_db.sh

This file was deleted.

25 changes: 0 additions & 25 deletions examples/ask-the-documents/deploy.sh

This file was deleted.

6 changes: 0 additions & 6 deletions examples/ask-the-documents/env.server.example

This file was deleted.

22 changes: 22 additions & 0 deletions examples/ask-the-documents/fly-client.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# fly.toml app configuration file generated for ask-the-documents-client on 2025-10-10T17:03:02+02:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'ask-the-documents-client'
primary_region = 'cdg'

[build]

[http_service]
internal_port = 8043
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 0
processes = ['app']

[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1
16 changes: 16 additions & 0 deletions examples/ask-the-documents/fly-db.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:1
# check=skip=FromPlatformFlagConstDisallowed (Fly.io only has amd64 machines)

# This image is published as ghcr.io/wasp-lang/ask-the-documents-fly-db
# Please update the public image if you change this file.

FROM --platform=linux/amd64 flyio/postgres-flex:17

RUN <<EOF
apt-get update -y
apt-get install -y postgresql-$PG_MAJOR_VERSION-pgvector
apt-get clean -y
EOF

# Tell GitHub to link the image to the repo
LABEL org.opencontainers.image.source=https://github.com/wasp-lang/wasp
22 changes: 22 additions & 0 deletions examples/ask-the-documents/fly-server.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# fly.toml app configuration file generated for ask-the-documents-server on 2025-10-10T17:02:51+02:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'ask-the-documents-server'
primary_region = 'cdg'

[build]

[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 1
processes = ['app']

[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1