2.3 KiB
MyOffice Docker demo
| Service | Default host port | Notes |
|---|---|---|
web |
32080 | Angular SPA (nginx) |
api |
32081 | ASP.NET Core + OpenIddict |
pgadmin |
32082 | pgAdmin 4 |
postgres |
(none) | Internal only (postgres:5432) |
Empty Postgres is migrated and filled with demo users on API startup.
Commands
.\build.ps1 # defaults :32080 / :32081 / :32082
.\build.ps1 32080 32081 32082 # override front, back, pgAdmin
.\build.ps1 up # build + recreate containers
.\build.ps1 rebuild # --no-cache images + recreate (picks up API/CORS code)
.\build.ps1 reset # wipe DB volumes + rebuild (new seed / password user_UAH)
.\build.ps1 down
.\build.ps1 logs
Linux/macOS: ./build.sh (same commands)
Important: demo users are seeded only into an empty DB. Changing password in code does nothing until you run .\build.ps1 reset (clears data/demo/postgres).
Custom ports rebuild the SPA so apiUrl / OIDC point at the chosen backend host port, and set FrontEnd:Host + CORS for the frontend origin.
URLs & logins
Defaults (.\build.ps1):
| App | URL | Login |
|---|---|---|
| Frontend | http://localhost:32080 | user_UAH@user_UAH.userUAH / user_UAH |
| Backend | http://localhost:32081 | — |
| pgAdmin | http://localhost:32082 | admin@example.com / admin |
Postgres is auto-registered in pgAdmin as server myoffice (host postgres, user/db/password myoffice) — no manual setup.
If the server is missing after an older run: .\build.ps1 reset (or delete data/demo/pgadmin).
Data folders
Bind mounts next to the compose file (gitignored under Docker/data/):
| Host path | Container |
|---|---|
Docker/data/demo/postgres |
/var/lib/postgresql/data |
Docker/data/demo/pgadmin |
/var/lib/pgadmin |
Stop/start keeps these folders. Wipe with .\build.ps1 reset or delete the folders manually.
Notes
- API uses
ASPNETCORE_ENVIRONMENT=Docker, ephemeral OpenIddict keys, HTTP allowed. - Changing front/back ports rebuilds the SPA so API/OIDC URLs match.