fix(docker): fix Docker compose to use .env files
This commit is contained in:
parent
f7b13f3456
commit
6cec5b5795
4 changed files with 26 additions and 11 deletions
3
.env.example
Normal file
3
.env.example
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
NEXT_PUBLIC_WS_URL=ws://localhost:3001
|
||||||
|
NEXT_PUBLIC_API_URL=http://localhost:3001/api
|
||||||
|
SEARXNG_API_URL=http://searxng:8080
|
16
README.md
16
README.md
|
@ -77,13 +77,25 @@ There are mainly 2 ways of installing Perplexica - With Docker, Without Docker.
|
||||||
|
|
||||||
- `SIMILARITY_MEASURE`: The similarity measure to use (This is filled by default; you can leave it as is if you are unsure about it.)
|
- `SIMILARITY_MEASURE`: The similarity measure to use (This is filled by default; you can leave it as is if you are unsure about it.)
|
||||||
|
|
||||||
5. Ensure you are in the directory containing the `docker-compose.yaml` file and execute:
|
5. Rename the `.env.example` file to `.env` and fill in all necessary fields.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mv .env.example .env
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Rename the `./ui/.env.example` file to `./ui/.env` and fill in all necessary fields.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mv ./ui/.env.example ./ui/.env
|
||||||
|
```
|
||||||
|
|
||||||
|
7. Ensure you are in the directory containing the `docker-compose.yaml` file and execute:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Wait a few minutes for the setup to complete. You can access Perplexica at http://localhost:3000 in your web browser.
|
8. Wait a few minutes for the setup to complete. You can access Perplexica at http://localhost:3000 in your web browser.
|
||||||
|
|
||||||
**Note**: After the containers are built, you can start Perplexica directly from Docker without having to open a terminal.
|
**Note**: After the containers are built, you can start Perplexica directly from Docker without having to open a terminal.
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,6 @@ services:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: backend.dockerfile
|
dockerfile: backend.dockerfile
|
||||||
image: itzcrazykns1337/perplexica-backend:main
|
image: itzcrazykns1337/perplexica-backend:main
|
||||||
environment:
|
|
||||||
- SEARXNG_API_URL=http://searxng:8080
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- searxng
|
- searxng
|
||||||
ports:
|
ports:
|
||||||
|
@ -27,15 +25,14 @@ services:
|
||||||
- 'host.docker.internal:host-gateway'
|
- 'host.docker.internal:host-gateway'
|
||||||
networks:
|
networks:
|
||||||
- perplexica-network
|
- perplexica-network
|
||||||
|
env_file:
|
||||||
|
- ./.env
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
perplexica-frontend:
|
perplexica-frontend:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: app.dockerfile
|
dockerfile: app.dockerfile
|
||||||
args:
|
|
||||||
- NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api
|
|
||||||
- NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001
|
|
||||||
image: itzcrazykns1337/perplexica-frontend:main
|
image: itzcrazykns1337/perplexica-frontend:main
|
||||||
depends_on:
|
depends_on:
|
||||||
- perplexica-backend
|
- perplexica-backend
|
||||||
|
@ -43,6 +40,8 @@ services:
|
||||||
- 3000:3000
|
- 3000:3000
|
||||||
networks:
|
networks:
|
||||||
- perplexica-network
|
- perplexica-network
|
||||||
|
env_file:
|
||||||
|
- ./.env
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
NEXT_PUBLIC_WS_URL=ws://localhost:3001
|
NEXT_PUBLIC_WS_URL=ws://localhost:3001
|
||||||
NEXT_PUBLIC_API_URL=http://localhost:3001/api
|
NEXT_PUBLIC_API_URL=http://localhost:3001/api
|
||||||
|
SEARXNG_API_URL=http://searxng:8080
|
Loading…
Add table
Add a link
Reference in a new issue