AUTH_CMD to USER_CMD, updated workflows, Makefile, and docker-compose for user service

This commit is contained in:
A'zamov Samandar
2025-04-19 19:24:18 +05:00
parent 098dce9fdb
commit bc24faeedd
126 changed files with 30 additions and 32 deletions

View File

@@ -21,46 +21,46 @@ services:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- lamenu
auth-nginx:
user-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"
- "traefik.http.routers.user.rule=PathPrefix(`/user`)"
- "traefik.http.routers.user.entrypoints=web"
- "traefik.http.services.user.loadbalancer.server.port=80"
- "traefik.http.middlewares.user-strip-prefix.stripPrefix.prefixes=/user"
- "traefik.http.routers.user.middlewares=user-strip-prefix"
networks:
- lamenu
volumes:
- ./auth/resources/layout/nginx.conf:/etc/nginx/nginx.conf
- ./auth/resources/:/usr/share/nginx/html/resources/
- ./user/resources/layout/nginx.conf:/etc/nginx/nginx.conf
- ./user/resources/:/usr/share/nginx/html/resources/
build:
context: ./auth
context: ./user
dockerfile: ./docker/Dockerfile.nginx
depends_on:
- auth
- user
profiles:
- auth
auth:
- user
user:
networks:
- lamenu
build:
context: ./auth
context: ./user
dockerfile: ./docker/Dockerfile.web
restart: always
command: ${AUTH_COMMAND:-sh ./resources/scripts/entrypoint.sh}
command: ${user_COMMAND:-sh ./resources/scripts/entrypoint.sh}
environment:
- PYTHONPYCACHEPREFIX=/var/cache/pycache
- JWT_KEY=${JWT_KEY}
volumes:
- ./auth:/code
- ./user:/code
- pycache:/var/cache/pycache
depends_on:
- auth-db
- user-db
- redis
profiles:
- auth
auth-db:
- user
user-db:
networks:
- lamenu
image: postgres:16
@@ -72,7 +72,7 @@ services:
volumes:
- pg_data:/var/lib/postgresql/data
profiles:
- auth
- user
payment:
labels: