Initial commit: Plataforma de Economía
Features: - React 18 + TypeScript frontend with Vite - Go + Gin backend API - PostgreSQL database - JWT authentication with refresh tokens - User management (admin panel) - Docker containerization - Progress tracking system - 4 economic modules structure Fixed: - Login with username or email - User creation without required email - Database nullable timestamps - API response field naming
This commit is contained in:
55
docker-compose.yml
Normal file
55
docker-compose.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: econ-postgres
|
||||
environment:
|
||||
POSTGRES_USER: ${DB_USER:-econ_user}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD:-econ_pass}
|
||||
POSTGRES_DB: ${DB_NAME:-econ_db}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-econ_user} -d ${DB_NAME:-econ_db}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: econ-backend
|
||||
environment:
|
||||
DB_HOST: econ-postgres
|
||||
DB_PORT: 5432
|
||||
DB_USER: ${DB_USER:-econ_user}
|
||||
DB_PASSWORD: ${DB_PASSWORD:-econ_pass}
|
||||
DB_NAME: ${DB_NAME:-econ_db}
|
||||
JWT_SECRET: ${JWT_SECRET:-your-secret-key-change-in-production}
|
||||
SERVER_PORT: 8080
|
||||
ports:
|
||||
- "8080:8080"
|
||||
networks:
|
||||
- caddy
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
container_name: econ-frontend
|
||||
ports:
|
||||
- "3002:80"
|
||||
networks:
|
||||
- caddy
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
||||
networks:
|
||||
caddy:
|
||||
external: true
|
||||
Reference in New Issue
Block a user