[Wip] Update CI CD (#2945)

* Update CI and CD scripts

* Fix docker docs build

* Fix CD

* Fix CD

* Update front build and add postgres intel pg_graphql files

* Fix postgres install

* Fix

* Update docs
This commit is contained in:
Charles Bochet
2023-12-12 22:38:40 +01:00
committed by GitHub
parent 6594055317
commit 2496431703
45 changed files with 389 additions and 451 deletions

View File

@@ -0,0 +1,27 @@
#!/bin/bash
PG_MAIN_VERSION=15
PG_GRAPHQL_VERSION=1.4.2
current_directory=$(pwd)
echo "Step [1/4]: Installing PostgreSQL..."
brew reinstall postgresql@$PG_MAIN_VERSION
echo "Step [2/4]: Installing GraphQL for PostgreSQL..."
cp ./macos/arm/${PG_MAIN_VERSION}/pg_graphql/${PG_GRAPHQL_VERSION}/pg_graphql--${PG_GRAPHQL_VERSION}.sql \
/opt/homebrew/opt/postgresql@${PG_MAIN_VERSION}/share/postgresql@${PG_MAIN_VERSION}/extension
cp ./macos/arm/${PG_MAIN_VERSION}/pg_graphql/${PG_GRAPHQL_VERSION}/pg_graphql.control \
/opt/homebrew/opt/postgresql@${PG_MAIN_VERSION}/share/postgresql@${PG_MAIN_VERSION}/extension
cp ./macos/arm/${PG_MAIN_VERSION}/pg_graphql/${PG_GRAPHQL_VERSION}/pg_graphql.so \
/opt/homebrew/opt/postgresql@${PG_MAIN_VERSION}/lib/postgresql
export PATH="/opt/homebrew/opt/postgresql@${PG_MAIN_VERSION}/bin:$PATH"
echo "Step [3/4]: Starting PostgreSQL service..."
brew services restart postgresql@15
echo "Step [4/4]: Setting up database..."
cp ./init.sql /tmp/init.sql
sleep 5
psql -f /tmp/init.sql -d postgres