Add CP→CA→PI platform foundation on MapMil monorepo.
Unify parsing workers, analytics API with PostgreSQL, map UI, and PI distribution into centers/ with Docker Compose. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
services:
|
||||
ca-db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_USER: mapmil
|
||||
POSTGRES_PASSWORD: mapmil
|
||||
POSTGRES_DB: mapmil
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U mapmil -d mapmil"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
restart: unless-stopped
|
||||
|
||||
ca-api:
|
||||
build: ./centers/analytics/api
|
||||
environment:
|
||||
DATABASE_URL: postgresql://mapmil:mapmil@ca-db:5432/mapmil
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
INTERNAL_TOKEN: dev-internal-token
|
||||
TEST_PI_API_KEY: test-pi-api-key-change-me
|
||||
volumes:
|
||||
- ca_uploads:/data
|
||||
depends_on:
|
||||
ca-db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
|
||||
ca-frontend:
|
||||
build: ./centers/analytics/frontend
|
||||
ports:
|
||||
- "8080:80"
|
||||
depends_on:
|
||||
- ca-api
|
||||
restart: unless-stopped
|
||||
|
||||
cp-workers:
|
||||
build: ./centers/parsing/workers
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
TELEGRAM_SESSION_PATH: /data/telegram.session
|
||||
CA_API_URL: http://ca-api:8000
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
INTERNAL_TOKEN: dev-internal-token
|
||||
volumes:
|
||||
# Mount original session from SocialParser (preserved, read-only)
|
||||
- ../SocialParser/data/telegram.session:/data/telegram.session:ro
|
||||
depends_on:
|
||||
- redis
|
||||
- ca-api
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
ca_uploads:
|
||||
Reference in New Issue
Block a user