Repository navigation
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
224 lines (211 loc) · 5.82 KB
/
Copy pathdocker-compose.local.yml
File metadata and controls
224 lines (211 loc) · 5.82 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
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
services:
web:
extends:
file: docker-compose.yml
service: web
build:
context: .
target: web
ports:
- 5556:5556 # Prisma studio
api:
extends:
file: docker-compose.yml
service: api
build:
context: .
target: api
depends_on:
- postgres
docs:
extends:
file: docker-compose.yml
service: docs
build:
context: .
dockerfile: ./Dockerfile.docs
# External dependencies
postgres:
image: postgres:17
ports:
- 5432:5432
volumes:
- postgres-data:/var/lib/postgresql/data
- /tmp:/tmp
environment:
- POSTGRES_USER=blobscan
- POSTGRES_DB=blobscan_dev
- POSTGRES_PASSWORD=s3cr3t
healthcheck:
test: ["CMD-SHELL", "pg_isready -U blobscan -d blobscan_dev"]
interval: 10s
timeout: 5s
retries: 5
ipfs:
image: ipfs/kubo:latest
restart: unless-stopped
environment:
IPFS_PROFILE: "server,pebbleds"
GOLOG_LOG_LEVEL: "info"
volumes:
- ipfs_data:/data/ipfs
ports:
- "4001:4001"
- "127.0.0.1:5001:5001"
- "127.0.0.1:8080:8080"
healthcheck:
test: ["CMD", "ipfs", "id"]
interval: 10s
timeout: 5s
retries: 5
storage:
image: fsouza/fake-gcs-server
ports:
- "4443:4443"
command: ["-scheme", "http", "-port", "4443", "-data", "/data"]
volumes:
- gcs_data:/data
- type: bind
source: ./packages/test/src/fixtures/gcs
target: /data
s3mock:
image: adobe/s3mock:latest
environment:
- COM_ADOBE_TESTING_S3MOCK_STORE_INITIAL_BUCKETS=blobscan-s3-bucket
- COM_ADOBE_TESTING_S3MOCK_STORE_REGION=us-east-1
ports:
- 9090:9090
redis:
image: "redis:alpine"
command: redis-server /usr/local/etc/redis/redis.conf
ports:
- "6379:6379"
volumes:
- ./misc/data:/var/lib/redis
- ./misc/conf:/usr/local/etc/redis/redis.conf
environment:
- REDIS_REPLICATION_MODE=master
- REDIS_PASSWORD=s3cr3t
- REDIS_USERNAME=blobscan
collector:
image: otel/opentelemetry-collector:0.23.0
command: "--config /etc/otel-config.yaml"
volumes:
- ./otel-config.yaml:/etc/otel-config.yaml
# Creates the Dagster instance database if it does not exist. A script in
# docker-entrypoint-initdb.d runs only on an empty data directory, so it
# would not create it on an existing postgres-data volume.
dagster-db-init:
image: postgres:17
environment:
PGHOST: postgres
PGUSER: blobscan
PGPASSWORD: s3cr3t
PGDATABASE: blobscan_dev
entrypoint:
- sh
- -c
- >-
psql -tAc "SELECT 1 FROM pg_database WHERE datname = 'dagster_dev'" | grep -q 1
|| psql -c "CREATE DATABASE dagster_dev"
depends_on:
postgres:
condition: service_healthy
dagster-blobscan:
build:
context: ./apps/dagster
dockerfile: ./Dockerfile
image: blobscan-dagster
restart: always
environment:
# Image used by the DockerRunLauncher to launch run containers
DAGSTER_CURRENT_IMAGE: blobscan-dagster
CHAIN_ID: "${CHAIN_ID}"
DAGSTER_METRICS_START_DATE: "${DAGSTER_METRICS_START_DATE:-}"
# Slack-compatible incoming webhook for run failure / staleness alerts
DAGSTER_ALERT_WEBHOOK_URL: "${DAGSTER_ALERT_WEBHOOK_URL:-}"
DATABASE_URL: "postgresql://blobscan:s3cr3t@postgres:5432/blobscan_dev"
POSTGRES_USER: "blobscan"
POSTGRES_PASSWORD: "s3cr3t"
POSTGRES_DB: "dagster_dev"
POSTGRES_PORT: 5432
volumes:
- dagster-home:/dagster_home
depends_on:
- postgres
healthcheck:
test: ["CMD-SHELL", "dagster api grpc-health-check -p 4000"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
dagster-webserver:
build:
context: ./apps/dagster
dockerfile: ./Dockerfile.dagster
entrypoint:
- dagster-webserver
- -h
- "0.0.0.0"
- -p
- "3003"
- -w
- workspace.yaml
container_name: dagster-webserver
expose:
- "3003"
ports:
- "3003:3003"
environment:
POSTGRES_USER: "blobscan"
POSTGRES_PASSWORD: "s3cr3t"
POSTGRES_DB: "dagster_dev"
POSTGRES_PORT: 5432
volumes: # Make docker client accessible so we can terminate containers from the webserver
- /var/run/docker.sock:/var/run/docker.sock
- /tmp/io_manager_storage:/tmp/io_manager_storage
depends_on:
postgres:
condition: service_healthy
dagster-db-init:
condition: service_completed_successfully
dagster-blobscan:
condition: service_healthy
dagster-daemon:
build:
context: ./apps/dagster
dockerfile: ./Dockerfile.dagster
entrypoint:
- dagster-daemon
- run
container_name: dagster-daemon
restart: on-failure
environment:
POSTGRES_USER: "blobscan"
POSTGRES_PASSWORD: "s3cr3t"
POSTGRES_DB: "dagster_dev"
POSTGRES_PORT: 5432
# Forwarded to run containers by the DockerRunLauncher (see dagster.yaml)
DAGSTER_DOCKER_NETWORK: blobscan_default
CHAIN_ID: "${CHAIN_ID}"
DAGSTER_METRICS_START_DATE: "${DAGSTER_METRICS_START_DATE:-}"
DATABASE_URL: "postgresql://blobscan:s3cr3t@postgres:5432/blobscan_dev"
volumes: # Make docker client accessible so we can launch containers using host docker
- /var/run/docker.sock:/var/run/docker.sock
- /tmp/io_manager_storage:/tmp/io_manager_storage
depends_on:
postgres:
condition: service_healthy
dagster-db-init:
condition: service_completed_successfully
dagster-blobscan:
condition: service_started
networks:
default:
# Fixed name so dagster.yaml can attach run containers to it
name: blobscan_default
volumes:
postgres-data:
gcs_data:
dagster-home:
ipfs_data: