Build PROMPT media library with masonry UI and persistent PostgreSQL S3 storage
PROMPT CI and deployment / verify-and-deploy (push) Successful in 8m18s
PROMPT CI and deployment / verify-and-deploy (push) Successful in 8m18s
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
export COMPOSE_PROJECT_NAME="prompt-ci-${GITEA_RUN_ID:-$$}"
|
||||
export POSTGRES_PASSWORD S3_ACCESS_KEY S3_SECRET_KEY
|
||||
POSTGRES_PASSWORD=$(node -e "console.log(require('crypto').randomBytes(24).toString('hex'))")
|
||||
S3_ACCESS_KEY=$(node -e "console.log(require('crypto').randomBytes(12).toString('hex'))")
|
||||
S3_SECRET_KEY=$(node -e "console.log(require('crypto').randomBytes(24).toString('hex'))")
|
||||
export PG_PORT=0 S3_PORT=0
|
||||
cleanup(){ docker compose -f compose.yml down -v --remove-orphans; }
|
||||
trap cleanup EXIT
|
||||
docker compose -f compose.yml up -d
|
||||
PG_PORT=$(docker compose -f compose.yml port postgres 5432 | tail -1 | sed 's/.*://')
|
||||
S3_PORT=$(docker compose -f compose.yml port objects 9000 | tail -1 | sed 's/.*://')
|
||||
export DATABASE_URL="postgresql://prompt:$POSTGRES_PASSWORD@127.0.0.1:$PG_PORT/prompt"
|
||||
export S3_ENDPOINT="http://127.0.0.1:$S3_PORT" S3_BUCKET=prompt
|
||||
export PROMPT_INTEGRATION_TEST=1
|
||||
npm run storage:prepare
|
||||
npm run test:integration
|
||||
Reference in New Issue
Block a user