mirror of
				https://github.com/ItzCrazyKns/Perplexica.git
				synced 2025-11-03 20:28:14 +00:00 
			
		
		
		
	feat(docker-compose): implement data volume
This commit is contained in:
		
							
								
								
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -6,6 +6,7 @@ yarn-error.log
 | 
				
			|||||||
# Build output
 | 
					# Build output
 | 
				
			||||||
/.next/
 | 
					/.next/
 | 
				
			||||||
/out/
 | 
					/out/
 | 
				
			||||||
 | 
					/dist/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# IDE/Editor specific
 | 
					# IDE/Editor specific
 | 
				
			||||||
.vscode/
 | 
					.vscode/
 | 
				
			||||||
@@ -31,4 +32,7 @@ logs/
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Miscellaneous
 | 
					# Miscellaneous
 | 
				
			||||||
.DS_Store
 | 
					.DS_Store
 | 
				
			||||||
Thumbs.db
 | 
					Thumbs.db
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Db
 | 
				
			||||||
 | 
					db.sqlite
 | 
				
			||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
FROM node:buster-slim
 | 
					FROM nikolaik/python-nodejs:python3.12-nodejs20-bullseye
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ARG SEARXNG_API_URL
 | 
					ARG SEARXNG_API_URL
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -7,11 +7,14 @@ WORKDIR /home/perplexica
 | 
				
			|||||||
COPY src /home/perplexica/src
 | 
					COPY src /home/perplexica/src
 | 
				
			||||||
COPY tsconfig.json /home/perplexica/
 | 
					COPY tsconfig.json /home/perplexica/
 | 
				
			||||||
COPY config.toml /home/perplexica/
 | 
					COPY config.toml /home/perplexica/
 | 
				
			||||||
 | 
					COPY drizzle.config.ts /home/perplexica/
 | 
				
			||||||
COPY package.json /home/perplexica/
 | 
					COPY package.json /home/perplexica/
 | 
				
			||||||
COPY yarn.lock /home/perplexica/
 | 
					COPY yarn.lock /home/perplexica/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN sed -i "s|SEARXNG = \".*\"|SEARXNG = \"${SEARXNG_API_URL}\"|g" /home/perplexica/config.toml
 | 
					RUN sed -i "s|SEARXNG = \".*\"|SEARXNG = \"${SEARXNG_API_URL}\"|g" /home/perplexica/config.toml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN mkdir /home/perplexica/data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN yarn install
 | 
					RUN yarn install
 | 
				
			||||||
RUN yarn build
 | 
					RUN yarn build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								data/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								data/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					*
 | 
				
			||||||
 | 
					!.gitignore
 | 
				
			||||||
@@ -19,8 +19,10 @@ services:
 | 
				
			|||||||
      - searxng
 | 
					      - searxng
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
      - 3001:3001
 | 
					      - 3001:3001
 | 
				
			||||||
 | 
					    volumes:
 | 
				
			||||||
 | 
					      - backend-dbstore:/home/perplexica/data
 | 
				
			||||||
    extra_hosts:
 | 
					    extra_hosts:
 | 
				
			||||||
      - "host.docker.internal:host-gateway"
 | 
					      - 'host.docker.internal:host-gateway'
 | 
				
			||||||
    networks:
 | 
					    networks:
 | 
				
			||||||
      - perplexica-network
 | 
					      - perplexica-network
 | 
				
			||||||
    restart: unless-stopped
 | 
					    restart: unless-stopped
 | 
				
			||||||
@@ -42,3 +44,6 @@ services:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
networks:
 | 
					networks:
 | 
				
			||||||
  perplexica-network:
 | 
					  perplexica-network:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					volumes:
 | 
				
			||||||
 | 
					  backend-dbstore:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user