mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-02 18:49:09 +00:00
commit
2098d5108c
3 changed files with 69 additions and 0 deletions
|
@ -128,6 +128,9 @@ After Saving you should be able to use extension now.
|
||||||
| Saved Chats | All your saved chats.|
|
| Saved Chats | All your saved chats.|
|
||||||
| Settings | If you want to update your Open API key.|
|
| Settings | If you want to update your Open API key.|
|
||||||
|
|
||||||
|
### Docker Support
|
||||||
|
Afer setting SurfSense-Frontend/.env and backend/.env run `docker-compose build --no-cache`. After building image run `docker-compose up -d`
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
#### Playground
|
#### Playground
|
||||||
|
|
19
backend/Dockerfile
Normal file
19
backend/Dockerfile
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Use official Python image
|
||||||
|
FROM python:3.10-slim
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy backend source code
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN apt-get update && apt-get install -y gcc libpq-dev
|
||||||
|
RUN pip install --upgrade pip
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
|
# Expose backend port
|
||||||
|
EXPOSE 8000
|
||||||
|
|
||||||
|
# Run FastAPI using uvicorn
|
||||||
|
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8000"]
|
47
docker-compose.yml
Normal file
47
docker-compose.yml
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
# PostgreSQL Database
|
||||||
|
db:
|
||||||
|
image: postgres:13
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: your_postgres_user
|
||||||
|
POSTGRES_PASSWORD: your_postgres_password
|
||||||
|
POSTGRES_DB: surfsense_db
|
||||||
|
volumes:
|
||||||
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
- surfsense-network
|
||||||
|
|
||||||
|
# Backend Service (FastAPI)
|
||||||
|
backend:
|
||||||
|
build:
|
||||||
|
context: ./backend
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
env_file:
|
||||||
|
- ./backend/.env
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
networks:
|
||||||
|
- surfsense-network
|
||||||
|
|
||||||
|
# Frontend Service (Next.js)
|
||||||
|
frontend:
|
||||||
|
build:
|
||||||
|
context: ./SurfSense-Frontend
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
env_file:
|
||||||
|
- ./SurfSense-Frontend/.env
|
||||||
|
networks:
|
||||||
|
- surfsense-network
|
||||||
|
|
||||||
|
# Volumes for persistent storage
|
||||||
|
volumes:
|
||||||
|
postgres_data:
|
||||||
|
|
||||||
|
# Docker network
|
||||||
|
networks:
|
||||||
|
surfsense-network:
|
||||||
|
driver: bridge
|
Loading…
Add table
Reference in a new issue