Commit Graph

32 Commits

Author SHA1 Message Date
6e47a85055 fix: use $VAR instead of ${VAR} for arty variable expansion
Changed from ${DB_USER}/${SEXY_DB_NAME} to $DB_USER/$SEXY_DB_NAME
for proper variable expansion in arty scripts.

Arty exports environment variables before executing scripts, so simple
$VAR syntax works correctly, while ${VAR} was being treated as literal
text in the shell context.
2025-10-28 23:26:57 +01:00
d3d9c7d0e2 fix: use hardcoded DB credentials for VPS production
Changed from ${DB_USER} and ${SEXY_DB_NAME} variables to hardcoded
values 'valknar' and 'directus' for production VPS environment.

Arty environment variables are not exported to the shell where scripts
execute, so the variables were empty when docker exec commands ran.

Production VPS always uses:
- PostgreSQL container: core_postgres
- DB user: valknar
- Database name: directus

These values are stable for production and won't change.
2025-10-28 23:26:12 +01:00
129a759795 fix: remove if/else from sexy/import/all to avoid arty syntax error
Removed interactive confirmation prompt (read -p and if/else/fi) from
sexy/import/all script. The if/else control structure caused syntax errors
when executed via arty due to how arty appends "$@" to scripts.

The script now runs directly without confirmation. Users should be careful
when running this destructive operation as it will immediately:
1. Drop and recreate all database tables
2. Apply Directus schema snapshot
3. Restart the Directus API

Warning message is still displayed before execution.
2025-10-28 23:24:36 +01:00
dee16f7321 fix: use environment variables in sexy import scripts
Changed hardcoded database credentials to use environment variables:
- `-U sexy` → `-U ${DB_USER}`
- `-d sexy` → `-d ${SEXY_DB_NAME}`

Also added missing interactive confirmation prompt to sexy/import/all script.

This fixes the script error on VPS where:
- VPS uses: DB_USER=valknar, SEXY_DB_NAME=directus
- Local dev uses: DB_USER=sexy, SEXY_DB_NAME=sexy (or directus)

The scripts now work correctly in both environments by reading
the appropriate values from .env files via arty's environment system.
2025-10-28 23:19:00 +01:00
c7608ae0b5 fix: scripts newline format 2025-10-28 23:13:19 +01:00
960056cdf9 feat: add database and schema import scripts to arty.yml
Added three import scripts for sexy.pivoine.art database restoration:

1. sexy/db/import
   - Imports PostgreSQL database from directus.sql
   - Includes warning about destructive operation
   - Restarts Directus API after import

2. sexy/schema/import
   - Applies Directus schema snapshot from schema.yaml
   - Uses 'directus schema apply --yes'
   - Restarts Directus API after import

3. sexy/import/all
   - Combined import with interactive confirmation
   - Prompts user to type 'yes' to proceed
   - Imports database then applies schema
   - Complete restoration workflow

All scripts include comprehensive comments and safety warnings.
Complements existing export scripts (sexy/db/export, sexy/schema/export, sexy/export/all).

Usage:
  pnpm arty sexy/db/import       # Import database only
  pnpm arty sexy/schema/import   # Import schema only
  pnpm arty sexy/import/all      # Full import (with confirmation)
2025-10-28 22:12:25 +01:00
800c59ff94 feat: directus scheme 2025-10-28 21:24:34 +01:00
c3e6327cb6 feat: artifact from github script 2025-10-26 21:08:56 +01:00
0ebc4d0e4e feat: artifact from github script 2025-10-26 20:56:25 +01:00
0c45ab185f feat: sdf 2025-10-26 20:32:16 +01:00
da29eaa80b feat: sdf 2025-10-26 20:27:06 +01:00
8c37761ee9 feat: sdf 2025-10-26 20:18:47 +01:00
1d7dfa667d feat: sdf 2025-10-26 20:07:08 +01:00
dd90fb2b78 feat: sdf 2025-10-26 20:04:56 +01:00
2704987916 feat: sdf 2025-10-26 19:59:11 +01:00
904491d983 feat: sdf 2025-10-26 19:43:34 +01:00
46b67d00c7 feat: sdf 2025-10-26 19:41:56 +01:00
e2cc37c3c8 fix: awsm labels 2025-10-26 17:52:57 +01:00
a1d3c33dca feat: awsm 2025-10-26 17:05:56 +01:00
d6b38fab8c fix: github workflow 2025-10-26 14:15:21 +01:00
db98d388a8 feat: arty cmd args passing 2025-10-26 12:33:05 +01:00
434b974758 feat: extend arty for new arty 2025-10-26 12:07:06 +01:00
903e585659 fix: umami 2025-10-26 11:52:01 +01:00
142fd5442f feat: uploads import/export 2025-10-26 11:40:07 +01:00
b4568e4756 feat: uploads import/export 2025-10-26 11:39:25 +01:00
dc74fdfa98 feat: uploads import/export 2025-10-26 11:38:32 +01:00
978107ba47 fix: arty cmds 2025-10-26 11:33:39 +01:00
0ce0eec479 fix: arty cmds 2025-10-26 11:20:49 +01:00
ecdb152a36 fix: db vars 2025-10-26 11:11:31 +01:00
b2b71c87c8 fix: network name 2025-10-26 11:05:19 +01:00
d6943087f0 feat: sexy 2025-10-26 10:54:01 +01:00
a371a33682 a new start 2025-10-25 13:58:11 +02:00