mirror of
https://github.com/johndoe6345789/docker-swarm-termina.git
synced 2026-04-24 13:45:01 +00:00
- Update backend Dockerfile with multi-stage build that runs pytest with coverage (70% threshold) before production build - Update frontend Dockerfile with multi-stage build including: - Unit test stage with Jest coverage - E2E test stage with Playwright - Production stage depends on test stages via markers - Add Playwright e2e tests for login, dashboard, and terminal flows - Configure Playwright with chromium browser - Update jest.config.js to exclude e2e directory - Update docker-compose.yml to target production stage https://claude.ai/code/session_01XSQJybTpvKyN7td4Y8n5Rm
32 lines
651 B
YAML
32 lines
651 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
target: production
|
|
ports:
|
|
- "5000:5000"
|
|
environment:
|
|
- ADMIN_USERNAME=admin
|
|
- ADMIN_PASSWORD=admin123
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
target: production
|
|
args:
|
|
- NEXT_PUBLIC_API_URL=http://localhost:5000
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- NEXT_PUBLIC_API_URL=http://backend:5000
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|