feat(cicd): added redis
This commit is contained in:
parent
54c45ac3bc
commit
6955216568
2 changed files with 22 additions and 4 deletions
|
|
@ -40,6 +40,22 @@ services:
|
|||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
redis:
|
||||
image: redis:8.4.0-alpine
|
||||
container_name: redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
restart: always
|
||||
command: ["redis-server", "--appendonly", "yes"]
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 5s
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
|
||||
nyanimedb-backend:
|
||||
image: meowgit.nekoea.red/nihonium/nyanimedb-backend:latest
|
||||
container_name: nyanimedb-backend
|
||||
|
|
@ -51,8 +67,8 @@ services:
|
|||
RABBITMQ_URL: ${RABBITMQ_URL}
|
||||
JWT_PRIVATE_KEY: ${JWT_PRIVATE_KEY}
|
||||
AUTH_ENABLED: ${AUTH_ENABLED}
|
||||
ports:
|
||||
- "8080:8080"
|
||||
# ports:
|
||||
# - "8080:8080"
|
||||
depends_on:
|
||||
- postgres
|
||||
- rabbitmq
|
||||
|
|
@ -68,8 +84,8 @@ services:
|
|||
DATABASE_URL: ${DATABASE_URL}
|
||||
SERVICE_ADDRESS: ${SERVICE_ADDRESS}
|
||||
JWT_PRIVATE_KEY: ${JWT_PRIVATE_KEY}
|
||||
ports:
|
||||
- "8082:8082"
|
||||
# ports:
|
||||
# - "8082:8082"
|
||||
depends_on:
|
||||
- postgres
|
||||
networks:
|
||||
|
|
@ -89,6 +105,7 @@ services:
|
|||
volumes:
|
||||
postgres_data:
|
||||
rabbitmq_data:
|
||||
redis_data:
|
||||
|
||||
networks:
|
||||
nyanimedb-network:
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ func (s Server) GetImpersonationToken(ctx context.Context, req auth.GetImpersona
|
|||
}
|
||||
|
||||
if req.Body.UserId != nil {
|
||||
// TODO: check user existence
|
||||
if user_id != "" && user_id != fmt.Sprintf("%d", *req.Body.UserId) {
|
||||
log.Error("user_id and external_d are incorrect")
|
||||
// TODO: 405
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue