Initial commit

This commit is contained in:
2025-11-28 07:49:17 -03:00
commit d84803efc9
12 changed files with 2074 additions and 0 deletions

55
docker-compose.yml Normal file
View File

@@ -0,0 +1,55 @@
version: "3.8"
services:
dashboard:
build: .
container_name: telseg_dashboard
ports:
- "4242:80"
depends_on:
- api
restart: unless-stopped
db:
image: postgres:15-alpine
container_name: telseg_db
environment:
- POSTGRES_DB=${POSTGRES_DB:-telseg}
- POSTGRES_USER=${POSTGRES_USER:-telseg}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-telseg}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432" # opcional: expõe acesso ao host
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB:-telseg} -U ${POSTGRES_USER:-telseg}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
adminer:
image: adminer:latest
container_name: telseg_adminer
depends_on:
- db
environment:
- ADMINER_DEFAULT_SERVER=db
ports:
- "8081:8080"
restart: unless-stopped
api:
build: ./api
container_name: telseg_api
environment:
- DATABASE_URL=postgres://${POSTGRES_USER:-telseg}:${POSTGRES_PASSWORD:-telseg}@db:5432/${POSTGRES_DB:-telseg}
- PORT=3000
- JWT_SECRET=${JWT_SECRET:-change_this_secret}
- ADMIN_USER=${ADMIN_USER:-admin}
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin123}
depends_on:
- db
restart: unless-stopped
volumes:
pgdata: