Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
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
8 changes: 4 additions & 4 deletions .github/workflows/image-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Publish Docker Image
on:
schedule:
# Once weekly on Fridays at noon
- cron: "00 12 * * 5"
release:
types:
- published
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
github_token: ${{ github.token }}
workflow: ".github/workflows/import_packages.yml"
workflow_conclusion: success
name: sqlite_vectordb_file
name: sqlite_data
name_is_regexp: true
skip_unpack: false
if_no_artifact_found: ignore
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/import_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,3 @@ jobs:
name: sqlite_vectordb_file
path: /tmp/sqlite_data/vectordb.db
retention-days: 90

5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Create a non-root user
RUN useradd -m -u 1000 -r codegate

# Copy backup if needed
RUN mkdir -p /tmp/weaviate_backup
# will not fail if the file does not exist
COPY weaviate_backu[p] /tmp/weaviate_backup
RUN chown -R codegate /tmp/weaviate_backup

# Set permissions for user codegate to run nginx
RUN chown -R codegate /var/lib/nginx && \
Expand Down
4 changes: 2 additions & 2 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash

# those are hardcoded on the image, will not change
BACKUP_PATH="/tmp/weaviate_backup"
BACKUP_NAME="backup"
MODEL_BASE_PATH="/app/codegate_volume/models"
CODEGATE_DB_FILE="/app/codegate_volume/db/codegate.db"
CODEGATE_VEC_DB_FILE="/app/sqlite_data/vectordb.db"
CODEGATE_CERTS="/app/codegate_volume/certs"

# Function to restore backup if paths are provided
Expand Down Expand Up @@ -37,7 +37,7 @@ start_application() {
# first restore the models
mkdir -p /app/codegate_volume/models
cp /app/default_models/* /app/codegate_volume/models
CMD_ARGS="--port 8989 --host 0.0.0.0 --model-base-path $MODEL_BASE_PATH --db-path $CODEGATE_DB_FILE"
CMD_ARGS="--port 8989 --host 0.0.0.0 --model-base-path $MODEL_BASE_PATH --db-path $CODEGATE_DB_FILE --vec-db-path $CODEGATE_VEC_DB_FILE"

# Check and append additional URLs if they are set
[ -n "$CODEGATE_OPENAI_URL" ] && CMD_ARGS+=" --openai-url $CODEGATE_OPENAI_URL"
Expand Down