fic dev and prod
This commit is contained in:
@@ -1,48 +1,58 @@
|
|||||||
# Traefik / public domains
|
# ── Traefik domains — used in docker-compose labels ──────────────────────────
|
||||||
ACME_EMAIL=rentaldrivego@gmail.com
|
ACME_EMAIL=rentaldrivego@gmail.com
|
||||||
API_DOMAIN=api.rentaldrivego.ma
|
API_DOMAIN=api.rentaldrivego.ma
|
||||||
PUBLIC_SITE_DOMAIN=rentaldrivego.ma
|
PUBLIC_SITE_DOMAIN=rentaldrivego.ma
|
||||||
PGMANAGE_DOMAIN=pgmanage.rentaldrivego.ma
|
PGMANAGE_DOMAIN=pgmanage.rentaldrivego.ma
|
||||||
|
|
||||||
# Database
|
# ── Database ──────────────────────────────────────────────────────────────────
|
||||||
|
# Full connection URL (used when DATABASE_URL_FROM_POSTGRES=false)
|
||||||
|
DATABASE_URL=postgresql://postgres:24DY&1u5FLCkNMeiO_p@postgres:5432/rentaldrivego
|
||||||
|
# Build the URL from individual vars (set to true to use POSTGRES_* vars below)
|
||||||
DATABASE_URL_FROM_POSTGRES=true
|
DATABASE_URL_FROM_POSTGRES=true
|
||||||
POSTGRES_HOST=postgres
|
POSTGRES_HOST=postgres
|
||||||
POSTGRES_PORT=5432
|
POSTGRES_PORT=5432
|
||||||
POSTGRES_DB=rentaldrivego
|
POSTGRES_DB=rentaldrivego
|
||||||
POSTGRES_USER=postgres
|
POSTGRES_USER=postgres
|
||||||
POSTGRES_PASSWORD=PMPS5k0D7rUeJOk0NkhI5bRtoGjkUqjK
|
POSTGRES_PASSWORD=24DY&1u5FLCkNMeiO_p
|
||||||
|
|
||||||
# Cache
|
# ── Cache ─────────────────────────────────────────────────────────────────────
|
||||||
REDIS_URL=redis://redis:6379
|
REDIS_URL=redis://redis:6379
|
||||||
|
|
||||||
# API
|
# ── API ───────────────────────────────────────────────────────────────────────
|
||||||
API_PORT=4000
|
API_PORT=4000
|
||||||
|
# SSR server-side calls go via the internal Docker network
|
||||||
API_INTERNAL_URL=http://api:4000/api/v1
|
API_INTERNAL_URL=http://api:4000/api/v1
|
||||||
|
# Public-facing API URL visible to browsers — MUST be your real domain, not localhost
|
||||||
API_URL=https://api.rentaldrivego.ma
|
API_URL=https://api.rentaldrivego.ma
|
||||||
|
# Baked into Next.js bundles at build time — MUST be set before running `npm run build`
|
||||||
NEXT_PUBLIC_API_URL=https://api.rentaldrivego.ma/api/v1
|
NEXT_PUBLIC_API_URL=https://api.rentaldrivego.ma/api/v1
|
||||||
|
|
||||||
# Frontend public URLs
|
# ── Frontend public URLs ──────────────────────────────────────────────────────
|
||||||
|
# Marketplace sits at the domain root (Traefik routes /dashboard and /admin to their apps)
|
||||||
NEXT_PUBLIC_MARKETING_URL=https://rentaldrivego.ma
|
NEXT_PUBLIC_MARKETING_URL=https://rentaldrivego.ma
|
||||||
NEXT_PUBLIC_MARKETPLACE_URL=https://rentaldrivego.ma/marketplace
|
NEXT_PUBLIC_MARKETPLACE_URL=https://rentaldrivego.ma
|
||||||
NEXT_PUBLIC_DASHBOARD_URL=https://rentaldrivego.ma/dashboard
|
NEXT_PUBLIC_DASHBOARD_URL=https://rentaldrivego.ma/dashboard
|
||||||
NEXT_PUBLIC_ADMIN_URL=https://rentaldrivego.ma/admin
|
NEXT_PUBLIC_ADMIN_URL=https://rentaldrivego.ma/admin
|
||||||
NEXT_PUBLIC_PUBLIC_SITE_DOMAIN=rentaldrivego.ma
|
NEXT_PUBLIC_PUBLIC_SITE_DOMAIN=rentaldrivego.ma
|
||||||
DASHBOARD_URL=https://rentaldrivego.ma/dashboard
|
DASHBOARD_URL=https://rentaldrivego.ma/dashboard
|
||||||
ADMIN_URL=https://rentaldrivego.ma/admin
|
ADMIN_URL=https://rentaldrivego.ma/admin
|
||||||
|
|
||||||
# CORS
|
# ── CORS ──────────────────────────────────────────────────────────────────────
|
||||||
|
# Comma-separated list of allowed browser origins. REQUIRED in production.
|
||||||
CORS_ORIGINS=https://rentaldrivego.ma
|
CORS_ORIGINS=https://rentaldrivego.ma
|
||||||
|
|
||||||
# Auth
|
# ── Auth ──────────────────────────────────────────────────────────────────────
|
||||||
JWT_SECRET=PMPS5k0D7rUeJOk0NkhI5bRtoGjkUqjK
|
JWT_SECRET=PMPS5k0D7rUeJOk0NkhI5bRtoGjkUqjK
|
||||||
JWT_EXPIRY=8h
|
JWT_EXPIRY=8h
|
||||||
RENTER_JWT_EXPIRY=7d
|
RENTER_JWT_EXPIRY=7d
|
||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
|
|
||||||
# Email
|
# ── Email ─────────────────────────────────────────────────────────────────────
|
||||||
RESEND_API_KEY=C8qPDuFwsv5l@KsGhL/V
|
|
||||||
EMAIL_FROM=rentaldrivego@gmail.com
|
EMAIL_FROM=rentaldrivego@gmail.com
|
||||||
EMAIL_FROM_NAME=RentalDriveGo
|
EMAIL_FROM_NAME=RentalDriveGo
|
||||||
|
# Option A — Resend
|
||||||
|
RESEND_API_KEY=C8qPDuFwsv5l@KsGhL/V
|
||||||
|
# Option B — SMTP (Gmail)
|
||||||
MAIL_HOST=smtp.gmail.com
|
MAIL_HOST=smtp.gmail.com
|
||||||
MAIL_PORT=587
|
MAIL_PORT=587
|
||||||
MAIL_SCHEME=smtp
|
MAIL_SCHEME=smtp
|
||||||
@@ -53,21 +63,12 @@ MAIL_FROM_NAME=RentalDriveGo
|
|||||||
MAIL_REPLY_TO_ADDRESS=rentaldrivego@gmail.com
|
MAIL_REPLY_TO_ADDRESS=rentaldrivego@gmail.com
|
||||||
MAIL_REPLY_TO_NAME=RentalDriveGo
|
MAIL_REPLY_TO_NAME=RentalDriveGo
|
||||||
|
|
||||||
# Optional SMTP instead of Resend
|
# ── Firebase push notifications (optional) ────────────────────────────────────
|
||||||
# MAIL_HOST=smtp.rentaldrivego.ma
|
|
||||||
# MAIL_PORT=587
|
|
||||||
# MAIL_USERNAME=smtp-user
|
|
||||||
# MAIL_PASSWORD=smtp-password
|
|
||||||
# MAIL_SCHEME=smtp
|
|
||||||
# MAIL_FROM_ADDRESS=noreply@rentaldrivego.ma
|
|
||||||
# MAIL_FROM_NAME=RentalDriveGo
|
|
||||||
|
|
||||||
# Optional Firebase push notifications
|
|
||||||
# FIREBASE_PROJECT_ID=your-firebase-project-id
|
# FIREBASE_PROJECT_ID=your-firebase-project-id
|
||||||
# FIREBASE_CLIENT_EMAIL=firebase-adminsdk@your-project.iam.gserviceaccount.com
|
# FIREBASE_CLIENT_EMAIL=firebase-adminsdk@your-project.iam.gserviceaccount.com
|
||||||
# FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
|
# FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
|
||||||
|
|
||||||
# Optional Twilio SMS / WhatsApp
|
# ── Twilio SMS / WhatsApp (optional) ─────────────────────────────────────────
|
||||||
# TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
# TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
# TWILIO_AUTH_TOKEN=your_auth_token
|
# TWILIO_AUTH_TOKEN=your_auth_token
|
||||||
# TWILIO_PHONE_NUMBER=+1234567890
|
# TWILIO_PHONE_NUMBER=+1234567890
|
||||||
|
|||||||
+3
-3
@@ -4,7 +4,7 @@
|
|||||||
# ═══════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
# ─── Database ──────────────────────────────────────────────────
|
# ─── Database ──────────────────────────────────────────────────
|
||||||
DATABASE_URL="postgresql://postgres:password@localhost:5432/rentaldrivego"
|
DATABASE_URL="postgresql://postgres:24DY&1u5FLCkNMeiO_p@localhost:5432/rentaldrivego"
|
||||||
|
|
||||||
# ─── API ───────────────────────────────────────────────────────
|
# ─── API ───────────────────────────────────────────────────────
|
||||||
API_PORT=4000
|
API_PORT=4000
|
||||||
@@ -75,8 +75,8 @@ REDIS_URL=redis://localhost:6379
|
|||||||
|
|
||||||
# ─── App URLs ──────────────────────────────────────────────────
|
# ─── App URLs ──────────────────────────────────────────────────
|
||||||
NEXT_PUBLIC_MARKETING_URL=http://localhost:3000
|
NEXT_PUBLIC_MARKETING_URL=http://localhost:3000
|
||||||
NEXT_PUBLIC_DASHBOARD_URL=http://localhost:3001
|
NEXT_PUBLIC_DASHBOARD_URL=http://localhost:3001/dashboard
|
||||||
NEXT_PUBLIC_ADMIN_URL=http://localhost:3002
|
NEXT_PUBLIC_ADMIN_URL=http://localhost:3002/admin
|
||||||
NEXT_PUBLIC_MARKETPLACE_URL=http://localhost:3000
|
NEXT_PUBLIC_MARKETPLACE_URL=http://localhost:3000
|
||||||
# Public site is subdomain-based; use this for local dev:
|
# Public site is subdomain-based; use this for local dev:
|
||||||
NEXT_PUBLIC_PUBLIC_SITE_DOMAIN=localhost:3003
|
NEXT_PUBLIC_PUBLIC_SITE_DOMAIN=localhost:3003
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ function LocalSignInForm({ dict, portal }: {
|
|||||||
}
|
}
|
||||||
document.cookie = `employee_token=${token}; path=/; max-age=28800; samesite=lax`
|
document.cookie = `employee_token=${token}; path=/; max-age=28800; samesite=lax`
|
||||||
window.dispatchEvent(new CustomEvent('rentaldrivego:auth-changed'))
|
window.dispatchEvent(new CustomEvent('rentaldrivego:auth-changed'))
|
||||||
notifyParent({ type: 'rentaldrivego:employee-login', path: employeeRedirect })
|
notifyParent({ type: 'rentaldrivego:employee-login', path: '/dashboard' + employeeRedirect })
|
||||||
router.push(employeeRedirect)
|
router.push(employeeRedirect)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,21 @@ services:
|
|||||||
- ./docker/pgadmin/servers.json:/pgadmin4/servers.json:ro
|
- ./docker/pgadmin/servers.json:/pgadmin4/servers.json:ro
|
||||||
profiles: ["tools"]
|
profiles: ["tools"]
|
||||||
|
|
||||||
|
pgmanage:
|
||||||
|
image: cmdpromptinc/pgmanage-enterprise:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
user: "0:0"
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
environment:
|
||||||
|
PGMANAGE_LISTEN_PORT: "8000"
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
volumes:
|
||||||
|
- pgmanage_dev_data:/appdata
|
||||||
|
profiles: ["tools"]
|
||||||
|
|
||||||
migrate:
|
migrate:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
@@ -135,5 +150,6 @@ volumes:
|
|||||||
postgres_dev_data:
|
postgres_dev_data:
|
||||||
redis_dev_data:
|
redis_dev_data:
|
||||||
pgadmin_dev_data:
|
pgadmin_dev_data:
|
||||||
|
pgmanage_dev_data:
|
||||||
app_node_modules:
|
app_node_modules:
|
||||||
postgres_bootstrap_state:
|
postgres_bootstrap_state:
|
||||||
|
|||||||
@@ -1,65 +0,0 @@
|
|||||||
# ── Traefik domains — used in docker-compose labels ──────────────────────────
|
|
||||||
ACME_EMAIL=rentaldrivego@gmail.com
|
|
||||||
API_DOMAIN=api.rentaldrivego.ma
|
|
||||||
PUBLIC_SITE_DOMAIN=rentaldrivego.ma
|
|
||||||
PGMANAGE_DOMAIN=pgmanage.rentaldrivego.ma
|
|
||||||
|
|
||||||
DATABASE_URL=postgresql://postgres:24DY@1u5FLCkNMeiO@p@postgres:5432/rentaldrivego
|
|
||||||
REDIS_URL=redis://redis:6379
|
|
||||||
|
|
||||||
# ── API ────────────────────────────────────────────────────────────────────────
|
|
||||||
API_PORT=4000
|
|
||||||
# SSR server-side calls go via the internal Docker network
|
|
||||||
API_INTERNAL_URL=http://api:4000/api/v1
|
|
||||||
# Public-facing API URL visible to browsers — MUST be your real domain, not localhost
|
|
||||||
API_URL=https://api.rentaldrivego.ma
|
|
||||||
# Baked into Next.js bundles at build time — MUST be set before running `npm run build`
|
|
||||||
NEXT_PUBLIC_API_URL=https://api.rentaldrivego.ma/api/v1
|
|
||||||
|
|
||||||
# ── Frontend public URLs ───────────────────────────────────────────────────────
|
|
||||||
NEXT_PUBLIC_MARKETING_URL=https://rentaldrivego.ma
|
|
||||||
NEXT_PUBLIC_MARKETPLACE_URL=https://rentaldrivego.ma/marketplace
|
|
||||||
NEXT_PUBLIC_DASHBOARD_URL=https://rentaldrivego.ma/dashboard
|
|
||||||
NEXT_PUBLIC_ADMIN_URL=https://rentaldrivego.ma/admin
|
|
||||||
NEXT_PUBLIC_PUBLIC_SITE_DOMAIN=rentaldrivego.ma
|
|
||||||
DASHBOARD_URL=https://rentaldrivego.ma/dashboard
|
|
||||||
ADMIN_URL=https://rentaldrivego.ma/admin
|
|
||||||
|
|
||||||
# ── CORS ──────────────────────────────────────────────────────────────────────
|
|
||||||
# Comma-separated list of allowed browser origins. REQUIRED in production.
|
|
||||||
CORS_ORIGINS=https://rentaldrivego.ma
|
|
||||||
|
|
||||||
# ── Auth ──────────────────────────────────────────────────────────────────────
|
|
||||||
JWT_SECRET=PMPS5k0D7rUeJOk0NkhI5bRtoGjkUqjK
|
|
||||||
JWT_EXPIRY=8h
|
|
||||||
RENTER_JWT_EXPIRY=7d
|
|
||||||
|
|
||||||
# ── Database ──────────────────────────────────────────────────────────────────
|
|
||||||
# IMPORTANT: POSTGRES_PASSWORD must match the password in DATABASE_URL above
|
|
||||||
POSTGRES_PASSWORD=24DY@1u5FLCkNMeiO@p
|
|
||||||
NODE_ENV=production
|
|
||||||
|
|
||||||
# ── Email (choose one: Resend API or SMTP) ────────────────────────────────────
|
|
||||||
# Option A — Resend
|
|
||||||
RESEND_API_KEY=C8qPDuFwsv5l@KsGhL/V
|
|
||||||
EMAIL_FROM=noreply@rentaldrivego.ma
|
|
||||||
EMAIL_FROM_NAME=RentalDriveGo
|
|
||||||
# Option B — SMTP
|
|
||||||
# MAIL_HOST=smtp.rentaldrivego.ma
|
|
||||||
# MAIL_PORT=587
|
|
||||||
# MAIL_USERNAME=smtp-user
|
|
||||||
# MAIL_PASSWORD=smtp-password
|
|
||||||
# MAIL_SCHEME=smtp
|
|
||||||
# MAIL_FROM_ADDRESS=noreply@rentaldrivego.ma
|
|
||||||
# MAIL_FROM_NAME=RentalDriveGo
|
|
||||||
|
|
||||||
# ── Firebase push notifications (optional) ────────────────────────────────────
|
|
||||||
# FIREBASE_PROJECT_ID=your-firebase-project-id
|
|
||||||
# FIREBASE_CLIENT_EMAIL=firebase-adminsdk@your-project.iam.gserviceaccount.com
|
|
||||||
# FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
|
|
||||||
|
|
||||||
# ── Twilio SMS / WhatsApp (optional) ─────────────────────────────────────────
|
|
||||||
# TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
||||||
# TWILIO_AUTH_TOKEN=your_auth_token
|
|
||||||
# TWILIO_PHONE_NUMBER=+1234567890
|
|
||||||
# TWILIO_WHATSAPP_NUMBER=+1234567890
|
|
||||||
Reference in New Issue
Block a user