add school year and security fix
API CI/CD / Validate (composer + pint) (push) Successful in 3m14s
API CI/CD / Test (PHPUnit) (push) Failing after 3m28s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Security audit (push) Failing after 56s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
API CI/CD / Validate (composer + pint) (push) Successful in 3m14s
API CI/CD / Test (PHPUnit) (push) Failing after 3m28s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Security audit (push) Failing after 56s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
},
|
||||
{
|
||||
"path": "../alrahma_web_client"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
},
|
||||
{
|
||||
"path": "../car_rental_app"
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"java.compile.nullAnalysis.mode": "automatic"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "../car_rental_app"
|
||||
},
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
docker compose -f docker-compose.dev.yml up -d postgres
|
||||
docker compose -f docker-compose.dev.yml up -d redis
|
||||
docker compose -p rentaldrivego-prod --env-file .env.docker.production -f docker-compose.production.yml up --build -d --no-deps marketplace
|
||||
docker compose -p rentaldrivego-prod --env-file .env.docker.production -f docker-compose.production.yml up --build -d --no-deps admin
|
||||
docker compose -f docker-compose.dev.yml --profile full up --build
|
||||
docker compose -f docker-compose.dev.yml --profile dashboard up --build
|
||||
docker compose -f docker-compose.dev.yml --profile marketplace up --build
|
||||
docker compose -f docker-compose.dev.yml --profile api up --build
|
||||
|
||||
|
||||
Default dev admin:
|
||||
|
||||
Email: platform.ops@rentaldrivego.com
|
||||
Password: PlatformOps123!
|
||||
|
||||
|
||||
|
||||
What this means:
|
||||
|
||||
docker compose -f docker-compose.dev.yml --profile full up --build will no longer reseed or redeploy the DB on every fix.
|
||||
Your data stays as long as you do not run docker compose ... down -v or manually delete the Docker volumes.
|
||||
If you later change the schema and want to apply it without wiping data, run:
|
||||
docker compose -f docker-compose.dev.yml run --rm migrate sh -c "npm run db:deploy"
|
||||
Production was already using a persistent named Postgres volume, so the main issue was the dev bootstrap behavior. Restart the dev stack once for this change to take effect.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Done. The DOCKER.md production section now covers the full deployment flow from a fresh server. The short version:
|
||||
|
||||
|
||||
# Once per server
|
||||
docker network create traefik-proxy
|
||||
|
||||
# Clone & configure
|
||||
git clone <repo> rentaldrivego && cd rentaldrivego
|
||||
cp .env.docker.production.example .env.docker.production
|
||||
# → fill in POSTGRES_PASSWORD, JWT_SECRET, ACME_EMAIL, RESEND_API_KEY
|
||||
|
||||
# Deploy
|
||||
docker compose -f traefik.yaml up -d
|
||||
docker compose -p rentaldrivego-prod --env-file .env.docker.production -f docker-compose.production.yml up --build -d
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
Deploy dev
|
||||
|
||||
Option A — Docker (recommended, full stack)
|
||||
|
||||
# First time or after dependency changes:
|
||||
docker compose -f docker-compose.dev.yml build
|
||||
|
||||
# Start everything (api + all frontend apps + postgres + redis):
|
||||
docker compose -f docker-compose.dev.yml --profile full up
|
||||
|
||||
# Or start only what you need (mix and match profiles):
|
||||
docker compose -f docker-compose.dev.yml --profile api up # api only
|
||||
docker compose -f docker-compose.dev.yml --profile api --profile dashboard up
|
||||
|
||||
First run seeds the database automatically; subsequent runs skip seeding.
|
||||
|
||||
Option B — Local (no Docker for apps)
|
||||
|
||||
# Start infra only:
|
||||
docker compose -f docker-compose.dev.yml up postgres redis
|
||||
|
||||
# Then in a separate terminal:
|
||||
npm run dev # starts all apps via turbo
|
||||
|
||||
Port map (after port reassignment)
|
||||
|
||||
┌─────────────┬───────────────────────────────────────────────┐
|
||||
│ App │ URL │
|
||||
├─────────────┼───────────────────────────────────────────────┤
|
||||
│ public-site │ http://localhost:3000 │
|
||||
├─────────────┼───────────────────────────────────────────────┤
|
||||
│ marketplace │ http://localhost:3001/marketplace │
|
||||
├─────────────┼───────────────────────────────────────────────┤
|
||||
│ dashboard │ http://localhost:3002/dashboard │
|
||||
├─────────────┼───────────────────────────────────────────────┤
|
||||
│ admin │ http://localhost:3003/admin │
|
||||
├─────────────┼───────────────────────────────────────────────┤
|
||||
│ api │ http://localhost:4000 │
|
||||
├─────────────┼───────────────────────────────────────────────┤
|
||||
│ pgAdmin │ http://localhost:5050 (needs --profile tools) │
|
||||
└─────────────┴───────────────────────────────────────────────┘
|
||||
|
||||
▎ Note: In Docker dev each app is directly accessible on its own port. The /marketplace, /dashboard, /admin proxy
|
||||
▎ through port 3000 (public-site) only works when running locally (not in separate containers), since localhost inside
|
||||
▎ a container refers to that container only.
|
||||
@@ -0,0 +1,101 @@
|
||||
APP_NAME=Alrahma_API
|
||||
APP_ENV=production
|
||||
APP_KEY=base64:RfIZKqgXC9seghl2Jqs2MgLh1X1Z7APRsnhUK8CgWx8=
|
||||
APP_DEBUG=true
|
||||
APP_TIMEZONE=America/New_York
|
||||
APP_URL=https://api.alrahmaisgl.org
|
||||
|
||||
APP_LOCALE=en
|
||||
APP_FALLBACK_LOCALE=en
|
||||
APP_FAKER_LOCALE=en_US
|
||||
|
||||
APP_MAINTENANCE_DRIVER=file
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_LEVEL=info
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
|
||||
# ----------------------------
|
||||
# DATABASE
|
||||
# ----------------------------
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=localhost
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=u280815660_api
|
||||
DB_USERNAME=u280815660_apitest
|
||||
DB_PASSWORD="uP98sipbT;"
|
||||
|
||||
# ----------------------------
|
||||
# SESSION
|
||||
# ----------------------------
|
||||
SESSION_DRIVER=cookie
|
||||
SESSION_LIFETIME=120
|
||||
SESSION_ENCRYPT=false
|
||||
SESSION_PATH=/
|
||||
SESSION_DOMAIN=null
|
||||
|
||||
# ----------------------------
|
||||
# CACHE & QUEUE
|
||||
# ----------------------------
|
||||
CACHE_STORE=file
|
||||
QUEUE_CONNECTION=sync
|
||||
|
||||
# ----------------------------
|
||||
# REDIS (if needed later)
|
||||
# ----------------------------
|
||||
REDIS_CLIENT=phpredis
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
# ----------------------------
|
||||
# MAIL
|
||||
# ----------------------------
|
||||
MAIL_MAILER=log
|
||||
MAIL_PROFILE_DEFAULT=default
|
||||
MAIL_DEFAULT_HOST=127.0.0.1
|
||||
MAIL_DEFAULT_PORT=2525
|
||||
MAIL_DEFAULT_USER=
|
||||
MAIL_DEFAULT_PASS=
|
||||
MAIL_DEFAULT_ENCRYPTION=tls
|
||||
MAIL_DEFAULT_FROM_EMAIL="no-reply@alrahmaisgl.org"
|
||||
MAIL_DEFAULT_FROM_NAME="Alrahma API"
|
||||
MAIL_DEFAULT_REPLY_TO="no-reply@alrahmaisgl.org"
|
||||
MAIL_DEFAULT_REPLY_TO_NAME="Alrahma API"
|
||||
MAIL_SENDERS='{"general":{"name":"Alrahma API","email":"no-reply@alrahmaisgl.org"},"communication":{"name":"School Communications","email":"no-reply@alrahmaisgl.org"},"payment":{"name":"School Payments","email":"no-reply@alrahmaisgl.org"}}'
|
||||
|
||||
# Laravel mailer compatibility
|
||||
MAIL_HOST="${MAIL_DEFAULT_HOST}"
|
||||
MAIL_PORT="${MAIL_DEFAULT_PORT}"
|
||||
MAIL_USERNAME="${MAIL_DEFAULT_USER}"
|
||||
MAIL_PASSWORD="${MAIL_DEFAULT_PASS}"
|
||||
MAIL_ENCRYPTION="${MAIL_DEFAULT_ENCRYPTION}"
|
||||
MAIL_FROM_ADDRESS="${MAIL_DEFAULT_FROM_EMAIL}"
|
||||
MAIL_FROM_NAME="${MAIL_DEFAULT_FROM_NAME}"
|
||||
|
||||
# Legacy fallback keys still read by some services
|
||||
SMTP_HOST="${MAIL_DEFAULT_HOST}"
|
||||
SMTP_USER="${MAIL_DEFAULT_USER}"
|
||||
SMTP_PASS="${MAIL_DEFAULT_PASS}"
|
||||
SMTP_PORT="${MAIL_DEFAULT_PORT}"
|
||||
SMTP_ENCRYPTION="${MAIL_DEFAULT_ENCRYPTION}"
|
||||
|
||||
# ----------------------------
|
||||
# AWS STORAGE (optional)
|
||||
# ----------------------------
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
# ----------------------------
|
||||
# FRONT-END
|
||||
# ----------------------------
|
||||
VITE_APP_NAME="${APP_NAME}"
|
||||
|
||||
# ----------------------------
|
||||
# JWT
|
||||
# ----------------------------
|
||||
JWT_SECRET=Uj8rGnYcXMgeRc5qCIn9Wn03tYo1pCsBz1Biou8T9zWtaNxBYi3P4NP5vuFiXHmd
|
||||
JWT_ALGO=HS256
|
||||
Binary file not shown.
+4245
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user