Initial commit
This commit is contained in:
111
docker-compose.yml
Normal file
111
docker-compose.yml
Normal file
@@ -0,0 +1,111 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_USER: dcm
|
||||
POSTGRES_PASSWORD: dcm
|
||||
POSTGRES_DB: dcm
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U dcm -d dcm"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
|
||||
typesense:
|
||||
image: typesense/typesense:29.0
|
||||
command:
|
||||
- "--data-dir=/data"
|
||||
- "--api-key=dcm-typesense-key"
|
||||
- "--enable-cors"
|
||||
ports:
|
||||
- "8108:8108"
|
||||
volumes:
|
||||
- typesense-data:/data
|
||||
|
||||
api:
|
||||
build:
|
||||
context: ./backend
|
||||
environment:
|
||||
APP_ENV: development
|
||||
DATABASE_URL: postgresql+psycopg://dcm:dcm@db:5432/dcm
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
STORAGE_ROOT: /data/storage
|
||||
OCR_LANGUAGES: eng,deu
|
||||
PUBLIC_BASE_URL: http://192.168.2.5:8000
|
||||
CORS_ORIGINS: '["http://localhost:5173","http://localhost:3000","http://192.168.2.5:5173"]'
|
||||
TYPESENSE_PROTOCOL: http
|
||||
TYPESENSE_HOST: typesense
|
||||
TYPESENSE_PORT: 8108
|
||||
TYPESENSE_API_KEY: dcm-typesense-key
|
||||
TYPESENSE_COLLECTION_NAME: documents
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ./backend/app:/app/app
|
||||
- dcm-storage:/data
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
typesense:
|
||||
condition: service_started
|
||||
|
||||
worker:
|
||||
build:
|
||||
context: ./backend
|
||||
command: ["rq", "worker", "dcm", "--url", "redis://redis:6379/0"]
|
||||
environment:
|
||||
APP_ENV: development
|
||||
DATABASE_URL: postgresql+psycopg://dcm:dcm@db:5432/dcm
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
STORAGE_ROOT: /data/storage
|
||||
OCR_LANGUAGES: eng,deu
|
||||
PUBLIC_BASE_URL: http://localhost:8000
|
||||
TYPESENSE_PROTOCOL: http
|
||||
TYPESENSE_HOST: typesense
|
||||
TYPESENSE_PORT: 8108
|
||||
TYPESENSE_API_KEY: dcm-typesense-key
|
||||
TYPESENSE_COLLECTION_NAME: documents
|
||||
volumes:
|
||||
- ./backend/app:/app/app
|
||||
- dcm-storage:/data
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
typesense:
|
||||
condition: service_started
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
environment:
|
||||
VITE_API_BASE: http://192.168.2.5:8000/api/v1
|
||||
ports:
|
||||
- "5173:5173"
|
||||
volumes:
|
||||
- ./frontend/src:/app/src
|
||||
- ./frontend/index.html:/app/index.html
|
||||
- ./frontend/vite.config.ts:/app/vite.config.ts
|
||||
depends_on:
|
||||
api:
|
||||
condition: service_started
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
redis-data:
|
||||
dcm-storage:
|
||||
typesense-data:
|
||||
Reference in New Issue
Block a user