chore(deploy): add production caddy setup

This commit is contained in:
2026-07-14 10:43:12 +03:30
parent c122aab57c
commit e99060de41
13 changed files with 195 additions and 20 deletions

View File

@@ -21,8 +21,18 @@ services:
ADMIN_MOBILE: ${ADMIN_MOBILE:-989120000000}
GRPC_HOST: 0.0.0.0
GRPC_PORT: 50051
ports:
- "50051:50051"
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import grpc; from grpc_health.v1 import health_pb2, health_pb2_grpc; channel=grpc.insecure_channel('localhost:50051'); stub=health_pb2_grpc.HealthStub(channel); stub.Check(health_pb2.HealthCheckRequest(), timeout=3)",
]
interval: 10s
timeout: 5s
retries: 12
start_period: 20s
depends_on:
mongo:
condition: service_started
@@ -51,32 +61,31 @@ services:
environment:
AUTH_GRPC_TARGET: auth-service:50051
REDIS_URL: redis://redis:6379/0
DEMO_ENABLE_DEBUG_OTP: "true"
ports:
- "8080:8080"
DEMO_ENABLE_DEBUG_OTP: ${DEMO_ENABLE_DEBUG_OTP:-true}
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8080/healthz', timeout=3).read()"]
interval: 10s
timeout: 5s
retries: 12
start_period: 10s
depends_on:
auth-service:
condition: service_started
condition: service_healthy
redis:
condition: service_started
mongo:
image: mongo:7
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
redis:
image: redis:7-alpine
ports:
- "6379:6379"
rabbitmq:
image: rabbitmq:3.13-management-alpine
ports:
- "5672:5672"
- "15672:15672"
volumes:
- rabbitmq-data:/var/lib/rabbitmq
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "check_port_connectivity"]
interval: 5s
@@ -85,3 +94,4 @@ services:
volumes:
mongo-data:
rabbitmq-data: