Shared PostgreSQL database
FileStore can use the same PostgreSQL database instance as PortalConsole or ProcessCenter. It does not reuse or modify their application tables. When DATABASE_URL is configured, FileStore creates and uses only tables with the file_store_ prefix:
file_store_backendsstores backend connection metadata and secret namespaces.file_store_policiesstores consumer storage policies.file_store_assetsstores attachment metadata and lifecycle state.file_store_auditsstores immutable operational events.file_store_admin_accountsstores administrator usernames, scrypt password hashes, roles, and enabled status.
Actual R2/S3 credentials remain server-side environment secrets referenced by secretRef; credential values are not written into the database. PortalConsole organization identifiers are stored as strings because identifiers such as dept_58016148e5504c1c98deb7182d02e224 are not UUIDs.
Runtime variables
DATABASE_URL=postgresql://...
DATABASE_DIALECT=postgresql
DB_POOL_MAX=5
DATABASE_SSL=requireThe server initializes the file_store_* tables with idempotent CREATE TABLE IF NOT EXISTS statements. This is intentionally limited to FileStore-owned tables and does not run migrations against PortalConsole or ProcessCenter tables.
When DATABASE_URL is absent, the existing JSON repositories and file-based administrator authentication remain available for local development and tests. When it is present, database-backed repositories and database-backed administrator authentication are selected automatically at startup. Existing JSON files are not imported automatically because this is a development-stage deployment without a required data migration. In a database-enabled deployment, FILE_STORE_ADMIN_AUTH_PATH is not read.
Local development topology
The Docker development stack runs every application against the shared PostgreSQL instance with its own logical database and database user, which is the arrangement the DB topology audit memo asks for. FileStore follows the same rule:
DATABASE_URL=postgresql://file_store:...@postgres:5432/file_storeBecause FileStore only issues idempotent CREATE TABLE IF NOT EXISTS statements for its own file_store_* tables, the same server can also be pointed at a consumer portal database (see the 관리형 클라우드 setup below) without touching PortalConsole or ProcessCenter tables. The dedicated database is only a default for local development; switching between the two arrangements is a DATABASE_URL change.
관리형 클라우드 setup
Add the existing PostgreSQL service's DATABASE_URL reference to the FileStore service. Set DATABASE_DIALECT=postgresql, deploy the new FileStore commit, and verify the startup log. Then register the R2 backend and process-center consumer policy again through /admin; those records will be stored in the shared database and will survive container replacement.