Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update files for docker #11

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
SERVER_NAME = LLM Search Server
HOST = 0.0.0.0
PORT = 58000
DATABASE_URL = postgresql+psycopg2://postgres:postgres@localhost:35432/llmsearch
PUBLIC_PATH = public
UPLOADS_PATH = data/uploads
# SQLALCHEMY_ENGINE_POOL_SIZE = 10 # Pool size (number of connections to keep in the pool)
# SQLALCHEMY_ENGINE_MAX_OVERFLOW = 5 # Allow up to 5 additional connections beyond pool_size
# SQLALCHEMY_ENGINE_POOL_TIMEOUT = 30 # Wait 30 seconds for a connection before giving up
# SQLALCHEMY_ENGINE_POOL_RECYCLE = 1800 # Recycle connections after 30 minutes (1800 seconds)
# SQLALCHEMY_ENGINE_POOL_PRE_PING = True # Enable pre-ping to ensure connections are valid
LOG_LEVEL = INFO
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ FROM llmsearch-base:latest
WORKDIR /app

COPY docker/gunicorn.conf.py ./
COPY .env.production ./.env
COPY llmsearch/ .
COPY public/ ./public

# Expose the port the app runs on (change if necessary)
EXPOSE 58000
Expand Down
8 changes: 7 additions & 1 deletion docker/gunicorn.conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# gunicorn.conf.py

from env import getenv


_host = getenv("HOST", "0.0.0.0")
_port = getenv("PORT", 58000)

# Server Socket
bind = "0.0.0.0:58000" # Address and port to bind to
bind = f"{_host}:{_port}"

# Worker Processes
workers = 4 # Number of worker processes
Expand Down
Loading