129 lines
3.2 KiB
YAML
129 lines
3.2 KiB
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: privacy-analyzer-app
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- NODE_ENV=local
|
|
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD:-changeme}@postgres:5432/privacy_analyzer
|
|
- REDIS_URL=redis://redis:6379
|
|
- MEILISEARCH_URL=http://meilisearch:7700
|
|
- MEILISEARCH_API_KEY=${MEILISEARCH_API_KEY:-master_key}
|
|
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
|
- OPENAI_MODEL=${OPENAI_MODEL:-gpt-4o}
|
|
- OLLAMA_URL=http://ollama:11434
|
|
- OLLAMA_MODEL=${OLLAMA_MODEL:-gpt-oss:latest}
|
|
- USE_OLLAMA=${USE_OLLAMA:-true}
|
|
- ADMIN_USERNAME=${ADMIN_USERNAME:-admin}
|
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-changeme}
|
|
- SESSION_SECRET=${SESSION_SECRET:-changeme}
|
|
- PORT=3000
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_started
|
|
meilisearch:
|
|
condition: service_started
|
|
ollama:
|
|
condition: service_started
|
|
volumes:
|
|
- ./src:/app/src
|
|
- ./migrations:/app/migrations
|
|
- ./public:/app/public
|
|
restart: unless-stopped
|
|
networks:
|
|
- privacy-analyzer-network
|
|
|
|
ollama:
|
|
image: ollama/ollama:latest
|
|
container_name: privacy-analyzer-ollama
|
|
ports:
|
|
- "11434:11434"
|
|
volumes:
|
|
- ollama_data:/root/.ollama
|
|
environment:
|
|
- OLLAMA_ORIGINS=*
|
|
- OLLAMA_HOST=0.0.0.0
|
|
entrypoint: >
|
|
sh -c "
|
|
ollama serve &
|
|
sleep 5
|
|
echo 'Pulling ${OLLAMA_MODEL:-gpt-oss:latest} model...'
|
|
ollama pull ${OLLAMA_MODEL:-gpt-oss:latest}
|
|
echo 'Model ready!'
|
|
wait
|
|
"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 60s
|
|
restart: unless-stopped
|
|
networks:
|
|
- privacy-analyzer-network
|
|
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: privacy-analyzer-postgres
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}
|
|
- POSTGRES_DB=privacy_analyzer
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
networks:
|
|
- privacy-analyzer-network
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: privacy-analyzer-redis
|
|
command: redis-server --appendonly yes
|
|
volumes:
|
|
- redis_data:/data
|
|
ports:
|
|
- "6379:6379"
|
|
restart: unless-stopped
|
|
networks:
|
|
- privacy-analyzer-network
|
|
|
|
meilisearch:
|
|
image: getmeili/meilisearch:v1.6
|
|
container_name: privacy-analyzer-meilisearch
|
|
environment:
|
|
- MEILI_MASTER_KEY=${MEILISEARCH_API_KEY:-master_key}
|
|
- MEILI_ENV=production
|
|
volumes:
|
|
- meilisearch_data:/meili_data
|
|
ports:
|
|
- "7700:7700"
|
|
restart: unless-stopped
|
|
networks:
|
|
- privacy-analyzer-network
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|
|
redis_data:
|
|
driver: local
|
|
meilisearch_data:
|
|
driver: local
|
|
ollama_data:
|
|
driver: local
|
|
|
|
networks:
|
|
privacy-analyzer-network:
|
|
driver: bridge
|