-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.signer.yml
121 lines (112 loc) · 3.23 KB
/
docker-compose.signer.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
# This file is used for running the dependencies of the sBTC signer.
#
# It is intended to become a template for the absolute minimum required
# dependencies to run the signer and used to adapt the devenv later.
# See # TODO(536)
volumes:
dynamodb_data:
networks:
sbtc_signer:
driver: bridge
services:
signer:
container_name: sbtc-signer
build:
context: .
dockerfile: Dockerfile.signer
volumes:
- .:/data
networks:
- sbtc_signer
working_dir: /data
command:
- /bin/bash
- -c
- . /root/.cargo/env && cargo run --target x86_64-unknown-linux-gnu --bin signer -- -c /data/signer/src/config/default.toml --migrate-db
environment:
RUST_BACKTRACE: 1
RUST_LOG: info
SIGNER_SIGNER__DB_ENDPOINT: postgres://devenv:devenv@sbtc-postgres/signer
depends_on:
postgres:
condition: service_healthy
bitcoind:
condition: service_healthy
bitcoind:
container_name: sbtc-bitcoind
image: lncm/bitcoind:v25.1
volumes:
- ./signer/tests/service-configs/bitcoin.conf:/data/.bitcoin/bitcoin.conf:ro
restart: on-failure
# For some reason, the CMD in the original Dockerfile is set to publish
# events on zeromq, and it seems to interfere with the events that we
# want to publish. So we overwrite the CMD by just setting the
# -logtimestamps argument in the command here.
command: ["-logtimestamps"]
stop_grace_period: 10s
ports:
- 18443:18443
- 28332:28332
networks:
- sbtc_signer
healthcheck:
test: ["CMD-SHELL", "bitcoin-cli getblockcount"]
interval: 3s
timeout: 1s
retries: 3
postgres:
image: postgres:16.3
container_name: sbtc-postgres
environment:
POSTGRES_USER: devenv
POSTGRES_PASSWORD: devenv
POSTGRES_DB: signer
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- ":5432"
networks:
- sbtc_signer
healthcheck:
test: ["CMD-SHELL", "pg_isready --username=postgres --dbname=signer"]
interval: 2s
timeout: 1s
retries: 5
dynamodb:
command: "-jar DynamoDBLocal.jar -sharedDb -dbPath ./data"
image: "amazon/dynamodb-local:latest"
container_name: dynamodb-local
user: root
ports:
- "8000:8000"
restart: always
volumes:
- dynamodb_data:/home/dynamodblocal/data:rw
working_dir: /home/dynamodblocal
dynamodb-admin:
image: "aaronshaf/dynamodb-admin"
container_name: dynamodb-admin
depends_on:
- dynamodb
restart: always
ports:
- "8001:8001"
environment:
- DYNAMO_ENDPOINT=http://dynamodb:8000
- AWS_REGION=eu-west-1
profiles:
- tools
# Modifies the CDK template and creates DynamoDB Tables if necessary.
aws-setup:
build: devenv/aws-setup
depends_on:
dynamodb:
condition: service_started
volumes:
- "./devenv/aws-setup/initialize.py:/initialize.py"
- "./emily/cdk/cdk.out:/cdk.out"
environment:
- DYNAMODB_ENDPOINT=http://dynamodb:8000
- LOCAL_LAMBDA_PATH=/code/emily-handler/bootstrap.zip
- INPUT_CDK_TEMPLATE=/cdk.out/EmilyStack.template.json
- OUTPUT_CDK_TEMPLATE=/cdk.out/EmilyStack.devenv.template.json
command: python3 ./initialize.py