-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
178 lines (170 loc) · 6.13 KB
/
docker-compose.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
services:
upload-service:
build:
context: .
args:
NODE_VERSION: ${NODE_VERSION:-18.17.0}
NODE_VERSION_SHORT: ${NODE_VERSION_SHORT:-18}
environment:
NODE_ENV: ${NODE_ENV:-local}
DB_HOST: upload-service-pg
DB_PORT: 5432
DB_PASSWORD: postgres
PAYMENT_SERVICE_BASE_URL: ${PAYMENT_SERVICE_BASE_URL:-}
MAX_DATA_ITEM_SIZE: ${MAX_DATA_ITEM_SIZE:-10737418240}
ALLOW_LISTED_ADDRESSES: ${ALLOW_LISTED_ADDRESSES:-}
AWS_ENDPOINT: ${AWS_ENDPOINT:-}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-}
SQS_PREPARE_BUNDLE_URL: ${SQS_PREPARE_BUNDLE_URL:-}
SQS_FINALIZE_UPLOAD_URL: ${SQS_FINALIZE_UPLOAD_URL:-}
SQS_OPTICAL_URL: ${SQS_OPTICAL_URL:-}
SQS_NEW_DATA_ITEM_URL: ${SQS_NEW_DATA_ITEM_URL:-}
SQS_UNBUNDLE_BDI_URL: ${SQS_UNBUNDLE_BDI_URL:-}
OPTICAL_BRIDGING_ENABLED: ${OPTICAL_BRIDGING_ENABLED:-false}
SKIP_BALANCE_CHECKS: ${SKIP_BALANCE_CHECKS:-true}
DATA_ITEM_BUCKET: ${DATA_ITEM_BUCKET:-raw-data-items}
DATA_ITEM_BUCKET_REGION: ${DATA_ITEM_BUCKET_REGION:-us-east-1}
LOG_LEVEL: ${LOG_LEVEL:-info}
S3_FORCE_PATH_STYLE: ${S3_FORCE_PATH_STYLE:-}
AWS_REGION: ${AWS_REGION:-us-east-1}
ports:
- "${PORT:-3000}:${PORT:-3000}"
volumes:
- upload-service-data-items:/temp
depends_on:
- upload-service-pg
- fulfillment-service
fulfillment-service:
build:
context: .
dockerfile: Dockerfile.fulfillment
args:
NODE_VERSION: ${NODE_VERSION:-18.17.0}
NODE_VERSION_SHORT: ${NODE_VERSION_SHORT:-18}
environment:
NODE_ENV: ${NODE_ENV:-local}
DB_HOST: upload-service-pg
DB_PORT: 5432
DB_PASSWORD: postgres
PORT: ${FULFILLMENT_PORT:-4000}
AWS_ENDPOINT: ${AWS_ENDPOINT:-}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-}
SQS_PREPARE_BUNDLE_URL: ${SQS_PREPARE_BUNDLE_URL:-}
SQS_POST_BUNDLE_URL: ${SQS_POST_BUNDLE_URL:-}
SQS_SEED_BUNDLE_URL: ${SQS_SEED_BUNDLE_URL:-}
SQS_FINALIZE_UPLOAD_URL: ${SQS_FINALIZE_UPLOAD_URL:-}
SQS_OPTICAL_URL: ${SQS_OPTICAL_URL:-}
SQS_NEW_DATA_ITEM_URL: ${SQS_NEW_DATA_ITEM_URL:-}
SQS_UNBUNDLE_BDI_URL: ${SQS_UNBUNDLE_BDI_URL:-}
PLAN_BUNDLE_ENABLED: ${PLAN_BUNDLE_ENABLED:-true}
VERIFY_BUNDLE_ENABLED: ${VERIFY_BUNDLE_ENABLED:-true}
OPTICAL_BRIDGING_ENABLED: ${OPTICAL_BRIDGING_ENABLED:-false}
SKIP_BALANCE_CHECKS: ${SKIP_BALANCE_CHECKS:-true}
DATA_ITEM_BUCKET: ${DATA_ITEM_BUCKET:-raw-data-items}
DATA_ITEM_BUCKET_REGION: ${DATA_ITEM_BUCKET_REGION:-us-east-1}
S3_FORCE_PATH_STYLE: ${S3_FORCE_PATH_STYLE:-}
AWS_REGION: ${AWS_REGION:-us-east-1}
OVERDUE_DATA_ITEM_THRESHOLD_MS: ${OVERDUE_DATA_ITEM_THRESHOLD_MS:-0} # plan data items immediately into bundles when plan-bundle runs
ports:
- "${FULFILLMENT_PORT:-4000}:${FULFILLMENT_PORT:-4000}"
depends_on:
localstack:
condition: service_healthy
upload-service-pg:
condition: service_started
migrator-service:
condition: service_started
migrator-service:
build:
context: .
dockerfile: Dockerfile.migration
args:
NODE_VERSION: ${NODE_VERSION:-18.17.0}
environment:
DB_HOST: upload-service-pg
DB_PORT: 5432
DB_PASSWORD: postgres
depends_on:
- upload-service-pg
upload-service-pg:
image: postgres:16.1
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- "5432:5432"
volumes:
- upload-service-data:/var/lib/postgresql/data
localstack:
container_name: "${LOCALSTACK_DOCKER_NAME:-localstack}"
build:
context: .
dockerfile: Dockerfile.localstack
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
#- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
# LocalStack configuration: https://docs.localstack.cloud/references/configuration/
- SERVICES=${SERVICES:-s3,sqs,secretsmanager}
- DEBUG=${DEBUG:-0} # set to 1 to enable debug mode
- NODE_ENV=${NODE_ENV:-local}
- ARWEAVE_WALLET=${ARWEAVE_WALLET:-}
- TURBO_OPTICAL_KEY=${TURBO_OPTICAL_KEY:-$ARWEAVE_WALLET}
- DATA_ITEM_BUCKET=${DATA_ITEM_BUCKET:-raw-data-items}
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/persisted-data"
- "/var/run/docker.sock:/var/run/docker.sock"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4566/_localstack/health"]
interval: 10s
timeout: 30s
retries: 10
start_period: 15s
arlocal:
profiles:
- test
image: textury/arlocal:v1.1.35
ports:
- "1984:1984"
test-runner:
profiles:
- test
build:
context: .
dockerfile: tests/integration.Dockerfile
args:
NODE_VERSION: ${NODE_VERSION:-18.17.0}
environment:
DB_HOST: upload-service-pg
DB_PASSWORD: postgres
DB_PORT: 5432
DISABLE_LOGS: ${DISABLE_LOGS:-true}
NODE_ENV: ${NODE_ENV:-test}
ARWEAVE_GATEWAY: ${ARWEAVE_GATEWAY:-http://arlocal:1984}
AWS_ENDPOINT: ${AWS_ENDPOINT:-}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-}
SQS_PREPARE_BUNDLE_URL: ${SQS_PREPARE_BUNDLE_URL:-}
SQS_POST_BUNDLE_URL: ${SQS_POST_BUNDLE_URL:-}
SQS_SEED_BUNDLE_URL: ${SQS_SEED_BUNDLE_URL:-}
SQS_FINALIZE_UPLOAD_URL: ${SQS_FINALIZE_UPLOAD_URL:-}
SQS_OPTICAL_URL: ${SQS_OPTICAL_URL:-}
SQS_NEW_DATA_ITEM_URL: ${SQS_NEW_DATA_ITEM_URL:-}
SQS_UNBUNDLE_BDI_URL: ${SQS_UNBUNDLE_BDI_URL:-}
DATA_ITEM_BUCKET: ${DATA_ITEM_BUCKET:-raw-data-items}
DATA_ITEM_BUCKET_REGION: ${DATA_ITEM_BUCKET_REGION:-us-east-1}
S3_FORCE_PATH_STYLE: ${S3_FORCE_PATH_STYLE:-}
depends_on:
localstack:
condition: service_healthy
upload-service-pg:
condition: service_started
arlocal:
condition: service_started
volumes:
upload-service-data:
upload-service-data-items: