Mechanic's work place
Some checks failed
ci / test (push) Has been cancelled

This commit is contained in:
VPN SaaS Dev
2026-05-16 10:04:56 +09:00
parent fec9635079
commit 83ad880b9d
39 changed files with 2951 additions and 74 deletions

View File

@@ -1,6 +1,7 @@
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-drivers}
POSTGRES_USER: ${POSTGRES_USER:-drivers}
@@ -14,9 +15,28 @@ services:
interval: 5s
timeout: 3s
retries: 10
logging: &default-logging
driver: json-file
options:
max-size: "10m"
max-file: "5"
redis:
image: redis:7-alpine
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redisdata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
logging: *default-logging
api:
build: .
restart: unless-stopped
command: sh -c "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000"
env_file:
- path: .env
@@ -36,14 +56,27 @@ services:
OCR_LANGUAGES: ${OCR_LANGUAGES:-eng+rus+kor}
LLM_BASE_URL: ${LLM_BASE_URL:-}
LLM_MODEL: ${LLM_MODEL:-}
REDIS_URL: ${REDIS_URL:-redis://redis:6379/0}
SECRET_KEY: ${SECRET_KEY:-}
VAPID_PUBLIC_KEY: ${VAPID_PUBLIC_KEY:-}
VAPID_PRIVATE_KEY: ${VAPID_PRIVATE_KEY:-}
ports:
- "127.0.0.1:8000:8000"
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/ready', timeout=3).read()\""]
interval: 10s
timeout: 5s
retries: 12
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
logging: *default-logging
bot:
build: .
restart: unless-stopped
command: python -m bot.main
env_file:
- path: .env
@@ -60,8 +93,13 @@ services:
OCR_LANGUAGES: ${OCR_LANGUAGES:-eng+rus+kor}
LLM_BASE_URL: ${LLM_BASE_URL:-}
LLM_MODEL: ${LLM_MODEL:-}
REDIS_URL: ${REDIS_URL:-redis://redis:6379/0}
SECRET_KEY: ${SECRET_KEY:-}
depends_on:
- api
api:
condition: service_healthy
logging: *default-logging
volumes:
pgdata:
redisdata: