deploy: remove init service and drop unused workspace volume bindings
This commit is contained in:
parent
b38e3199b6
commit
c176f3bbcf
15
.github/workflows/build-service-images.yml
vendored
15
.github/workflows/build-service-images.yml
vendored
@ -160,18 +160,3 @@ jobs:
|
||||
run: |
|
||||
IMG=${{ env.REGISTRY }}/${{ env.ORG }}/${{ matrix.service.name }}@${{ steps.build.outputs.digest }}
|
||||
cosign sign --yes "$IMG"
|
||||
|
||||
# -------------------------------------------------------------
|
||||
# Make GHCR Image Public
|
||||
# -------------------------------------------------------------
|
||||
- name: Make Image Public
|
||||
if: env.PUSH_IMAGES == 'true' || env.PUSH_IMAGES == true
|
||||
run: |
|
||||
IMAGE="${{ env.REGISTRY }}/${{ env.ORG }}/${{ matrix.service.name }}"
|
||||
PACKAGE="${{ matrix.service.name }}"
|
||||
echo "Setting visibility of $IMAGE to public..."
|
||||
gh api \
|
||||
--method PATCH \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
/orgs/${{ env.ORG }}/packages/container/${PACKAGE}/visibility \
|
||||
-f visibility="public"
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
x-workspace: &workspace ${XCONTROL_WORKSPACE:-..}
|
||||
|
||||
services:
|
||||
db:
|
||||
image: ghcr.io/cloud-neutral-toolkit/postgres-runtime:latest
|
||||
@ -20,32 +18,6 @@ services:
|
||||
networks:
|
||||
- db
|
||||
|
||||
init:
|
||||
image: ghcr.io/cloud-neutral-toolkit/postgres-runtime:latest
|
||||
container_name: xcontrol-init
|
||||
profiles: ["init"]
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DB_USER: ${XCONTROL_DB_USER:-xcontrol}
|
||||
PGPASSWORD: ${XCONTROL_DB_PASSWORD:-xcontrol}
|
||||
command: >
|
||||
sh -c "
|
||||
psql -v ON_ERROR_STOP=1 -h db -U \"$DB_USER\" -d postgres \
|
||||
-c \"SELECT 'CREATE DATABASE account OWNER ' || quote_ident(current_user) || ';'
|
||||
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'account') \gexec\" && \
|
||||
psql -v ON_ERROR_STOP=1 -h db -U \"$DB_USER\" -d postgres \
|
||||
-c \"SELECT 'CREATE DATABASE rag OWNER ' || quote_ident(current_user) || ';'
|
||||
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'rag') \gexec\" && \
|
||||
psql -v ON_ERROR_STOP=1 -h db -U \"$DB_USER\" -d account -f /workspace/account/sql/schema.sql && \
|
||||
psql -v ON_ERROR_STOP=1 -h db -U \"$DB_USER\" -d rag -f /workspace/rag-server/sql/schema.sql
|
||||
"
|
||||
volumes:
|
||||
- *workspace:/workspace:ro
|
||||
networks:
|
||||
- db
|
||||
|
||||
account:
|
||||
image: ghcr.io/cloud-neutral-toolkit/account:latest
|
||||
container_name: account
|
||||
@ -54,7 +26,6 @@ services:
|
||||
PORT: 8080
|
||||
CONFIG_PATH: /etc/xcontrol/account-compose.yaml
|
||||
volumes:
|
||||
- *workspace:/workspace:ro
|
||||
- ./config/account.yaml:/etc/xcontrol/account-compose.yaml:ro
|
||||
depends_on:
|
||||
db:
|
||||
@ -73,7 +44,6 @@ services:
|
||||
PORT: 8090
|
||||
CONFIG_PATH: /etc/rag-server/server-compose.yaml
|
||||
volumes:
|
||||
- *workspace:/workspace:ro
|
||||
- ./config/server.yaml:/etc/rag-server/server-compose.yaml:ro
|
||||
depends_on:
|
||||
db:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user