-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
157 lines (149 loc) · 5.94 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
services:
arlocal:
image: textury/arlocal:v1.1.66
ports:
- '1984:1984'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:1984/']
interval: 10s
timeout: 10s
retries: 3
arlocal-setup:
image: curlimages/curl:latest
command: /bin/sh -c "while ! curl -f http://arlocal:1984/ >/dev/null 2>&1; do sleep 1; done; curl http://arlocal:1984/mine"
depends_on:
- arlocal
# TODO: Local ETH node
# ganache:
# image: trufflesuite/ganache-cli:latest
# command: ganache-cli --accounts 10 --defaultBalanceEther 1000 --mnemonic 'myth like bonus scare over problem client lizard pioneer submit female collect'
# ports:
# - '8545:8545'
upload-service:
image: ghcr.io/ardriveapp/upload-service:latest
ports:
- '3000:3000'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/health']
interval: 10s
timeout: 10s
retries: 5
environment:
NODE_ENV: test
DB_HOST: upload-service-pg
DB_PORT: 5432
DB_PASSWORD: postgres
PAYMENT_SERVICE_BASE_URL: payment-service:4000
PAYMENT_SERVICE_PROTOCOL: http
MIGRATE_ON_STARTUP: 'true'
JWT_SECRET: ${JWT_SECRET:-test-secret-key}
LOG_LEVEL: ${LOG_LEVEL:-info}
ALLOW_LISTED_ADDRESSES: sYFSpEH7Gls-5Spq5FjuP85JCZj6QYzNvCm9BdKEJs4
TURBO_JWK_FILE: ./wallets/ByQEA5jhJvzlhfI4sFgB23kjGpxDK6OIE0i3sSnmTGU.json
ARWEAVE_GATEWAY: ${ARWEAVE_GATEWAY:-http://arlocal:1984}
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}
DATA_ITEM_BUCKET: ${DATA_ITEM_BUCKET:-turbo-sdk}
DATA_ITEM_BUCKET_REGION: ${DATA_ITEM_BUCKET_REGION:-us-east-1}
S3_FORCE_PATH_STYLE: ${S3_FORCE_PATH_STYLE:-true}
DATA_ITEM_S3_PREFIX: ${DATA_ITEM_S3_PREFIX:-data}
BUNDLE_PAYLOAD_S3_PREFIX: ${BUNDLE_PAYLOAD_S3_PREFIX:-data}
FREE_UPLOAD_LIMIT: '107520'
ALLOW_ARFS_DATA: 'true'
volumes:
- upload-service-data-items:/temp
- ./tests/wallets:/usr/src/app/wallets
depends_on:
- upload-service-pg
- payment-service
- arlocal-setup
- localstack
upload-service-pg:
image: postgres:13.8
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- '5432:5432'
volumes:
- upload-service-data:/var/lib/postgresql/data
localstack:
image: ghcr.io/ardriveapp/turbo-upload-service-localstack:${UPLOAD_SERVICE_IMAGE_TAG:-latest}
restart: on-failure
ports:
- '4566:4566'
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:-turbo-sdk}
volumes:
- '${LOCALSTACK_VOLUME_DIR:-./data/localstack}:/var/lib/localstack'
- '${LOCALSTACK_VOLUME_DIR:-./data/localstack}:/persisted-data'
- '/var/run/docker.sock:/var/run/docker.sock'
healthcheck:
test:
[
'CMD-SHELL',
'if curl -s http://localhost:4566/_localstack/health | grep -q ''"secretsmanager": "running"''; then echo ''Localstack is ready''; exit 0; else echo ''Localstack is not ready''; exit 1; fi',
]
interval: 10s
timeout: 30s
retries: 10
start_period: 10s
payment-service:
image: ghcr.io/ardriveapp/payment-service:latest
ports:
- '4000:4000'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:4000/health']
interval: 10s
timeout: 10s
retries: 5
environment:
NODE_ENV: test
DB_HOST: payment-service-pg
DB_PORT: 5433
DB_PASSWORD: postgres
PORT: 4000
MIGRATE_ON_STARTUP: 'true'
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY:-secret-key}
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET:-webhook-secret-key}
JWT_SECRET: ${JWT_SECRET:-test-secret-key}
LOG_LEVEL: ${LOG_LEVEL:-info}
ARWEAVE_ADDRESS: ByQEA5jhJvzlhfI4sFgB23kjGpxDK6OIE0i3sSnmTGU
ARWEAVE_GATEWAY: ${ARWEAVE_GATEWAY:-http://arlocal:1984} # AR local gateway
SOLANA_GATEWAY: ${SOLANA_GATEWAY:-https://api.devnet.solana.com} # SOL devnet gateway
ETHEREUM_GATEWAY: ${ETHEREUM_GATEWAY:-https://ethereum-holesky-rpc.publicnode.com} # ETH holesky testnet gateway
KYVE_GATEWAY: ${KYVE_GATEWAY:-https://api.korellia.kyve.network} # KYVE testnet gateway
PAYMENT_TX_POLLING_WAIT_TIME_MS: 10
depends_on:
- payment-service-pg
- arlocal-setup
payment-service-pg:
image: postgres:13.8
environment:
PGPORT: 5433
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- '5433:5433'
volumes:
- payment-service-data:/var/lib/postgresql/data
volumes:
payment-service-data:
upload-service-data:
upload-service-data-items: