Skip to content

Build and deploy feature/psd401-unlock-enterprise to dev #23

Description

@reeseherber

Request

Build the Docker image from branch feature/psd401-unlock-enterprise and deploy to the dev server at 10.0.70.60.

What changed

Google Directory Sync (Phase 1) — pulls department, title, orgUnitPath, and Google group memberships from the Google Admin SDK on every Google SSO login and stores them on the User record.

Key commits on the branch:

  • 71b68514a — Prisma migration: 5 new nullable columns on User (department, title, orgUnitPath, googleGroups, directoryLastSyncedAt)
  • c5ec6e575 — googleapis dependency added to @documenso/lib
  • Directory client (TDD): directory-client.ts + 11 tests
  • Sync orchestrator (TDD): sync-google-directory.ts + 9 tests
  • d21465a4e — OAuth callback hook: syncGoogleDirectory called in all 3 OAuth paths (Google provider only)

Build

docker buildx build --platform linux/amd64 -f docker/Dockerfile -t ghcr.io/psd401/documenso:latest --push .

Branch: feature/psd401-unlock-enterprise
Image: ghcr.io/psd401/documenso:latest

Deploy to dev

SSH: ssh -i ~/.ssh/id_ed25519 psdadmin@10.0.70.60
Stack: /home/psdadmin/psd401-stack/

cd /home/psdadmin/psd401-stack
sudo docker compose pull documenso
sudo docker compose up -d

Env vars already configured

The following env vars and volume mount are already added to docker-compose.yml on the dev server:

GOOGLE_DIRECTORY_SYNC_ENABLED=true
GOOGLE_DIRECTORY_ADMIN_EMAIL=documenso-sync@psd401.net
GOOGLE_SERVICE_ACCOUNT_KEY_FILE=/opt/documenso/directory-sync-key.json

Volume mount: ./documenso-directory-sync-key.json:/opt/documenso/directory-sync-key.json:ro

The service account key file is already on the dev server at /home/psdadmin/psd401-stack/documenso-directory-sync-key.json.

Prisma migration

Migration 20260519000000_add_google_directory_fields has already been applied manually to the dev database and registered in _prisma_migrations. Prisma will see it as already applied.

Verification after deploy

After the container starts, have someone sign in with Google SSO at https://documenso-dev.psd401.net, then check:

sudo docker exec psd401-stack-postgres-1 psql -U documenso -d documenso -c "SELECT email, department, title, \"orgUnitPath\", \"directoryLastSyncedAt\" FROM \"User\" WHERE \"directoryLastSyncedAt\" IS NOT NULL;"

Expected: the signed-in user's row shows department, title, orgUnitPath populated from Google Workspace.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions