Skip to content

Commit 31dbf25

Browse files
authored
Tandoor: Remove postgres17-contrib package (#9781)
* Remove contrib * Update * Update * Upda
1 parent f95cc5a commit 31dbf25

File tree

2 files changed

+7
-25
lines changed

2 files changed

+7
-25
lines changed

ct/tandoor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function update_script() {
5555
cd /opt/tandoor/vue3
5656
$STD yarn install
5757
$STD yarn build
58-
TANDOOR_VERSION="$(curl -fsSL https://api.github.com/repos/TandoorRecipes/recipes/releases/latest | jq -r .tag_name)"
58+
TANDOOR_VERSION=$(get_latest_github_release "TandoorRecipes/recipes")
5959
cat <<EOF >/opt/tandoor/cookbook/version_info.py
6060
TANDOOR_VERSION = "$TANDOOR_VERSION"
6161
TANDOOR_REF = "bare-metal"

install/tandoor-install.sh

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,10 @@ msg_ok "Installed Dependencies"
3232

3333
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
3434
fetch_and_deploy_gh_release "tandoor" "TandoorRecipes/recipes" "tarball" "latest" "/opt/tandoor"
35-
PG_VERSION="17" PG_MODULES="contrib" setup_postgresql
35+
PG_VERSION="17" setup_postgresql
3636
PYTHON_VERSION="3.13" setup_uv
37-
38-
msg_info "Set up PostgreSQL Database"
39-
DB_NAME=db_recipes
40-
DB_USER=tandoor
37+
PG_DB_USER="tandoor" PG_DB_NAME="db_recipes" PG_DB_EXTENSIONS="unaccent,pg_trgm" setup_postgresql_db
4138
SECRET_KEY=$(openssl rand -base64 45 | sed 's/\//\\\//g')
42-
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
43-
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
44-
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
45-
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
46-
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
47-
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
48-
$STD sudo -u postgres psql -d "$DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS unaccent;"
49-
$STD sudo -u postgres psql -d "$DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
50-
{
51-
echo "Tandoor-Credentials"
52-
echo "Tandoor Database Name: $DB_NAME"
53-
echo "Tandoor Database User: $DB_USER"
54-
echo "Tandoor Database Password: $DB_PASS"
55-
} >>~/tandoor.creds
56-
msg_ok "Set up PostgreSQL Database"
5739

5840
msg_info "Setup Tandoor"
5941
mkdir -p /opt/tandoor/{config,api,mediafiles,staticfiles}
@@ -69,16 +51,16 @@ TZ=Europe/Berlin
6951
7052
DB_ENGINE=django.db.backends.postgresql
7153
POSTGRES_HOST=localhost
72-
POSTGRES_DB=$DB_NAME
54+
POSTGRES_DB=$PG_DB_NAME
7355
POSTGRES_PORT=5432
74-
POSTGRES_USER=$DB_USER
75-
POSTGRES_PASSWORD=$DB_PASS
56+
POSTGRES_USER=$PG_DB_USER
57+
POSTGRES_PASSWORD=$PG_DB_PASS
7658
7759
STATIC_URL=/staticfiles/
7860
MEDIA_URL=/media/
7961
EOF
8062

81-
TANDOOR_VERSION="$(curl -s https://api.github.com/repos/TandoorRecipes/recipes/releases/latest | jq -r .tag_name)"
63+
TANDOOR_VERSION=$(get_latest_github_release "TandoorRecipes/recipes")
8264
cat <<EOF >/opt/tandoor/cookbook/version_info.py
8365
TANDOOR_VERSION = "$TANDOOR_VERSION"
8466
TANDOOR_REF = "bare-metal"

0 commit comments

Comments
 (0)