Improve developer environment onboarding

I encountered a number of issues while trying to get my own local dev
environment set up. This change adds missing information to the readme, updates
the Postgres image to one that includes required module dependencies, and
removes next.js rewrite rules (IS THIS SAFE?) which were no longer used and
causing issues.
This commit is contained in:
Lily Mara
2023-10-27 08:44:26 -07:00
parent 7e0051b432
commit f8a6fc9e0d
3 changed files with 15 additions and 26 deletions

View File

@ -2,7 +2,7 @@
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/omnivore-app/omnivore/Run%20tests)](https://github.com/omnivore-app/omnivore/actions/workflows/run-tests.yaml)
[![Discord](https://img.shields.io/discord/844965259462311966?label=Join%20our%20Discord)](https://discord.gg/h2z5rppzz9)
[![Mastodon Follow](https://img.shields.io/mastodon/follow/109458738600914558?domain=https%3A%2F%2Fpkm.social)](https://pkm.social/@omnivore)
[![Mastodon Follow](https://img.shields.io/mastodon/follow/109458738600914558?domain=https%3A%2F%2Fpkm.social)](https://pkm.social/@omnivore)
[![Twitter Follow](https://img.shields.io/twitter/follow/omnivoreapp)](https://twitter.com/OmnivoreApp)
![GitHub](https://img.shields.io/github/license/omnivore-app/omnivore)
@ -34,7 +34,6 @@ We also have a free hosted version of Omnivore at [omnivore.app](https://omnivor
<img width="981" alt="web-screenshot-listview" src="https://github.com/omnivore-app/omnivore/assets/75189/df7c797a-4255-42f4-a686-ad94866cb580">
## Join us on Discord! :speech_balloon:
We're building our community on Discord. [Join us!](https://discord.gg/h2z5rppzz9)
@ -100,10 +99,22 @@ with docker compose and the frontend locally:
```bash
docker compose up api content-fetch
cd packages/web
cp .env.template .env
cp .env.template .env.local
yarn dev
```
You will need to configure some values in the new `.env.local` file. These are
the values for running the `web` service directly on your host machine and
running `api` and `content-fetch` within docker:
```sh
NEXT_PUBLIC_BASE_URL=http://localhost:3000
NEXT_PUBLIC_HIGHLIGHTS_BASE_URL=http://localhost:3000
NEXT_PUBLIC_LOCAL_BASE_URL=http://localhost:3000
NEXT_PUBLIC_SERVER_BASE_URL=http://localhost:4000
NEXT_PUBLIC_LOCAL_SERVER_BASE_URL=http://localhost:4000
```
### Running the puppeteer-parse service outside of Docker
To save pages you need to run the `puppeteer-parse` service.

View File

@ -1,7 +1,7 @@
version: '3'
services:
postgres:
image: "postgres:12.8"
image: "ankane/pgvector:v0.5.1"
container_name: "omnivore-postgres"
environment:
- POSTGRES_USER=postgres

View File

@ -24,28 +24,6 @@ const moduleExports = {
'proxy.omnivore-image-cache.app',
],
},
rewrites: () => [
{
source: '/api/graphql',
destination: `https://api-${process.env.NEXT_PUBLIC_APP_ENV}.omnivore.app/api/graphql`,
},
{
source: '/api/auth/:path*',
destination: `https://api-${process.env.NEXT_PUBLIC_APP_ENV}.omnivore.app/api/auth/:path*`,
},
{
source: '/api/article/save',
destination: `https://api-${process.env.NEXT_PUBLIC_APP_ENV}.omnivore.app/api/article/save`,
},
{
source: '/api/mobile-auth/:path*',
destination: `https://api-${process.env.NEXT_PUBLIC_APP_ENV}.omnivore.app/api/mobile-auth/:path*`,
},
{
source: '/collect/:match*',
destination: 'https://app.posthog.com/:match*',
},
],
async headers() {
return [
{