Skip to content

Commit

Permalink
Merge pull request #467 from stacklok/on-pub-rel
Browse files Browse the repository at this point in the history
Change to image publish on release
  • Loading branch information
lukehinds authored Dec 29, 2024
2 parents 20867f2 + 06ed747 commit e4814e0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
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

0 comments on commit e4814e0

Please sign in to comment.