-
Notifications
You must be signed in to change notification settings - Fork 15
/
docker-compose.yml
70 lines (64 loc) · 3.09 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
version: '3.8'
# This docker compose setup expects the following environment variables to be present:
# - `TRACK_AND_TRACE_CONTRACT_ADDRESS`: The address of the track and trace contract instance. (Format: '<1234,0>')
# - `TRACK_AND_TRACE_PRIVATE_KEY_FILE`: A path to the account keys used to sponsor the transactions. (For example './private-keys/my-account.export')
#
# The following optional environment variables can be set:
# - `TRACK_AND_TRACE_NETWORK`: The network to run the services on. Either 'mainnet' or 'testnet'. (Defaults to 'testnet')
# - `TRACK_AND_TRACE_NODE`: The gRPC interface of a node on the correct network. (Defaults to 'https://grpc.testnet.concordium.com')
services:
sponsored-transaction-service:
build:
context: ../
dockerfile: ./trackAndTrace/dockerfiles/sponsored-transaction-service.Dockerfile
restart: always
ports:
- 8000:8000
volumes:
- ${TRACK_AND_TRACE_PRIVATE_KEY_FILE:?Please specify the private key file of the sponsor account.}:/private-keys/sponsor-account.export
environment:
CCD_SPONSORED_TRANSACTION_SERVICE_ALLOWED_ACCOUNTS: Any # This should ideally be limited to avoid draining the sponsor account funds.
CCD_SPONSORED_TRANSACTION_SERVICE_ALLOWED_CONTRACTS: ${TRACK_AND_TRACE_CONTRACT_ADDRESS:?Please specify the Track and Trace contract instance address (format <1234,0>)}
CCD_SPONSORED_TRANSACTION_SERVICE_PRIVATE_KEY_FILE: /private-keys/sponsor-account.export
CCD_SPONSORED_TRANSACTION_SERVICE_LISTEN_ADDRESS: 0.0.0.0:8000
CCD_SPONSORED_TRANSACTION_SERVICE_NODE: ${TRACK_AND_TRACE_NODE:-https://grpc.testnet.concordium.com:20000}
server:
build:
context: ../
dockerfile: ./trackAndTrace/dockerfiles/server.Dockerfile
restart: always
environment:
CCD_SERVER_DB_CONNECTION: "host=postgres dbname=indexer user=postgres password=password port=5432"
CCD_SERVER_CONTRACT_ADDRESS: ${TRACK_AND_TRACE_CONTRACT_ADDRESS:?Please specify the Track and Trace contract instance address (format <1234,0>)}
CCD_SERVER_SPONSORED_TRANSACTION_BACKEND: "http://localhost:8000"
CCD_SERVER_NETWORK: ${TRACK_AND_TRACE_NETWORK:-testnet}
CCD_SERVER_NODE: ${TRACK_AND_TRACE_NODE:-https://grpc.testnet.concordium.com:20000}
ports:
- 8080:8080
depends_on:
- postgres
- indexer
indexer:
build:
context: ../
dockerfile: ./trackAndTrace/dockerfiles/indexer.Dockerfile
restart: always
environment:
CCD_INDEXER_CONTRACT: ${TRACK_AND_TRACE_CONTRACT_ADDRESS:?Please specify the Track and Trace contract instance address (format <1234,0>)}
CCD_INDEXER_NODE: ${TRACK_AND_TRACE_NODE:-https://grpc.testnet.concordium.com:20000}
CCD_INDEXER_DB_CONNECTION: "host=postgres dbname=indexer user=postgres password=password port=5432"
depends_on:
- postgres
postgres:
image: postgres:latest
ports:
- 5432:5432
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: indexer
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
volumes:
postgres_data: