doxa-maps-cdn/compose.laptop.yaml
doxa-maps 8770903270 Laptop: the plugin-studio route in one command, bun run laptop plugin-studio
A second compose profile beside "subdomain":
- dx-maps-studio: the dx-maps container with ACCESS=public on research.localhost:4616, the
  PUBLIC Plugin Studio. There is no sign-in provider; publishing and PocketBase's dashboard ask
  for ADMIN_PASSWORD. Its /cdn is built from main with EMBED_BASE_URL=http://research.localhost:4616/cdn.
- dxlife-studio: this site's research-gallery-plugin-studio branch on :4614. Its two settings,
  NUXT_PUBLIC_RESEARCH_GALLERY_URL and NUXT_PUBLIC_DX_MAPS_BASE (names agreed with dx-base), point
  at the Studio and its /cdn, and are read at run time.
The two routes use separate data volumes. .env.laptop gains a generated ADMIN_PASSWORD (never
printed). laptop-dxlife.sh takes DXLIFE_PORT (4613 subdomain, 4614 plugin-studio).
2026-09-29 04:43:02 +00:00

119 lines
6.1 KiB
YAML

# The laptop's routes with the dx-maps container, one command each (documentation/LAPTOP-6WAY.md):
# bun run laptop subdomain profile subdomain: the services below with the sign-in
# bun run laptop plugin-studio profile plugin-studio: the PUBLIC Plugin Studio (ACCESS=public) + this site
# Everything listens on this computer only (127.0.0.1):
# dx-maps the team container the server runs: Plugin Studio, PocketBase, and the research site. Built from
# dx-maps' root Dockerfile, the same image the VPS runs.
# issuer a local sign-in provider with three users (admin, designer, and anyone else as a plain member).
# It shares dx-maps' network, so http://localhost:4620 means the same thing to your browser and to
# the container: sign-in works without any hosts-file entry.
# dxlife this site on the subdomain branch, pointed at the research site.
# Settings and secrets come from .env.laptop (made by `bun run laptop`, never committed).
name: dxlife-laptop
services:
dx-maps:
profiles: [subdomain]
build: ${DXMAPS_DIR:-../doxa-maps}
image: dxlife-laptop/dx-maps:local
environment:
REPO_URL: ${DXMAPS_REPO_URL:-https://git.nuxtbase.app/doxa-life/doxa-maps.git}
BRANCH: ${DXMAPS_BRANCH:-development}
PRODUCTION_BRANCH: ${DXMAPS_PRODUCTION_BRANCH:-main}
GIT_TOKEN: ${GIT_TOKEN:-}
OIDC_ISSUER: http://localhost:4620/team
OIDC_CLIENT_ID: dx-maps
OIDC_CLIENT_SECRET: ${OIDC_CLIENT_SECRET:?run bun run laptop}
OIDC_COOKIE_SECRET: ${OIDC_COOKIE_SECRET:?run bun run laptop}
OIDC_REDIRECT_URL: http://localhost:4616/oauth2/callback
OIDC_ALLOWED_GROUPS: team:designer,team:admin
OIDC_ADMIN_GROUPS: team:admin
OIDC_DISPLAY_NAME: the laptop's test sign-in
PB_OIDC_CLIENT_ID: dx-maps-pb
PB_OIDC_CLIENT_SECRET: ${PB_OIDC_CLIENT_SECRET:?run bun run laptop}
PB_SUPERUSER_EMAIL: ${PB_SUPERUSER_EMAIL:?run bun run laptop}
PB_SUPERUSER_PASSWORD: ${PB_SUPERUSER_PASSWORD:?run bun run laptop}
SUBDOMAIN_APPS: research.localhost=doxa-maps-spa/doxa-maps-spa
SUBDOMAIN_PORT: "4615"
EMBED_BASE_URL: http://research.localhost:4615
PUBLIC_API_BASE: http://localhost:4616/api-prod
HMR_CLIENT_PORT: "4616"
HMR_PROTOCOL: ws
CDN_AUTOBUILD_MINUTES: "1"
ports:
- 127.0.0.1:4616:5173 # Plugin Studio, PocketBase (/pb), /cdn, /admin: http://localhost:4616/
- 127.0.0.1:4615:4615 # the research site: http://research.localhost:4615/
- 127.0.0.1:4620:4620 # the sign-in provider, which runs in this container's network
volumes:
- dx-data:/data
mem_limit: 2560m
issuer:
profiles: [subdomain]
image: ghcr.io/navikt/mock-oauth2-server:6.0.3
network_mode: service:dx-maps
environment:
SERVER_PORT: "4620"
JSON_CONFIG: '{"interactiveLogin":true,"tokenCallbacks":[{"issuerId":"team","requestMappings":[{"requestParam":"subject","match":"admin","claims":{"groups":["team","team:admin"],"email":"admin@team.localhost","email_verified":true,"preferred_username":"admin"}},{"requestParam":"subject","match":"designer","claims":{"groups":["team","team:designer"],"email":"designer@team.localhost","email_verified":true,"preferred_username":"designer"}},{"requestParam":"subject","match":".*","claims":{"groups":["team"],"email":"$${subject}@team.localhost","email_verified":true,"preferred_username":"$${subject}"}}]}]}'
mem_limit: 384m
dxlife:
profiles: [subdomain]
build: ${DXMAPS_DIR:-../doxa-maps}
image: dxlife-laptop/dx-maps:local
entrypoint: ["bash", "/laptop-dxlife.sh"]
environment:
DXLIFE_REPO_URL: ${DXLIFE_REPO_URL:-https://git.nuxtbase.app/doxa-life/doxa-maps-cdn.git}
DXLIFE_BRANCH: ${DXLIFE_BRANCH:-research-gallery-subdomain}
GIT_TOKEN: ${GIT_TOKEN:-}
NUXT_PUBLIC_DX_MAPS_BASE: http://research.localhost:4615/dx-maps
NUXT_PUBLIC_RESEARCH_GALLERY_URL: http://research.localhost:4615/
volumes:
- ./scripts/laptop-dxlife.sh:/laptop-dxlife.sh:ro
ports:
- 127.0.0.1:4613:4613 # this site: http://localhost:4613/
mem_limit: 2048m
# The PLUGIN-STUDIO route: the research subdomain IS the public Plugin Studio. No sign-in provider: the Studio
# and the maps are open, and /admin/ (publishing) and PocketBase's dashboard ask for ADMIN_USER/ADMIN_PASSWORD.
# This site embeds production maps from the Studio's /cdn, built from main. Both addresses reach it at run time.
dx-maps-studio:
profiles: [plugin-studio]
build: ${DXMAPS_DIR:-../doxa-maps}
image: dxlife-laptop/dx-maps:local
environment:
REPO_URL: ${DXMAPS_REPO_URL:-https://git.nuxtbase.app/doxa-life/doxa-maps.git}
BRANCH: ${DXMAPS_BRANCH:-development}
PRODUCTION_BRANCH: ${DXMAPS_PRODUCTION_BRANCH:-main}
GIT_TOKEN: ${GIT_TOKEN:-}
ACCESS: public
ADMIN_USER: admin
ADMIN_PASSWORD: ${ADMIN_PASSWORD:?run bun run laptop}
PB_SUPERUSER_EMAIL: ${PB_SUPERUSER_EMAIL:?run bun run laptop}
PB_SUPERUSER_PASSWORD: ${PB_SUPERUSER_PASSWORD:?run bun run laptop}
EMBED_BASE_URL: http://research.localhost:4616/cdn
PUBLIC_API_BASE: http://research.localhost:4616/api-prod
HMR_CLIENT_PORT: "4616"
HMR_PROTOCOL: ws
CDN_AUTOBUILD_MINUTES: "1"
ports:
- 127.0.0.1:4616:5173 # the public Plugin Studio and its /cdn: http://research.localhost:4616/
volumes:
- dx-data-studio:/data
mem_limit: 2560m
dxlife-studio:
profiles: [plugin-studio]
build: ${DXMAPS_DIR:-../doxa-maps}
image: dxlife-laptop/dx-maps:local
entrypoint: ["bash", "/laptop-dxlife.sh"]
environment:
DXLIFE_REPO_URL: ${DXLIFE_REPO_URL:-https://git.nuxtbase.app/doxa-life/doxa-maps-cdn.git}
DXLIFE_BRANCH: ${DXLIFE_STUDIO_BRANCH:-research-gallery-plugin-studio}
DXLIFE_PORT: "4614"
GIT_TOKEN: ${GIT_TOKEN:-}
NUXT_PUBLIC_RESEARCH_GALLERY_URL: http://research.localhost:4616/
NUXT_PUBLIC_DX_MAPS_BASE: http://research.localhost:4616/cdn/dx-maps
volumes:
- ./scripts/laptop-dxlife.sh:/laptop-dxlife.sh:ro
ports:
- 127.0.0.1:4614:4614 # this site, plugin-studio branch: http://localhost:4614/
mem_limit: 2048m
volumes:
dx-data:
dx-data-studio: