Files
InvestPlay/docker-compose.portainer.yml
Lefteris Notas e75f913f1c
Some checks failed
CI / Lint (push) Has been cancelled
CI / TypeCheck (push) Has been cancelled
CI / Test (push) Has been cancelled
Deploy / Docker Build & Push (map[context:. dockerfile:apps/api/Dockerfile name:api]) (push) Has been cancelled
Deploy / Docker Build & Push (map[context:. dockerfile:apps/cms/Dockerfile name:cms]) (push) Has been cancelled
Deploy / Docker Build & Push (map[context:. dockerfile:apps/web/Dockerfile name:web]) (push) Has been cancelled
CI / Build (push) Has been cancelled
Deploy / Deploy (push) Has been cancelled
feat: complete Phase 1 foundation scaffold
- Monorepo: Turborepo + pnpm workspaces with 7 apps/packages
- Backend: NestJS scaffold with 9 modules (auth, tenant, curriculum, simulation, portfolio, ai-coach, analytics, classroom, gamification)
- Frontend: React 18 + Vite + TailwindCSS + shadcn/ui with 10 pages, 14 UI primitives, 3 Zustand stores
- Database: Prisma schema with 19 models, 13 enums, seed script, multi-tenant ready
- Docker: Dev, production, and Portainer Compose files with Traefik reverse proxy
- Configuration: .env.example (47 vars), Zod validation, frontend-safe env exposure
- i18n: English + Greek locale files (10 files), ICU MessageFormat, react-i18next
- Shared packages: @investplay/types, @investplay/ui, @investplay/i18n, @investplay/utils
- CI/CD: GitHub Actions (lint, typecheck, test, build, deploy, PR checks)
- Documentation: CONTEXT.md, ARCHITECTURE.md (10 Mermaid diagrams), API.md, LOCALIZATION.md, DEVELOPMENT-ROADMAP.md
- Infrastructure: Dockerfiles (dev + prod), nginx configs, backup/healthcheck scripts
- Security: JWT auth guards, role-based access, rate limiting, Helmet, CORS, PII sanitization
2026-06-12 19:32:57 +03:00

237 lines
5.0 KiB
YAML

name: investplay
services:
postgres:
image: postgres:16-alpine
container_name: investplay-postgres
restart: always
expose:
- "5432"
volumes:
- pgdata:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-investplay}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB:-investplay}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
deploy:
resources:
limits:
memory: 512M
cpus: "1.0"
reservations:
memory: 256M
cpus: "0.5"
networks:
- investplay
redis:
image: redis:7-alpine
container_name: investplay-redis
restart: always
expose:
- "6379"
volumes:
- redis-data:/data
command: redis-server --appendonly yes --loglevel warning
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
deploy:
resources:
limits:
memory: 256M
cpus: "0.5"
reservations:
memory: 128M
cpus: "0.25"
networks:
- investplay
minio:
image: minio/minio:latest
container_name: investplay-minio
restart: always
expose:
- "9000"
- "9001"
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-data:/data
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
command: server /data --console-address :9001
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
deploy:
resources:
limits:
memory: 512M
cpus: "1.0"
reservations:
memory: 256M
cpus: "0.5"
networks:
- investplay
api:
build:
context: .
dockerfile: apps/api/Dockerfile
container_name: investplay-api
restart: always
expose:
- "3001"
ports:
- "3001:3001"
environment:
NODE_ENV: production
DATABASE_URL: ${DATABASE_URL}
REDIS_URL: ${REDIS_URL}
MINIO_ENDPOINT: minio
MINIO_PORT: 9000
MINIO_USE_SSL: false
JWT_SECRET: ${JWT_SECRET}
PORT: 3001
env_file:
- .env.production
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001/health"]
interval: 30s
timeout: 10s
start_period: 40s
retries: 3
deploy:
resources:
limits:
memory: 512M
cpus: "1.0"
reservations:
memory: 256M
cpus: "0.5"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
minio:
condition: service_healthy
networks:
- investplay
web:
build:
context: .
dockerfile: apps/web/Dockerfile
container_name: investplay-web
restart: always
expose:
- "80"
ports:
- "80:80"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80/"]
interval: 30s
timeout: 10s
start_period: 10s
retries: 3
deploy:
resources:
limits:
memory: 256M
cpus: "0.5"
reservations:
memory: 128M
cpus: "0.25"
depends_on:
- api
networks:
- investplay
cms:
build:
context: .
dockerfile: apps/cms/Dockerfile
container_name: investplay-cms
restart: always
expose:
- "3000"
ports:
- "3000:3000"
environment:
NODE_ENV: production
DATABASE_URL: ${CMS_DATABASE_URL}
PAYLOAD_SECRET: ${PAYLOAD_SECRET}
PORT: 3000
env_file:
- .env.production
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
start_period: 30s
retries: 3
deploy:
resources:
limits:
memory: 512M
cpus: "1.0"
reservations:
memory: 256M
cpus: "0.5"
depends_on:
postgres:
condition: service_healthy
networks:
- investplay
portainer-agent:
image: portainer/agent:latest
container_name: investplay-portainer-agent
restart: always
ports:
- "9001:9001"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- portainer-agent-data:/data
deploy:
resources:
limits:
memory: 128M
cpus: "0.25"
reservations:
memory: 64M
cpus: "0.1"
networks:
- investplay
volumes:
pgdata:
name: investplay-pgdata
redis-data:
name: investplay-redis-data
minio-data:
name: investplay-minio-data
portainer-agent-data:
name: investplay-portainer-agent-data
networks:
investplay:
name: investplay
driver: bridge