Skip to content

Commit

Permalink
chore: update files for docker (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuffin authored Oct 15, 2024
1 parent a4a04f3 commit fe5da09
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
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

0 comments on commit fe5da09

Please sign in to comment.