Merge branch 'setup' into template

This commit is contained in:
2026-08-13 02:37:43 +02:00
37 changed files with 1249 additions and 474 deletions
+16 -11
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,22 +88,27 @@ 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),site) \
--password=$(or $(DATABASE_PASSWORD),site) \
$(or $(DATABASE_NAME),site)
exec \
--env PGPASSWORD=$(or $(DATABASE_PASSWORD),site) \
postgres \
psql \
--username=$(or $(DATABASE_USERNAME),site) \
--dbname=$(or $(DATABASE_NAME),site)
.PHONY: db-unmount
db-unmount: ## Stop and remove the local database instance (keeps the data volume)
db-unmount: ## Stop and remove the local database instance while keeping its data
@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
db-reset: ## Stop and remove the local database instance, then delete its data
@docker compose \
--profile database down mariadb \
--profile database down postgres \
--volumes
@if [ -d Tests/DB ]; then \
rm -rf Tests/DB; \
mkdir -p Tests/DB; \
fi
# --- Assets minification ------------------------------------------------------