mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2024-10-03 23:17:08 +03:00
Compare commits
5 Commits
3040081199
...
8cfa0194aa
Author | SHA1 | Date | |
---|---|---|---|
|
8cfa0194aa | ||
|
1680a1786e | ||
|
66f1e19ce8 | ||
|
521df60f86 | ||
|
77de9b776a |
48
.github/workflows/docker-build.yaml
vendored
48
.github/workflows/docker-build.yaml
vendored
@ -1,4 +1,4 @@
|
||||
name: Build & Push Docker Image
|
||||
name: Build & Push Docker Images
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -10,13 +10,17 @@ on:
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
service: [backend, app]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
install: true
|
||||
|
||||
- name: Log in to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
@ -29,18 +33,38 @@ jobs:
|
||||
id: version
|
||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build and push Docker image
|
||||
- name: Build and push Docker image for ${{ matrix.service }}
|
||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||
run: |
|
||||
docker build -f backend.dockerfile -t itzcrazykns1337/perplexica-backend:main .
|
||||
docker build -f app.dockerfile -t itzcrazykns1337/perplexica-frontend:main .
|
||||
docker push itzcrazykns1337/perplexica-backend:main
|
||||
docker push itzcrazykns1337/perplexica-frontend:main
|
||||
docker buildx create --use
|
||||
if [[ "${{ matrix.service }}" == "backend" ]]; then \
|
||||
DOCKERFILE=backend.dockerfile; \
|
||||
IMAGE_NAME=perplexica-backend; \
|
||||
else \
|
||||
DOCKERFILE=app.dockerfile; \
|
||||
IMAGE_NAME=perplexica-frontend; \
|
||||
fi
|
||||
docker buildx build --platform linux/amd64,linux/arm64 \
|
||||
--cache-from=type=registry,ref=itzcrazykns1337/${IMAGE_NAME}:main \
|
||||
--cache-to=type=inline \
|
||||
-f $DOCKERFILE \
|
||||
-t itzcrazykns1337/${IMAGE_NAME}:main \
|
||||
--push .
|
||||
|
||||
- name: Build and push release Docker image
|
||||
- name: Build and push release Docker image for ${{ matrix.service }}
|
||||
if: github.event_name == 'release'
|
||||
run: |
|
||||
docker build -f backend.dockerfile -t itzcrazykns1337/perplexica-backend:${{ env.RELEASE_VERSION }} .
|
||||
docker build -f app.dockerfile -t itzcrazykns1337/perplexica-frontend:${{ env.RELEASE_VERSION }} .
|
||||
docker push itzcrazykns1337/perplexica-backend:${{ env.RELEASE_VERSION }}
|
||||
docker push itzcrazykns1337/perplexica-frontend:${{ env.RELEASE_VERSION }}
|
||||
docker buildx create --use
|
||||
if [[ "${{ matrix.service }}" == "backend" ]]; then \
|
||||
DOCKERFILE=backend.dockerfile; \
|
||||
IMAGE_NAME=perplexica-backend; \
|
||||
else \
|
||||
DOCKERFILE=app.dockerfile; \
|
||||
IMAGE_NAME=perplexica-frontend; \
|
||||
fi
|
||||
docker buildx build --platform linux/amd64,linux/arm64 \
|
||||
--cache-from=type=registry,ref=itzcrazykns1337/${IMAGE_NAME}:${{ env.RELEASE_VERSION }} \
|
||||
--cache-to=type=inline \
|
||||
-f $DOCKERFILE \
|
||||
-t itzcrazykns1337/${IMAGE_NAME}:${{ env.RELEASE_VERSION }} \
|
||||
--push .
|
||||
|
@ -9,7 +9,7 @@ WORKDIR /home/perplexica
|
||||
|
||||
COPY ui /home/perplexica/
|
||||
|
||||
RUN yarn install
|
||||
RUN yarn install --frozen-lockfile
|
||||
RUN yarn build
|
||||
|
||||
CMD ["yarn", "start"]
|
@ -10,7 +10,7 @@ COPY yarn.lock /home/perplexica/
|
||||
|
||||
RUN mkdir /home/perplexica/data
|
||||
|
||||
RUN yarn install
|
||||
RUN yarn install --frozen-lockfile
|
||||
RUN yarn build
|
||||
|
||||
CMD ["yarn", "start"]
|
12
config.toml
Normal file
12
config.toml
Normal file
@ -0,0 +1,12 @@
|
||||
[GENERAL]
|
||||
PORT = 3001 # Port to run the server on
|
||||
SIMILARITY_MEASURE = "cosine" # "cosine" or "dot"
|
||||
|
||||
[API_KEYS]
|
||||
OPENAI = "" # OpenAI API key - sk-1234567890abcdef1234567890abcdef
|
||||
GROQ = "" # Groq API key - gsk_1234567890abcdef1234567890abcdef
|
||||
ANTHROPIC = "" # Anthropic API key - sk-ant-1234567890abcdef1234567890abcdef
|
||||
|
||||
[API_ENDPOINTS]
|
||||
SEARXNG = "http://SearxNG:8080" # SearxNG API URL
|
||||
OLLAMA = "http://host.docker.internal:11434"
|
@ -40,7 +40,7 @@ services:
|
||||
depends_on:
|
||||
- perplexica-backend
|
||||
ports:
|
||||
- 3000:3000
|
||||
- 3010:3000
|
||||
networks:
|
||||
- perplexica-network
|
||||
restart: unless-stopped
|
||||
|
@ -8,5 +8,5 @@ GROQ = "" # Groq API key - gsk_1234567890abcdef1234567890abcdef
|
||||
ANTHROPIC = "" # Anthropic API key - sk-ant-1234567890abcdef1234567890abcdef
|
||||
|
||||
[API_ENDPOINTS]
|
||||
SEARXNG = "http://localhost:32768" # SearxNG API URL
|
||||
SEARXNG = "http://SearxNG:8080" # SearxNG API URL
|
||||
OLLAMA = "" # Ollama API URL - http://host.docker.internal:11434
|
Loading…
Reference in New Issue
Block a user