fix: Cấu hình thủ công Traefik và cập nhật phiên bản để khắc phục sự cố Docker provider cục bộ.

This commit is contained in:
Ho Ngoc Hai
2026-01-04 14:52:30 +07:00
parent e3cc83b73d
commit 96dc13c38a
3 changed files with 30 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
# Bypass Traefik due to Docker provider error
NEXT_PUBLIC_API_URL=http://localhost/api/v1

View File

@@ -48,12 +48,13 @@ services:
# Traefik - API Gateway and Reverse Proxy
traefik:
image: traefik:v2.10
image: traefik:v3.3
container_name: traefik-local
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=goodgo-network"
- "--providers.file.directory=/etc/traefik/dynamic"
- "--providers.file.watch=true"
- "--entrypoints.web.address=:80"
@@ -63,7 +64,9 @@ services:
- "80:80" # HTTP
- "8080:8080" # Dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
# EN: Use actual Docker Desktop socket path (not symlink)
# VI: Sử dụng đường dẫn socket thực của Docker Desktop (không phải symlink)
- ${HOME}/.docker/run/docker.sock:/var/run/docker.sock:ro
- ../../infra/traefik:/etc/traefik:ro
networks:
- microservices-network

View File

@@ -0,0 +1,23 @@
# EN: Static route configuration for IAM Service
# VI: Cấu hình route tĩnh cho IAM Service
#
# This file defines routes manually because Docker provider is not working
# Đây là file định nghĩa routes thủ công vì Docker provider không hoạt động
http:
routers:
iam-service:
rule: "PathPrefix(`/api/v1/auth`) || PathPrefix(`/api/v1/users`) || PathPrefix(`/api/v1/identity`) || PathPrefix(`/api/v1/access`) || PathPrefix(`/api/v1/governance`) || PathPrefix(`/api/v1/rbac`) || PathPrefix(`/api/v1/mfa`) || PathPrefix(`/api/v1/sessions`)"
service: iam-service
entryPoints:
- web
services:
iam-service:
loadBalancer:
servers:
- url: "http://iam-service:5001"
healthCheck:
path: "/health"
interval: "10s"
timeout: "3s"