- Added package.json for project dependencies and scripts. - Configured PostCSS with Tailwind CSS. - Created main application structure with App component and routing. - Implemented API client for handling requests with Axios. - Developed authentication API for login, logout, and user verification. - Created entities API for managing virtual entities. - Implemented logs API for fetching dispatch logs. - Added navigation bar component for app navigation. - Created protected route component for route guarding. - Set up global CSS with Tailwind directives. - Configured main entry point for React application. - Developed basic Dashboard and Login pages. - Set up router for application navigation. - Added Jest testing setup for testing library. - Configured Tailwind CSS with content paths. - Set TypeScript configuration for frontend. - Created Vite configuration for development and production builds. - Added Nginx configuration for serving the application and proxying API requests.
81 lines
2.6 KiB
YAML
81 lines
2.6 KiB
YAML
services:
|
|
|
|
# ── PostgreSQL ───────────────────────────────────────────────────────────────
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: condado
|
|
POSTGRES_USER: ${SPRING_DATASOURCE_USERNAME}
|
|
POSTGRES_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
networks:
|
|
- condado-net
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${SPRING_DATASOURCE_USERNAME} -d condado"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# ── Backend (Spring Boot) ────────────────────────────────────────────────────
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
SPRING_PROFILES_ACTIVE: dev
|
|
SPRING_DATASOURCE_URL: ${SPRING_DATASOURCE_URL}
|
|
SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME}
|
|
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
|
|
APP_PASSWORD: ${APP_PASSWORD}
|
|
JWT_SECRET: ${JWT_SECRET}
|
|
JWT_EXPIRATION_MS: ${JWT_EXPIRATION_MS}
|
|
MAIL_HOST: ${MAIL_HOST}
|
|
MAIL_PORT: ${MAIL_PORT}
|
|
MAIL_USERNAME: ${MAIL_USERNAME}
|
|
MAIL_PASSWORD: ${MAIL_PASSWORD}
|
|
IMAP_HOST: ${IMAP_HOST}
|
|
IMAP_PORT: ${IMAP_PORT}
|
|
IMAP_INBOX_FOLDER: ${IMAP_INBOX_FOLDER}
|
|
OPENAI_API_KEY: ${OPENAI_API_KEY}
|
|
OPENAI_MODEL: ${OPENAI_MODEL}
|
|
APP_RECIPIENTS: ${APP_RECIPIENTS}
|
|
networks:
|
|
- condado-net
|
|
|
|
# ── Frontend + Nginx ─────────────────────────────────────────────────────────
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
args:
|
|
VITE_API_BASE_URL: ${VITE_API_BASE_URL}
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- condado-net
|
|
|
|
# ── Mailhog (DEV ONLY — SMTP trap) ───────────────────────────────────────────
|
|
mailhog:
|
|
image: mailhog/mailhog:latest
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8025:8025"
|
|
networks:
|
|
- condado-net
|
|
|
|
volumes:
|
|
postgres-data:
|
|
|
|
networks:
|
|
condado-net:
|
|
driver: bridge
|