-
Notifications
You must be signed in to change notification settings - Fork 12
/
compose.yml
132 lines (122 loc) · 4.39 KB
/
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
version: '3'
services:
localstack:
hostname: localstack
image: localstack/localstack
ports:
- "4566:4566"
environment:
# LocalStack configuration: https://docs.localstack.cloud/references/configuration/
- DEBUG=${DEBUG:-0}
volumes:
- "./init-scripts/ready.d:/etc/localstack/init/ready.d"
- "localstack-data:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
coordinator:
restart: always
environment:
- 'RUST_LOG=mpc=debug,mpc-node=debug,mpc_node=debug,info'
- 'MPC__COORDINATOR__PARTICIPANTS=["participant_0:8080", "participant_1:8081"]'
- 'MPC__COORDINATOR__HAMMING_DISTANCE_THRESHOLD=0.375'
- 'MPC__COORDINATOR__N_CLOSEST_DISTANCES=20'
- 'MPC__COORDINATOR__DB__URL=postgres://postgres:postgres@coordinator_db:5432/db'
- 'MPC__COORDINATOR__DB__MIGRATE=true'
- 'MPC__COORDINATOR__DB__CREATE=true'
- 'MPC__COORDINATOR__AWS__ENDPOINT=http://localstack:4566'
- 'MPC__COORDINATOR__AWS__REGION=us-east-1'
- 'MPC__COORDINATOR__QUEUES__QUERIES_QUEUE_URL=http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/coordinator-uniqueness-check.fifo'
- 'MPC__COORDINATOR__QUEUES__DISTANCES_QUEUE_URL=http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/coordinator-results-queue.fifo'
- 'MPC__COORDINATOR__QUEUES__DB_SYNC_QUEUE_URL=http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/coordinator-db-sync-queue'
# AWS env vars - they don't matter but are required
- 'AWS_ACCESS_KEY_ID=test'
- 'AWS_SECRET_ACCESS_KEY=test'
- 'AWS_DEFAULT_REGION=us-east-1'
build:
context: .
dockerfile: Dockerfile
ports:
- 8080:8080
depends_on:
- coordinator_db
- localstack
participant_0:
restart: always
hostname: participant
environment:
- 'RUST_LOG=mpc=debug,mpc-node=debug,mpc_node=debug,info'
- 'MPC__PARTICIPANT__SOCKET_ADDR=0.0.0.0:8080'
- 'MPC__PARTICIPANT__BATCH_SIZE=20000'
- 'MPC__PARTICIPANT__DB__URL=postgres://postgres:postgres@participant_0_db:5432/db'
- 'MPC__PARTICIPANT__DB__MIGRATE=true'
- 'MPC__PARTICIPANT__DB__CREATE=true'
- 'MPC__PARTICIPANT__AWS__ENDPOINT=http://localstack:4566'
- 'MPC__PARTICIPANT__AWS__REGION=us-east-1'
- 'MPC__PARTICIPANT__QUEUES__DB_SYNC_QUEUE_URL=http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/participant-0-db-sync-queue'
# AWS env vars - they don't matter but are required
- 'AWS_ACCESS_KEY_ID=test'
- 'AWS_SECRET_ACCESS_KEY=test'
- 'AWS_DEFAULT_REGION=us-east-1'
build:
context: .
dockerfile: Dockerfile
depends_on:
- participant_0_db
- localstack
participant_1:
restart: always
hostname: participant
environment:
- 'RUST_LOG=mpc=debug,mpc-node=debug,mpc_node=debug,info'
- 'MPC__PARTICIPANT__SOCKET_ADDR=0.0.0.0:8081'
- 'MPC__PARTICIPANT__BATCH_SIZE=20000'
- 'MPC__PARTICIPANT__DB__URL=postgres://postgres:postgres@participant_1_db:5432/db'
- 'MPC__PARTICIPANT__DB__MIGRATE=true'
- 'MPC__PARTICIPANT__DB__CREATE=true'
- 'MPC__PARTICIPANT__AWS__ENDPOINT=http://localstack:4566'
- 'MPC__PARTICIPANT__AWS__REGION=us-east-1'
- 'MPC__PARTICIPANT__QUEUES__DB_SYNC_QUEUE_URL=http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/participant-1-db-sync-queue'
# AWS env vars - they don't matter but are required
- 'AWS_ACCESS_KEY_ID=test'
- 'AWS_SECRET_ACCESS_KEY=test'
- 'AWS_DEFAULT_REGION=us-east-1'
depends_on:
- participant_1_db
- localstack
build:
context: .
dockerfile: Dockerfile
coordinator_db:
hostname: coordinator_db
image: postgres
ports:
- 8432:5432
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
participant_0_db:
hostname: participant_db
image: postgres
ports:
- 8433:5432
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
participant_1_db:
hostname: participant_db
image: postgres
ports:
- 8434:5432
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
iris_db:
hostname: iris_db
image: mongo
ports:
- 27017:27017
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=password
networks:
default:
driver: bridge
volumes:
localstack-data:
# Define the Docker volume