-
Notifications
You must be signed in to change notification settings - Fork 65
/
docker-compose.bundler.yaml
133 lines (129 loc) · 6.74 KB
/
docker-compose.bundler.yaml
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
services:
upload-service:
image: ghcr.io/ardriveapp/turbo-upload-service:${UPLOAD_SERVICE_IMAGE_TAG:-fd1032e3012c0179577b08bbfe932f4ad7d805cd}
restart: on-failure
environment:
ARWEAVE_GATEWAY: ${ARWEAVE_GATEWAY:-http://envoy:3000}
PORT: ${UPLOAD_SERVICE_PORT:-5100}
NODE_ENV: ${NODE_ENV:-local}
DB_HOST: ${UPLOAD_SERVICE_DB_HOST:-upload-service-pg}
DB_PORT: ${UPLOAD_SERVICE_DB_PORT:-5432}
DB_PASSWORD: ${UPLOAD_SERVICE_DB_PASSWORD:-postgres}
PAYMENT_SERVICE_BASE_URL: ${PAYMENT_SERVICE_BASE_URL:-}
SKIP_BALANCE_CHECKS: ${SKIP_BALANCE_CHECKS:-false}
ALLOW_LISTED_ADDRESSES: ${ALLOW_LISTED_ADDRESSES:-}
MAX_DATA_ITEM_SIZE: ${MAX_DATA_ITEM_SIZE:-10737418240}
AWS_REGION: ${AWS_REGION:-us-east-1}
AWS_ENDPOINT: ${AWS_ENDPOINT:-http://localstack:4566}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-test}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-test}
SQS_PREPARE_BUNDLE_URL: ${SQS_PREPARE_BUNDLE_URL:-http://sqs.us-east-1.localstack.localstack.cloud:4566/000000000000/prepare-bundle-queue}
SQS_FINALIZE_UPLOAD_URL: ${SQS_FINALIZE_UPLOAD_URL:-http://sqs.us-east-1.localstack.localstack.cloud:4566/000000000000/finalize-multipart-queue}
SQS_OPTICAL_URL: ${SQS_OPTICAL_URL:-http://sqs.us-east-1.localstack.localstack.cloud:4566/000000000000/optical-post-queue}
SQS_NEW_DATA_ITEM_URL: ${SQS_NEW_DATA_ITEM_URL:-http://sqs.us-east-1.localstack.localstack.cloud:4566/000000000000/batch-insert-new-data-items-queue}
SQS_UNBUNDLE_BDI_URL: ${SQS_UNBUNDLE_BDI_URL:-http://sqs.us-east-1.localstack.localstack.cloud:4566/000000000000/bdi-unbundle-queue}
OPTICAL_BRIDGING_ENABLED: ${OPTICAL_BRIDGING_ENABLED:-true}
DATA_ITEM_BUCKET: ${DATA_ITEM_BUCKET:-$AWS_S3_BUCKET}
DATA_ITEM_BUCKET_REGION: ${DATA_ITEM_BUCKET_REGION:-us-east-1}
LOG_LEVEL: ${LOG_LEVEL:-info}
S3_FORCE_PATH_STYLE: ${S3_FORCE_PATH_STYLE:-true}
MIGRATE_ON_STARTUP: ${MIGRATE_ON_STARTUP:-true}
DATA_ITEM_S3_PREFIX: ${DATA_ITEM_S3_PREFIX:-$AWS_S3_PREFIX}
BUNDLE_PAYLOAD_S3_PREFIX: ${BUNDLE_PAYLOAD_S3_PREFIX:-$AWS_S3_PREFIX}
ports:
- ${UPLOAD_SERVICE_PORT:-5100}:${UPLOAD_SERVICE_PORT:-5100}
volumes:
- ${UPLOAD_SERVICE_DATA_PATH:-./data/upload-service}:/temp
networks:
- ar-io-network
depends_on:
- upload-service-pg
- fulfillment-service
fulfillment-service:
image: ghcr.io/ardriveapp/turbo-upload-service-fulfillment:${UPLOAD_SERVICE_IMAGE_TAG:-6299f5497f5de479a1fb17ec86b764a4bf018f7b}
restart: on-failure
environment:
ARWEAVE_GATEWAY: ${ARWEAVE_GATEWAY:-http://envoy:3000}
NODE_ENV: ${NODE_ENV:-local}
DB_HOST: ${UPLOAD_SERVICE_DB_HOST:-upload-service-pg}
DB_PORT: ${UPLOAD_SERVICE_DB_PORT:-5432}
APP_NAME: ${APP_NAME:-}
DB_PASSWORD: ${UPLOAD_SERVICE_DB_PASSWORD:-postgres}
PORT: ${FULFILLMENT_PORT:-4401}
AWS_ENDPOINT: ${AWS_ENDPOINT:-http://localstack:4566}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-test}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-test}
SQS_PREPARE_BUNDLE_URL: ${SQS_PREPARE_BUNDLE_URL:-http://sqs.us-east-1.localstack.localstack.cloud:4566/000000000000/prepare-bundle-queue}
SQS_POST_BUNDLE_URL: ${SQS_POST_BUNDLE_URL:-http://sqs.us-east-1.localstack.localstack.cloud:4566/000000000000/post-bundle-queue}
SQS_SEED_BUNDLE_URL: ${SQS_SEED_BUNDLE_URL:-http://sqs.us-east-1.localstack.localstack.cloud:4566/000000000000/seed-bundle-queue}
SQS_FINALIZE_UPLOAD_URL: ${SQS_FINALIZE_UPLOAD_URL:-http://sqs.us-east-1.localstack.localstack.cloud:4566/000000000000/finalize-multipart-queue}
SQS_OPTICAL_URL: ${SQS_OPTICAL_URL:-http://sqs.us-east-1.localstack.localstack.cloud:4566/000000000000/optical-post-queue}
SQS_NEW_DATA_ITEM_URL: ${SQS_NEW_DATA_ITEM_URL:-http://sqs.us-east-1.localstack.localstack.cloud:4566/000000000000/batch-insert-new-data-items-queue}
SQS_UNBUNDLE_BDI_URL: ${SQS_UNBUNDLE_BDI_URL:-http://sqs.us-east-1.localstack.localstack.cloud:4566/000000000000/bdi-unbundle-queue}
PLAN_BUNDLE_ENABLED: ${PLAN_BUNDLE_ENABLED:-true}
VERIFY_BUNDLE_ENABLED: ${VERIFY_BUNDLE_ENABLED:-true}
OPTICAL_BRIDGING_ENABLED: ${OPTICAL_BRIDGING_ENABLED:-true}
OPTICAL_BRIDGE_URL: ${OPTICAL_BRIDGE_URL:-http://envoy:3000/ar-io/admin/queue-data-item}
SKIP_BALANCE_CHECKS: ${SKIP_BALANCE_CHECKS:-true}
DATA_ITEM_BUCKET: ${DATA_ITEM_BUCKET:-$AWS_S3_BUCKET}
DATA_ITEM_BUCKET_REGION: ${DATA_ITEM_BUCKET_REGION:-us-east-1}
S3_FORCE_PATH_STYLE: ${S3_FORCE_PATH_STYLE:-true}
AWS_REGION: ${AWS_REGION:-us-east-1}
OVERDUE_DATA_ITEM_THRESHOLD_MS: ${OVERDUE_DATA_ITEM_THRESHOLD_MS:-0} # plan all into bundles data items immediately
AR_IO_ADMIN_KEY: ${AR_IO_ADMIN_KEY:-$ADMIN_API_KEY}
DATA_ITEM_S3_PREFIX: ${DATA_ITEM_S3_PREFIX:-$AWS_S3_PREFIX}
BUNDLE_PAYLOAD_S3_PREFIX: ${BUNDLE_PAYLOAD_S3_PREFIX:-$AWS_S3_PREFIX}
networks:
- ar-io-network
depends_on:
localstack:
condition: service_healthy
upload-service-pg:
condition: service_started
upload-service-pg:
image: postgres:13.8
restart: on-failure
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- '5432' # don't expose postgres externally by default
volumes:
- ${UPLOAD_SERVICE_PG_DATA_PATH:-./data/upload-service-pg}:/var/lib/postgresql/data
networks:
- ar-io-network
localstack:
image: ghcr.io/ardriveapp/turbo-upload-service-localstack:${UPLOAD_SERVICE_IMAGE_TAG:-6299f5497f5de479a1fb17ec86b764a4bf018f7b}
restart: on-failure
ports:
- '4566' # don't expose localstack externally by default
#- "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}
- NODE_ENV=${NODE_ENV:-local}
- ARWEAVE_WALLET=${ARWEAVE_WALLET:-$BUNDLER_ARWEAVE_WALLET}
- TURBO_OPTICAL_KEY=${TURBO_OPTICAL_KEY:-$BUNDLER_ARWEAVE_WALLET}
- PERSIST_DEFAULT=${PERSIST_LOCALSTACK:-1} # set to 0 to disable persistence of resources and s3 objects between restarts
- DATA_ITEM_BUCKET=${AWS_S3_BUCKET:-}
volumes:
- '${LOCALSTACK_VOLUME_DIR:-./data/localstack}:/var/lib/localstack'
- '${LOCALSTACK_VOLUME_DIR:-./data/localstack}:/persisted-data'
- '/var/run/docker.sock:/var/run/docker.sock'
networks:
- ar-io-network
healthcheck:
test:
[
'CMD-SHELL',
'curl -f http://localhost:4566/_localstack/health || exit 1',
]
interval: 10s
timeout: 30s
retries: 10
start_period: 15s
networks:
ar-io-network:
external: true