feat: project scaffold (FastAPI backend, React frontend, aiogram bot, docker-compose, CI/CD)
This commit is contained in:
1 parent
066deaca47
commit
71460ab56a
37 files changed
+936
No files matched your search
@@ -0,0 +1,91 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-opora}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-opora}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-opora}
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-opora}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redisdata:/data
|
||||
|
||||
minio:
|
||||
image: minio/minio:latest
|
||||
restart: unless-stopped
|
||||
command: server /data --console-address ":9001"
|
||||
environment:
|
||||
MINIO_ROOT_USER: ${S3_ACCESS_KEY:-minio}
|
||||
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY:-minio123}
|
||||
volumes:
|
||||
- miniodata:/data
|
||||
|
||||
api:
|
||||
build: ./backend
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
expose:
|
||||
- "8000"
|
||||
|
||||
worker:
|
||||
build: ./backend
|
||||
restart: unless-stopped
|
||||
command: celery -A app.tasks.celery_app worker -l info
|
||||
env_file: .env
|
||||
depends_on:
|
||||
- redis
|
||||
- postgres
|
||||
|
||||
beat:
|
||||
build: ./backend
|
||||
restart: unless-stopped
|
||||
command: celery -A app.tasks.celery_app beat -l info
|
||||
env_file: .env
|
||||
depends_on:
|
||||
- redis
|
||||
|
||||
bot:
|
||||
build: ./bot
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
depends_on:
|
||||
- api
|
||||
|
||||
web:
|
||||
build: ./frontend
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "80"
|
||||
|
||||
nginx:
|
||||
image: nginx:1.27-alpine
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./deploy/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- ./deploy/certs:/etc/letsencrypt:ro
|
||||
depends_on:
|
||||
- api
|
||||
- web
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
redisdata:
|
||||
miniodata:
|
||||
Reference in new issue
Block a user