Skip to content

Commit e4814e0

Browse files
authored
Merge pull request #467 from stacklok/on-pub-rel
Change to image publish on release
2 parents 20867f2 + 06ed747 commit e4814e0

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

.github/workflows/image-publish.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Publish Docker Image
22
on:
3-
schedule:
4-
# Once weekly on Fridays at noon
5-
- cron: "00 12 * * 5"
3+
release:
4+
types:
5+
- published
66
workflow_dispatch:
77

88
jobs:
@@ -59,7 +59,7 @@ jobs:
5959
github_token: ${{ github.token }}
6060
workflow: ".github/workflows/import_packages.yml"
6161
workflow_conclusion: success
62-
name: sqlite_vectordb_file
62+
name: sqlite_data
6363
name_is_regexp: true
6464
skip_unpack: false
6565
if_no_artifact_found: ignore

.github/workflows/import_packages.yml

-1
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,3 @@ jobs:
7979
name: sqlite_vectordb_file
8080
path: /tmp/sqlite_data/vectordb.db
8181
retention-days: 90
82-

Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
6464
# Create a non-root user
6565
RUN useradd -m -u 1000 -r codegate
6666

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

7368
# Set permissions for user codegate to run nginx
7469
RUN chown -R codegate /var/lib/nginx && \

scripts/entrypoint.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22

33
# those are hardcoded on the image, will not change
4-
BACKUP_PATH="/tmp/weaviate_backup"
54
BACKUP_NAME="backup"
65
MODEL_BASE_PATH="/app/codegate_volume/models"
76
CODEGATE_DB_FILE="/app/codegate_volume/db/codegate.db"
7+
CODEGATE_VEC_DB_FILE="/app/sqlite_data/vectordb.db"
88
CODEGATE_CERTS="/app/codegate_volume/certs"
99

1010
# Function to restore backup if paths are provided
@@ -37,7 +37,7 @@ start_application() {
3737
# first restore the models
3838
mkdir -p /app/codegate_volume/models
3939
cp /app/default_models/* /app/codegate_volume/models
40-
CMD_ARGS="--port 8989 --host 0.0.0.0 --model-base-path $MODEL_BASE_PATH --db-path $CODEGATE_DB_FILE"
40+
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"
4141

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

0 commit comments

Comments
 (0)