refactor: split marketplace into homepage and storefront apps
Build & Deploy / Build & Push Docker Image (push) Failing after 44s
Build & Deploy / Deploy to VPS (push) Has been skipped
Test / API Unit Tests (push) Failing after 5m0s
Test / Marketplace Unit Tests (push) Failing after 4m51s
Test / Admin Unit Tests (push) Successful in 9m31s
Test / Dashboard Unit Tests (push) Successful in 9m37s
Test / API Integration Tests (push) Successful in 9m54s

- Remove apps/marketplace entirely
- Create apps/homepage (port 3000): landing/marketing pages (home, features, pricing, platform-ops, review, legal)
- Create apps/storefront (port 3004): vehicle browsing (explore) and renter account (dashboard, profile, notifications)
- Duplicate shared components/libs into each app
- Update homepage header nav: Home, Features, Pricing instead of Home, Explore
- Fix all /explore cross-references in homepage to point to /features
- Update docker-compose.dev.yml: new homepage and storefront services, remove marketplace
- Update docker-compose.production.yml: split into homepage (main domain) and storefront (path-based routes)
- Update Dockerfiles: EXPOSE 3004 instead of 3003
- Update root package.json scripts: homepage/storefront profiles, tests, prod scripts
- Add docker-prod-up-homepage.sh and docker-prod-up-storefront.sh, remove marketplace script
This commit is contained in:
root
2026-06-25 21:09:16 -04:00
parent c5f614b3e4
commit 256ff0814e
134 changed files with 3223 additions and 38 deletions
+54 -11
View File
@@ -130,7 +130,7 @@ services:
- traefik.http.middlewares.rdg-security-headers.headers.referrerPolicy=strict-origin-when-cross-origin
- traefik.http.middlewares.rdg-security-headers.headers.permissionsPolicy=camera=(), microphone=(), geolocation=()
marketplace:
homepage:
<<: *node-runtime-hardening
cap_drop:
- ALL
@@ -143,7 +143,7 @@ services:
DASHBOARD_INTERNAL_URL: ${DASHBOARD_INTERNAL_URL:-http://dashboard:3001}
ADMIN_INTERNAL_URL: ${ADMIN_INTERNAL_URL:-http://admin:3002}
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
NEXT_PUBLIC_MARKETPLACE_URL: ${NEXT_PUBLIC_MARKETPLACE_URL}
NEXT_PUBLIC_HOMEPAGE_URL: ${NEXT_PUBLIC_HOMEPAGE_URL}
NEXT_PUBLIC_DASHBOARD_URL: ${NEXT_PUBLIC_DASHBOARD_URL}
NEXT_PUBLIC_ADMIN_URL: ${NEXT_PUBLIC_ADMIN_URL}
healthcheck:
@@ -152,7 +152,7 @@ services:
timeout: 10s
retries: 5
start_period: 60s
command: ["npm", "run", "start", "--workspace", "@rentaldrivego/marketplace"]
command: ["npm", "run", "start", "--workspace", "@rentaldrivego/homepage"]
networks:
- internal
- traefik-proxy
@@ -164,14 +164,57 @@ services:
restart: unless-stopped
labels:
- traefik.enable=true
- traefik.http.routers.marketplace.rule=(Host(`${PUBLIC_SITE_DOMAIN}`) || Host(`www.${PUBLIC_SITE_DOMAIN}`)) && !HeadersRegexp(`x-middleware-subrequest`, `.+`)
- traefik.http.routers.marketplace.entrypoints=websecure
- traefik.http.routers.marketplace.tls=true
- traefik.http.routers.marketplace.tls.certresolver=letsencrypt
- traefik.http.routers.marketplace.service=marketplace-svc
- traefik.http.routers.marketplace.priority=10
- traefik.http.services.marketplace-svc.loadbalancer.server.port=3000
- traefik.http.routers.marketplace.middlewares=rdg-security-headers@docker
- traefik.http.routers.homepage.rule=(Host(`${PUBLIC_SITE_DOMAIN}`) || Host(`www.${PUBLIC_SITE_DOMAIN}`)) && !HeadersRegexp(`x-middleware-subrequest`, `.+`)
- traefik.http.routers.homepage.entrypoints=websecure
- traefik.http.routers.homepage.tls=true
- traefik.http.routers.homepage.tls.certresolver=letsencrypt
- traefik.http.routers.homepage.service=homepage-svc
- traefik.http.routers.homepage.priority=10
- traefik.http.services.homepage-svc.loadbalancer.server.port=3000
- traefik.http.routers.homepage.middlewares=rdg-security-headers@docker
storefront:
<<: *node-runtime-hardening
cap_drop:
- ALL
image: ${APP_IMAGE:-rentaldrivego-prod-app}:${APP_VERSION:-latest}
build:
context: .
dockerfile: Dockerfile.production
args:
API_INTERNAL_URL: ${API_INTERNAL_URL:-http://api:4000/api/v1}
DASHBOARD_INTERNAL_URL: ${DASHBOARD_INTERNAL_URL:-http://dashboard:3001}
ADMIN_INTERNAL_URL: ${ADMIN_INTERNAL_URL:-http://admin:3002}
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
NEXT_PUBLIC_STOREFRONT_URL: ${NEXT_PUBLIC_STOREFRONT_URL}
NEXT_PUBLIC_DASHBOARD_URL: ${NEXT_PUBLIC_DASHBOARD_URL}
NEXT_PUBLIC_ADMIN_URL: ${NEXT_PUBLIC_ADMIN_URL}
healthcheck:
test: ["CMD-SHELL", "node -e \"require('http').get('http://localhost:3004/', (r) => process.exit(r.statusCode < 400 ? 0 : 1)).on('error', () => process.exit(1))\""]
interval: 15s
timeout: 10s
retries: 5
start_period: 60s
command: ["npm", "run", "start", "--workspace", "@rentaldrivego/storefront"]
networks:
- internal
- traefik-proxy
depends_on:
api:
condition: service_healthy
env_file:
- .env.docker.production
restart: unless-stopped
labels:
- traefik.enable=true
- traefik.http.routers.storefront.rule=(Host(`${PUBLIC_SITE_DOMAIN}`) || Host(`www.${PUBLIC_SITE_DOMAIN}`)) && PathPrefix(`/explore`, `/renter`, `/sign-in`)
- traefik.http.routers.storefront.entrypoints=websecure
- traefik.http.routers.storefront.tls=true
- traefik.http.routers.storefront.tls.certresolver=letsencrypt
- traefik.http.routers.storefront.service=storefront-svc
- traefik.http.routers.storefront.priority=20
- traefik.http.services.storefront-svc.loadbalancer.server.port=3004
- traefik.http.routers.storefront.middlewares=rdg-security-headers@docker
dashboard:
<<: *node-runtime-hardening