Migrated the Website service tooling to use PostgreSQL instead.

This commit is contained in:
2026-08-05 01:26:54 +02:00
parent 9b4a780ea3
commit 6156cf5b0d
4 changed files with 33 additions and 35 deletions
+10 -9
View File
@@ -73,11 +73,11 @@ db-mount: ## Start the local database instance
@docker compose \
--profile database up \
--detach \
--wait mariadb
--wait postgres
.PHONY: db-migrate
db-migrate: ## Run the migrations against the local database instance
@DATABASE_DRIVER=mysql \
@DATABASE_DRIVER=postgres \
DATABASE_HOST=127.0.0.1 \
DATABASE_TLS=off \
swift run \
@@ -88,21 +88,22 @@ db-migrate: ## Run the migrations against the local database instance
db-shell: ## Open a SQL shell on the local database instance
@docker compose \
--profile database \
exec mariadb \
mariadb \
--user=$(or $(DATABASE_USERNAME),loud) \
--password=$(or $(DATABASE_PASSWORD),loud) \
$(or $(DATABASE_NAME),loud)
exec \
--env PGPASSWORD=$(or $(DATABASE_PASSWORD),loud) \
postgres \
psql \
--username=$(or $(DATABASE_USERNAME),loud) \
--dbname=$(or $(DATABASE_NAME),loud)
.PHONY: db-unmount
db-unmount: ## Stop and remove the local database instance (keeps the data volume)
@docker compose \
--profile database down mariadb
--profile database down postgres
.PHONY: db-reset
db-reset: ## Stop and remove the local database instance and delete its data volume
@docker compose \
--profile database down mariadb \
--profile database down postgres \
--volumes
# --- Assets minification ------------------------------------------------------