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:
17
README.md
17
README.md
@ -2,7 +2,7 @@
|
||||
|
||||
[](https://github.com/omnivore-app/omnivore/actions/workflows/run-tests.yaml)
|
||||
[](https://discord.gg/h2z5rppzz9)
|
||||
[](https://pkm.social/@omnivore)
|
||||
[](https://pkm.social/@omnivore)
|
||||
[](https://twitter.com/OmnivoreApp)
|
||||

|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user