fix(deploy): use non-avx mongo image by default

This commit is contained in:
2026-07-14 11:12:10 +03:30
parent dd8c21d808
commit 4db53f89d0
4 changed files with 6 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
APP_ENV=local APP_ENV=local
MONGO_IMAGE=mongo:4.4.29-focal
MONGO_URI=mongodb://localhost:27017 MONGO_URI=mongodb://localhost:27017
MONGO_DB_NAME=gapido_auth MONGO_DB_NAME=gapido_auth
REDIS_URL=redis://localhost:6379/0 REDIS_URL=redis://localhost:6379/0

View File

@@ -1,4 +1,5 @@
APP_ENV=production APP_ENV=production
MONGO_IMAGE=mongo:4.4.29-focal
MONGO_DB_NAME=gapido_auth MONGO_DB_NAME=gapido_auth
JWT_SECRET_KEY=replace-with-a-long-random-production-secret JWT_SECRET_KEY=replace-with-a-long-random-production-secret
JWT_ISSUER=gapido-auth JWT_ISSUER=gapido-auth
@@ -21,4 +22,3 @@ DEMO_ENABLE_DEBUG_OTP=false
DEMO_DEBUG_SMS_TTL_SECONDS=300 DEMO_DEBUG_SMS_TTL_SECONDS=300
GRPC_HOST=0.0.0.0 GRPC_HOST=0.0.0.0
GRPC_PORT=50051 GRPC_PORT=50051

View File

@@ -37,6 +37,8 @@ Before running production, set real values in `.env.production`:
Only ports `80` and `443` are published in the production Compose overlay. MongoDB, Redis, RabbitMQ, gRPC, and the FastAPI demo service stay private on the Docker network. Only ports `80` and `443` are published in the production Compose overlay. MongoDB, Redis, RabbitMQ, gRPC, and the FastAPI demo service stay private on the Docker network.
The Compose default uses `MONGO_IMAGE=mongo:4.4.29-focal` because MongoDB 5.0+ requires AVX CPU support. On newer hosts you can override it with a newer MongoDB image, for example `MONGO_IMAGE=mongo:7`.
## SMS Provider ## SMS Provider
The SMS integration uses the Strategy pattern behind the `SmsClient` port. Select the provider with: The SMS integration uses the Strategy pattern behind the `SmsClient` port. Select the provider with:

View File

@@ -77,11 +77,11 @@ services:
condition: service_healthy condition: service_healthy
mongo: mongo:
image: mongo:7 image: ${MONGO_IMAGE:-mongo:4.4.29-focal}
volumes: volumes:
- mongo-data:/data/db - mongo-data:/data/db
healthcheck: healthcheck:
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping').ok"] test: ["CMD-SHELL", "mongosh --quiet --eval \"db.adminCommand('ping').ok\" || mongo --quiet --eval \"db.adminCommand('ping').ok\""]
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 20 retries: 20