forked from TracecatHQ/tracecat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
181 lines (172 loc) · 5.53 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
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:
DUMP_TRACECAT_RESULT: 0
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}
# Temporal
TEMPORAL__CLUSTER_URL: ${TEMPORAL__CLUSTER_URL}
TEMPORAL__CLUSTER_QUEUE: ${TEMPORAL__CLUSTER_QUEUE}
# SMTP
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_STARTTLS_ENABLED: ${SMTP_STARTTLS_ENABLED}
SMTP_SSL_ENABLED: ${SMTP_SSL_ENABLED}
SMTP_IGNORE_CERT_ERRORS: ${SMTP_IGNORE_CERT_ERRORS}
SMTP_AUTH_ENABLED: ${SMTP_AUTH_ENABLED}
SMTP_USER: ${SMTP_USER}
SMTP_PASS: ${SMTP_PASS}
# Migrations
RUN_MIGRATIONS: true
volumes:
- ./tracecat:/app/tracecat
- ./alembic:/app/alembic
worker:
build:
context: .
dockerfile: Dockerfile.dev
restart: unless-stopped
environment:
DUMP_TRACECAT_RESULT: 0
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}
# SMTP
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_STARTTLS_ENABLED: ${SMTP_STARTTLS_ENABLED}
SMTP_SSL_ENABLED: ${SMTP_SSL_ENABLED}
SMTP_IGNORE_CERT_ERRORS: ${SMTP_IGNORE_CERT_ERRORS}
SMTP_AUTH_ENABLED: ${SMTP_AUTH_ENABLED}
SMTP_USER: ${SMTP_USER}
SMTP_PASS: ${SMTP_PASS}
volumes:
- ./tracecat:/app/tracecat
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: always
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: always
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: always
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
temporal_ui:
image: temporalio/ui:${TEMPORAL__UI_VERSION}
container_name: temporal_ui
ports:
- 8080:8080
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
depends_on:
- temporal
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.15.0
environment:
- discovery.type=single-node
- xpack.security.enabled=false
container_name: elasticsearch
restart: unless-stopped
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
volumes:
core-db:
temporal-db:
elasticsearch-data: