Initial commit
This commit is contained in:
55
docker-compose.yml
Normal file
55
docker-compose.yml
Normal 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:
|
||||
Reference in New Issue
Block a user