-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
113 lines (106 loc) · 3.75 KB
/
Copy pathdocker-compose.yml
File metadata and controls
113 lines (106 loc) · 3.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
services:
postgres:
image: pgvector/pgvector:pg16
container_name: loopin-postgres
environment:
POSTGRES_DB: ${POSTGRES_DB:-loopin}
POSTGRES_USER: ${DATABASE_USERNAME:-loopin}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-loopin}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
redis:
image: redis:7-alpine
container_name: loopin-redis
command: ["redis-server", "--appendonly", "yes"]
ports:
- "${REDIS_PORT:-6379}:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
api:
build:
context: .
dockerfile: Dockerfile
container_name: loopin-api
env_file:
- path: .env
required: false
environment:
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-local}
SERVER_PORT: 8080
DATABASE_URL: jdbc:postgresql://postgres:5432/${POSTGRES_DB:-loopin}
DATABASE_USERNAME: ${DATABASE_USERNAME:-loopin}
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-loopin}
SPRING_DATA_REDIS_HOST: redis
SPRING_DATA_REDIS_PORT: 6379
RATE_LIMIT_STORAGE: ${RATE_LIMIT_STORAGE:-redis}
SPRING_LIQUIBASE_ENABLED: ${LIQUIBASE_ENABLED:-true}
SPRING_LIQUIBASE_CONTEXTS: ${LIQUIBASE_CONTEXTS:-local}
JWT_SECRET: ${JWT_SECRET:-replace_with_at_least_32_bytes_of_random_secret_material}
PROMETHEUS_SCRAPE_TOKEN: ${PROMETHEUS_SCRAPE_TOKEN:-}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-local-google-client-id}
CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS:-*}
# The local stack does not include loopin-ai. Enable only with an explicitly
# reachable service URL and a supplied LOOPIN_AI_SERVICE_TOKEN.
LOOPIN_AI_EMBEDDING_JOBS_ENABLED: ${LOOPIN_AI_EMBEDDING_JOBS_ENABLED:-false}
N8N_NOTIFICATIONS_ENABLED: ${N8N_NOTIFICATIONS_ENABLED:-false}
N8N_NOTIFICATION_WEBHOOK_URL: ${N8N_NOTIFICATION_WEBHOOK_URL:-http://n8n:5678/webhook/loopin-notifications}
N8N_NOTIFICATION_WEBHOOK_SECRET: ${N8N_NOTIFICATION_WEBHOOK_SECRET:-}
# Use the Docker service hostname for SDK requests, but keep presigned URLs
# reachable from a browser running on the host.
STORAGE_ENDPOINT: http://minio:9000
STORAGE_PRESIGN_ENDPOINT: http://localhost:${MINIO_API_PORT:-9000}
STORAGE_ACCESS_KEY: ${MINIO_ROOT_USER:-loopin-minio}
STORAGE_SECRET_KEY: ${MINIO_ROOT_PASSWORD:-loopin-minio-local-password}
ports:
- "${API_PORT:-8080}:8080"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
minio:
image: minio/minio:${MINIO_IMAGE_TAG:-latest}
container_name: loopin-minio
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-loopin-minio}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-loopin-minio-local-password}
ports:
- "${MINIO_API_PORT:-9000}:9000"
- "${MINIO_CONSOLE_PORT:-9001}:9001"
volumes:
- minio-data:/data
n8n:
image: n8nio/n8n:latest
container_name: loopin-n8n
environment:
N8N_HOST: 0.0.0.0
N8N_PORT: 5678
N8N_PROTOCOL: http
N8N_ENCRYPTION_KEY: ${N8N_ENCRYPTION_KEY:-replace_with_a_long_random_encryption_key}
WEBHOOK_URL: http://localhost:${N8N_PORT:-5678}/
GENERIC_TIMEZONE: Asia/Baku
ports:
- "${N8N_PORT:-5678}:5678"
volumes:
- n8n-data:/home/node/.n8n
- ./docs/n8n:/workflows:ro
volumes:
postgres-data:
redis-data:
n8n-data:
minio-data: