forked from TracecatHQ/tracecat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
186 lines (176 loc) · 5.71 KB
/
docker-compose.dev.yml
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
services:
caddy:
image: caddy:2.8.4-alpine
container_name: caddy
restart: unless-stopped
ports:
- 80:80
environment:
- BASE_DOMAIN=${BASE_DOMAIN}
- ADDRESS=${ADDRESS}
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
api:
build:
context: .
dockerfile: Dockerfile.dev
container_name: api
restart: unless-stopped
ports:
- 8000:8000
environment:
# App
LOG_LEVEL: ${LOG_LEVEL}
TRACECAT__API_URL: ${TRACECAT__API_URL}
TRACECAT__API_ROOT_PATH: ${TRACECAT__API_ROOT_PATH}
TRACECAT__APP_ENV: ${TRACECAT__APP_ENV}
TRACECAT__DB_ENCRYPTION_KEY: ${TRACECAT__DB_ENCRYPTION_KEY} # Sensitive
TRACECAT__DB_SSLMODE: ${TRACECAT__DB_SSLMODE}
TRACECAT__DB_URI: ${TRACECAT__DB_URI} # Sensitive
TRACECAT__PUBLIC_RUNNER_URL: ${TRACECAT__PUBLIC_RUNNER_URL}
TRACECAT__PUBLIC_APP_URL: ${TRACECAT__PUBLIC_APP_URL}
TRACECAT__SERVICE_KEY: ${TRACECAT__SERVICE_KEY} # Sensitive
TRACECAT__SIGNING_SECRET: ${TRACECAT__SIGNING_SECRET} # Sensitive
TRACECAT__ALLOW_ORIGINS: ${TRACECAT__ALLOW_ORIGINS}
TRACECAT__AUTH_TYPES: ${TRACECAT__AUTH_TYPES}
OAUTH_CLIENT_ID: ${OAUTH_CLIENT_ID}
OAUTH_CLIENT_SECRET: ${OAUTH_CLIENT_SECRET}
USER_AUTH_SECRET: ${USER_AUTH_SECRET}
# Initial admin user
TRACECAT__SETUP_ADMIN_EMAIL: ${TRACECAT__SETUP_ADMIN_EMAIL}
TRACECAT__SETUP_ADMIN_PASSWORD: ${TRACECAT__SETUP_ADMIN_PASSWORD}
# SAML SSO
SAML_IDP_ENTITY_ID: ${SAML_IDP_ENTITY_ID}
SAML_IDP_REDIRECT_URL: ${SAML_IDP_REDIRECT_URL}
SAML_IDP_CERTIFICATE: ${SAML_IDP_CERTIFICATE}
SAML_IDP_METADATA_URL: ${SAML_IDP_METADATA_URL}
SAML_SP_ACS_URL: ${SAML_SP_ACS_URL}
# Temporal
TEMPORAL__CLUSTER_URL: ${TEMPORAL__CLUSTER_URL}
TEMPORAL__CLUSTER_QUEUE: ${TEMPORAL__CLUSTER_QUEUE}
# Migrations
RUN_MIGRATIONS: "true"
# Remote registry
TRACECAT__REMOTE_REPOSITORY_PACKAGE_NAME: ${TRACECAT__REMOTE_REPOSITORY_PACKAGE_NAME}
TRACECAT__REMOTE_REPOSITORY_URL: ${TRACECAT__REMOTE_REPOSITORY_URL}
# AI
TRACECAT__PRELOAD_OSS_MODELS: ${TRACECAT__PRELOAD_OSS_MODELS}
OLLAMA__API_URL: ${OLLAMA__API_URL}
# This is only used for testing
TRACECAT__UNSAFE_DISABLE_SM_MASKING: ${TRACECAT__UNSAFE_DISABLE_SM_MASKING:-true}
volumes:
- ./tracecat:/app/tracecat
- ./registry:/app/registry
- ./alembic:/app/alembic
depends_on:
- ollama
worker:
build:
context: .
dockerfile: Dockerfile.dev
restart: unless-stopped
environment:
LOG_LEVEL: ${LOG_LEVEL}
TRACECAT__API_URL: ${TRACECAT__API_URL}
TRACECAT__API_ROOT_PATH: ${TRACECAT__API_ROOT_PATH}
TRACECAT__APP_ENV: ${TRACECAT__APP_ENV}
TRACECAT__DB_ENCRYPTION_KEY: ${TRACECAT__DB_ENCRYPTION_KEY} # Sensitive
TRACECAT__DB_SSLMODE: ${TRACECAT__DB_SSLMODE}
TRACECAT__DB_URI: ${TRACECAT__DB_URI} # Sensitive
TRACECAT__PUBLIC_RUNNER_URL: ${TRACECAT__PUBLIC_RUNNER_URL}
TRACECAT__SERVICE_KEY: ${TRACECAT__SERVICE_KEY} # Sensitive
TRACECAT__SIGNING_SECRET: ${TRACECAT__SIGNING_SECRET} # Sensitive
# Temporal
TEMPORAL__CLUSTER_URL: ${TEMPORAL__CLUSTER_URL}
TEMPORAL__CLUSTER_QUEUE: ${TEMPORAL__CLUSTER_QUEUE}
volumes:
- ./tracecat:/app/tracecat
- ./registry:/app/registry
entrypoint: ["python", "tracecat/dsl/worker.py"]
ui:
build:
context: ./frontend
dockerfile: Dockerfile
args:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL}
NEXT_SERVER_API_URL: ${NEXT_SERVER_API_URL}
NODE_ENV: ${NODE_ENV}
container_name: ui
restart: unless-stopped
ports:
- 3000:3000
environment:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
NEXT_PUBLIC_APP_ENV: ${NEXT_PUBLIC_APP_ENV}
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL}
NEXT_PUBLIC_AUTH_TYPES: ${TRACECAT__AUTH_TYPES}
NEXT_SERVER_API_URL: ${NEXT_SERVER_API_URL}
NODE_ENV: ${NODE_ENV}
depends_on:
- api
volumes:
- ./frontend/src:/app/src
- ./frontend/.next:/app/.next
- ./frontend/node_modules:/app/node_modules
postgres_db:
image: postgres:16
container_name: postgres_db
restart: unless-stopped
ports:
- 5432:5432
shm_size: 128mb
environment:
POSTGRES_USER: ${TRACECAT__POSTGRES_USER}
POSTGRES_PASSWORD: ${TRACECAT__POSTGRES_PASSWORD}
volumes:
- core-db:/var/lib/postgresql/data
temporal_postgres_db:
image: postgres:13
container_name: temporal_postgres_db
restart: unless-stopped
environment:
POSTGRES_USER: ${TEMPORAL__POSTGRES_USER}
POSTGRES_PASSWORD: ${TEMPORAL__POSTGRES_PASSWORD}
volumes:
- temporal-db:/var/lib/postgresql/data
temporal:
image: temporalio/auto-setup:${TEMPORAL__VERSION}
container_name: temporal
restart: unless-stopped
ports:
- 7233:7233
environment:
- DB=postgres12
- DB_PORT=5432
- POSTGRES_USER=${TEMPORAL__POSTGRES_USER}
- POSTGRES_PWD=${TEMPORAL__POSTGRES_PASSWORD}
- POSTGRES_SEEDS=temporal_postgres_db
- LOG_LEVEL=warn
depends_on:
- temporal_postgres_db
attach: false
temporal_ui:
image: temporalio/ui:${TEMPORAL__UI_VERSION}
container_name: temporal_ui
ports:
- 9090:8080
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
depends_on:
- temporal
attach: false
ollama:
container_name: ollama
tty: true
restart: unless-stopped
image: ollama/ollama:${OLLAMA__VERSION}
ports:
- 11434:11434
volumes:
- ollama:/root/.ollama
volumes:
core-db:
temporal-db:
ollama: