mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-14 10:34:06 +02:00
Working local Saas (#6450)
Env file for setting backend saas and taskfile for running it
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
###############################################################################
|
||||||
|
# Stirling-PDF SaaS local environment template.
|
||||||
|
#
|
||||||
|
# Copy this file to `.env.saas.local` (gitignored) and fill in real values.
|
||||||
|
# Loaded by `task backend:dev:saas` via Taskfile's `dotenv:` directive, then
|
||||||
|
# read by Spring Boot's `${...}` placeholders in application-saas.properties
|
||||||
|
# and application-dev.properties.
|
||||||
|
#
|
||||||
|
# DO NOT commit `.env.saas.local`. Only `.env.saas.example` is checked in.
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# ---------- Supabase project ----------
|
||||||
|
# Project reference (the subdomain part of <ref>.supabase.co). Required.
|
||||||
|
# Example dev project:
|
||||||
|
SAAS_DB_PROJECT_REF=
|
||||||
|
|
||||||
|
# Edge function secret used by billing/license rollup calls.
|
||||||
|
SUPABASE_EDGE_FUNCTION_SECRET=
|
||||||
|
|
||||||
|
# ---------- Database (saas profile) ----------
|
||||||
|
# Direct JDBC URL to the Supabase Postgres. Required when running the plain
|
||||||
|
# `saas` profile (i.e. without `--spring.profiles.include=dev`).
|
||||||
|
# Example: jdbc:postgresql://db.<project-ref>.supabase.co:5432/postgres
|
||||||
|
SAAS_DB_URL=
|
||||||
|
SAAS_DB_USERNAME=postgres
|
||||||
|
SAAS_DB_PASSWORD=
|
||||||
|
|
||||||
|
# ---------- Database (dev profile overrides) ----------
|
||||||
|
# Used when `--spring.profiles.include=dev` is active. The dev profile
|
||||||
|
# defaults the URL/username to the shared dev Supabase project, but the
|
||||||
|
# password must still be provided here.
|
||||||
|
SAAS_DEV_DB_URL=
|
||||||
|
SAAS_DEV_DB_USERNAME=postgres
|
||||||
|
SAAS_DEV_DB_PASSWORD=
|
||||||
@@ -174,6 +174,7 @@ venv.bak/
|
|||||||
|
|
||||||
# Env files (secrets / local overrides). Subproject .gitignore files whitelist any committed defaults.
|
# Env files (secrets / local overrides). Subproject .gitignore files whitelist any committed defaults.
|
||||||
.env*
|
.env*
|
||||||
|
!.env.saas.example
|
||||||
|
|
||||||
# VS Code
|
# VS Code
|
||||||
/.vscode/**/*
|
/.vscode/**/*
|
||||||
|
|||||||
@@ -39,6 +39,25 @@ tasks:
|
|||||||
- cmd: ./gradlew clean bootRun -PbuildWithFrontend=true
|
- cmd: ./gradlew clean bootRun -PbuildWithFrontend=true
|
||||||
platforms: [linux, darwin]
|
platforms: [linux, darwin]
|
||||||
|
|
||||||
|
dev:saas:
|
||||||
|
desc: "Start backend in SaaS flavor against Supabase (loads .env.saas.local)"
|
||||||
|
# `dotenv:` reads from the root Taskfile's directory (".") because this
|
||||||
|
# subtaskfile is included with `dir: .`. Drop the file at the repo root.
|
||||||
|
dotenv: ['.env.saas.local']
|
||||||
|
ignore_error: true
|
||||||
|
vars:
|
||||||
|
PORT: '{{.PORT | default "8080"}}'
|
||||||
|
# Override to "" to run the pure `saas` profile against your own SAAS_DB_*.
|
||||||
|
PROFILES: '{{.PROFILES | default "dev"}}'
|
||||||
|
env:
|
||||||
|
SERVER_PORT: '{{.PORT}}'
|
||||||
|
STIRLING_FLAVOR: saas
|
||||||
|
cmds:
|
||||||
|
- cmd: cmd /c ".\gradlew.bat :stirling-pdf:bootRun {{if .PROFILES}}--args=\"--spring.profiles.include={{.PROFILES}}\"{{end}}"
|
||||||
|
platforms: [windows]
|
||||||
|
- cmd: ./gradlew :stirling-pdf:bootRun {{if .PROFILES}}--args='--spring.profiles.include={{.PROFILES}}'{{end}}
|
||||||
|
platforms: [linux, darwin]
|
||||||
|
|
||||||
build:
|
build:
|
||||||
desc: "Full backend build"
|
desc: "Full backend build"
|
||||||
cmds:
|
cmds:
|
||||||
|
|||||||
Reference in New Issue
Block a user