Skip to content

Commit

Permalink
feat(docker-compose): implement data volume
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzCrazyKns committed Jun 29, 2024
1 parent c51ec8f commit 799f4d6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ yarn-error.log
# Build output
/.next/
/out/
/dist/

# IDE/Editor specific
.vscode/
Expand All @@ -31,4 +32,7 @@ logs/

# Miscellaneous
.DS_Store
Thumbs.db
Thumbs.db

# Db
db.sqlite
5 changes: 4 additions & 1 deletion backend.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:buster-slim
FROM nikolaik/python-nodejs:python3.12-nodejs20-bullseye

ARG SEARXNG_API_URL

Expand All @@ -7,11 +7,14 @@ WORKDIR /home/perplexica
COPY src /home/perplexica/src
COPY tsconfig.json /home/perplexica/
COPY config.toml /home/perplexica/
COPY drizzle.config.ts /home/perplexica/
COPY package.json /home/perplexica/
COPY yarn.lock /home/perplexica/

RUN sed -i "s|SEARXNG = \".*\"|SEARXNG = \"${SEARXNG_API_URL}\"|g" /home/perplexica/config.toml

RUN mkdir /home/perplexica/data

RUN yarn install
RUN yarn build

Expand Down
2 changes: 2 additions & 0 deletions data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
7 changes: 6 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ services:
- searxng
ports:
- 3001:3001
volumes:
- backend-dbstore:/home/perplexica/data
extra_hosts:
- "host.docker.internal:host-gateway"
- 'host.docker.internal:host-gateway'
networks:
- perplexica-network
restart: unless-stopped
Expand All @@ -42,3 +44,6 @@ services:

networks:
perplexica-network:

volumes:
backend-dbstore:

0 comments on commit 799f4d6

Please sign in to comment.