feat: implement JWT authentication and scope validation middleware
Some checks failed
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 3m4s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 2m54s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 3m18s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 3m8s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Failing after 3m10s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Failing after 1m36s

This commit is contained in:
2025-11-07 10:58:33 -05:00
parent 54ea22c49a
commit d10ad2065c
12 changed files with 430 additions and 10 deletions

View File

@@ -4,6 +4,31 @@ volumes:
services:
traefik:
image: traefik:latest
container_name: traefik
healthcheck:
test: ["CMD", "traefik", "healthcheck", "--ping"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
restart: always
command:
- "--providers.docker=true"
- "--ping"
- "--providers.docker.exposedByDefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.web-secure.address=:443"
- "--accesslog=true"
- "--entrypoints.web.http.redirections.entryPoint.to=web-secure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"
composer-runtime:
volumes:
- .:/app
@@ -31,19 +56,29 @@ services:
DB_PORT: ${DB_PORT-5432}
dev-runtime:
ports:
- "9501:9501"
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.entrypoints=web-secure"
- "traefik.http.routers.api.rule=Host(`localhost`) || Host(`127.0.0.1`)"
- "traefik.http.routers.api.tls=true"
volumes:
- .:/app
build:
context: .
dockerfile: Dockerfile
entrypoint: "/bin/sh -c 'while true; do sleep 30; done;'"
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
environment:
PHP_IDE_CONFIG: serverName=localhost
WORKERS: 1
DEBUG: 1
REDIS_HOST: redis
POSTGRES_HOST: postgres
JWT_SIGNING_KEY: a-string-secret-at-least-256-bits-long
redis:
image: redis:latest
@@ -58,7 +93,7 @@ services:
- redisdata:/data
postgres:
image: postgres:latest
image: postgres:18
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME:-siteworxpro}"]
interval: 10s
@@ -71,4 +106,4 @@ services:
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
- pgdata:/var/lib/postgresql