Skip to content

Configurados Contenedores para Prometheus y Grafana #47

Configurados Contenedores para Prometheus y Grafana

Configurados Contenedores para Prometheus y Grafana #47

Workflow file for this run

version: '3'
services:
mongodb:
container_name: mongodb-${teamname:-wiq5a}
image: mongo
profiles: ["dev", "prod"]
volumes:
- mongodb_data:/data/db
ports:
- "27017:27017"
networks:
- mynetwork
questionservice:
container_name: questionservice-${teamname:-wiq5a}
image: ghcr.io/arquisoft/wiq_5a/questionservice:latest
profiles: ["dev", "prod"]
build: ./questionservice
ports:
- "8003:8003"
environment:
- ACCESS_CONTROL_ALLOW_ORIGIN=http://webapp:3000
- ACCESS_CONTROL_ALLOW_ORIGIN=http://localhost:3000/game
networks:
- mynetwork
authservice:
container_name: authservice-${teamname:-wiq5a}
image: ghcr.io/arquisoft/wiq_5a/authservice:latest
profiles: ["dev", "prod"]
build: ./userservice/authservice
depends_on:
- mongodb
ports:
- "8002:8002"
networks:
- mynetwork
environment:
MONGODB_URI: mongodb://mongodb:27017/userdb
userservice:
container_name: userservice-${teamname:-wiq5a}
image: ghcr.io/arquisoft/wiq_5a/userservice:latest
profiles: ["dev", "prod"]
build: ./userservice/userservice
depends_on:
- mongodb
ports:
- "8001:8001"
networks:
- mynetwork
environment:
MONGODB_URI: mongodb://mongodb:27017/userdb
gatewayservice:
container_name: gatewayservice-${teamname:-wiq5a}
image: ghcr.io/arquisoft/wiq_5a/gatewayservice:latest
profiles: ["dev", "prod"]
build: ./gatewayservice
depends_on:
- mongodb
- userservice
- authservice
- questionservice
ports:
- "8000:8000"
networks:
- mynetwork
environment:
AUTH_SERVICE_URL: http://authservice:8002
USER_SERVICE_URL: http://userservice:8001
QUESTION_SERVICE_URL: http://questionservice:8003
webapp:
container_name: webapp-${teamname:-wiq5a}
image: ghcr.io/arquisoft/wiq_5a/webapp:latest
profiles: ["dev", "prod"]
build: ./webapp
depends_on:
- gatewayservice
ports:
- "3000:3000"
prometheus:
image: ghcr.io/arquisoft/wiq_5a/prometheus:latest
container_name: prometheus-${teamname:-wiq5a}
build: ./monitoring/prometheus
profiles: ["dev", "prod"]
networks:
- mynetwork
volumes:
- prometheus_data:/prometheus
ports:
- "9090:9090"
depends_on:
- gatewayservice
grafana:
image: ghcr.io/arquisoft/wiq_5a/grafana:latest
container_name: grafana-${teamname:-wiq5a}
build: ./monitoring/grafana
profiles: ["dev", "prod"]
networks:
- mynetwork
volumes:
- grafana_data:/var/lib/grafana
environment:
- GF_SERVER_HTTP_PORT=9091
- GF_SECURITY_ADMIN_USER=${GF_SECURITY_ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD:-changeme}
- GF_SERVER_SERVE_FROM_SUB_PATH=${GF_SERVER_SERVE_FROM_SUB_PATH:-true}
ports:
- "9091:9091"
depends_on:
- prometheus
volumes:
mongodb_data:
prometheus_data:
grafana_data:
networks:
mynetwork:
driver: bridge