forked from pgvector/pgvector
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,14 +23,17 @@ To deploy pgvector on Fly, start by installing the Fly CLI and setting up your F | |
|
||
1. Download and install the Fly CLI from the [Fly official website](https://fly.io/docs/getting-started/installing-flyctl/). | ||
2. Open your terminal and run `flyctl auth signup` to create a new Fly account or `flyctl auth login` to log into an existing account. | ||
3. Once logged in, create a new Fly Postgres app by running `fly pg`. This command sets up a new Postgres instance on Fly. Note at this stage this is still the base Fly Postgres image instead the one with pgvector. | ||
4. After setting up your Fly Postgres app, copy the output connection string provided. Store this string securely as you will need it to connect to your database. Consider using a password manager or another secure method to keep this information safe. | ||
5. Configure your app by modifying the `fly.toml` file, which was generated during the app creation process, to suit your deployment needs. This file includes settings for regions, resources, and more. | ||
6. To authenticate your Fly CLI with the Fly platform, you need an API token. You can obtain this token by navigating to your Fly dashboard. Go to the 'Account Settings' and click on 'Access Tokens'. Create a new token if you don't have one already, and copy it. | ||
7. To set this token as an environment variable in GitHub Actions, navigate to your repository on GitHub. Go to 'Settings' > 'Secrets' > 'Actions'. Click on 'New repository secret'. Name the secret `FLY_API_TOKEN` and paste your copied token into the value field. This will securely store your token and make it available in your GitHub Actions workflows. | ||
3. Once logged in, fork this repository and clone it to your local machine. Use the command `git clone [email protected]:scefali/fly-pgvector.git` followed by `cd fly-pgvector` to navigate into the project directory. | ||
4. Create a new Fly Postgres app by running `fly pg`. This command sets up a new Postgres instance on Fly. Note at this stage this is still the base Fly Postgres image instead of the one with pgvector. | ||
5. After setting up your Fly Postgres app, copy the output connection string provided. Store this string securely as you will need it to connect to your database. Consider using a password manager or another secure method to keep this information safe. | ||
6. Enable GitHub Actions for your repository if not already enabled. Go to your repository on GitHub, click on 'Actions', then select 'set up a workflow yourself' if you haven't done so already. This will allow you to create a new workflow file directly or commit an existing one. | ||
7. To authenticate your Fly CLI with the Fly platform, you need an API token. You can obtain this token by navigating to your Fly dashboard. Go to the 'Account Settings' and click on 'Access Tokens'. Create a new token if you don't have one already, and copy it. | ||
8. To set the API token as an environment variable in GitHub Actions, navigate to your repository on GitHub. Go to 'Settings' > 'Secrets' > 'Actions'. Click on 'New repository secret'. Name the secret `FLY_API_TOKEN` and paste your copied token into the value field. This will securely store your token and make it available in your GitHub Actions workflows. | ||
9. Configure your app by modifying the `fly.toml` file, which was generated during the app creation process, to suit your deployment needs. This file includes settings for regions, resources, and more. | ||
10. Commit your code to master, push to GitHub, and the GitHub Action for deploying a new Fly version should run. | ||
|
||
### Making the Database accessible to outside world (optional) | ||
|
||
### Making the Database accessible to outside world (optional) | ||
To make your database accessible from external tools like Postico, you need to generate a dedicated IPv4 address for your application. Here’s how to do it: | ||
|
||
1. Allocate an IPv6 address for your application by running `flyctl ips allocate-v4` in your terminal. This command will generate a new dedicated IPv4 address for your Fly application that will cost $2/mo. | ||
|