auth service created

This commit is contained in:
A'zamov Samandar
2025-04-19 14:58:55 +05:00
parent a4b5833bbe
commit dd0da49eb9
127 changed files with 67 additions and 43 deletions

View File

@@ -7,16 +7,35 @@ volumes:
pycache: null
services:
auth-nginx:
traefik:
image: traefik:v2.10
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
- "--providers.docker.exposedbydefault=false"
ports:
- "80:80"
- "8080:8080" # Dashboard uchun
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- lamenu
auth-nginx:
labels:
- "traefik.enable=true"
- "traefik.http.routers.auth.rule=PathPrefix(`/auth`)"
- "traefik.http.routers.auth.entrypoints=web"
- "traefik.http.services.auth.loadbalancer.server.port=80"
- "traefik.http.middlewares.auth-strip-prefix.stripPrefix.prefixes=/auth"
- "traefik.http.routers.auth.middlewares=auth-strip-prefix"
networks:
- lamenu
ports:
- ${PORT:-8001}:80
volumes:
- ./auth/resources/layout/nginx.conf:/etc/nginx/nginx.conf
- ./auth/resources/:/usr/share/nginx/html/resources/
- ./services/auth/resources/layout/nginx.conf:/etc/nginx/nginx.conf
- ./services/auth/resources/:/usr/share/nginx/html/resources/
build:
context: ./auth
context: ./services/auth
dockerfile: ./docker/Dockerfile.nginx
depends_on:
- auth
@@ -24,14 +43,15 @@ services:
networks:
- lamenu
build:
context: ./auth
context: ./services/auth
dockerfile: ./docker/Dockerfile.web
restart: always
command: ${AUTH_COMMAND:-sh ./resources/scripts/entrypoint.sh}
environment:
- PYTHONPYCACHEPREFIX=/var/cache/pycache
- JWT_KEY=${JWT_KEY}
volumes:
- ./auth:/code
- ./services/auth:/code
- pycache:/var/cache/pycache
depends_on:
- auth-db
@@ -51,4 +71,4 @@ services:
networks:
- lamenu
restart: always
image: redis
image: redis