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.
This commit is contained in:
2025-10-28 23:26:12 +01:00
parent 129a759795
commit d3d9c7d0e2

View File

@@ -111,7 +111,7 @@ scripts:
sexy/db/import: |
echo "⚠️ WARNING: This will replace the current database!" &&
echo "Make sure core_postgres container is running..." &&
docker exec -i core_postgres psql -U ${DB_USER} -d ${SEXY_DB_NAME} < ~/Projects/docker-compose/sexy/directus.sql &&
docker exec -i core_postgres psql -U valknar -d directus < ~/Projects/docker-compose/sexy/directus.sql &&
echo "✓ Database imported from ~/Projects/docker-compose/sexy/directus.sql" &&
echo "Restarting Directus API..." &&
docker restart sexy_api &&
@@ -134,7 +134,7 @@ scripts:
sexy/import/all: |
echo "⚠️ WARNING: This will completely replace the database and schema!" &&
echo "Importing database..." &&
docker exec -i core_postgres psql -U ${DB_USER} -d ${SEXY_DB_NAME} < ~/Projects/docker-compose/sexy/directus.sql &&
docker exec -i core_postgres psql -U valknar -d directus < ~/Projects/docker-compose/sexy/directus.sql &&
echo "✓ Database imported" &&
echo "Applying Directus schema..." &&
docker cp ~/Projects/docker-compose/sexy/schema.yaml sexy_api:/directus/schema.yaml &&