-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (78 loc) · 1.9 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
version: "3.9"
networks:
private:
volumes:
emulator-persist:
services:
db:
image: postgres:13-alpine
environment:
POSTGRES_DB: wallet
POSTGRES_USER: wallet
POSTGRES_PASSWORD: wallet
networks:
- private
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready --username=${POSTGRES_USER:-wallet} --dbname=${POSTGRES_DB:-wallet}",
]
interval: 10s
timeout: 5s
retries: 10
redis:
image: redis:6.2-alpine
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./redis-config/redis.conf:/usr/local/etc/redis/redis.conf
- ./redis-config/users.acl:/usr/local/etc/redis/users.acl
networks:
- private
healthcheck:
test:
[
"CMD-SHELL",
"redis-cli ping",
]
interval: 10s
timeout: 5s
retries: 10
emulator:
image: gcr.io/flow-container-registry/emulator:0.27.3
command: emulator --persist
volumes:
- emulator-persist:/flowdb
env_file:
- ./.env
environment:
FLOW_SERVICEPRIVATEKEY: ${FLOW_WALLET_ADMIN_PRIVATE_KEY}
FLOW_SERVICEKEYSIGALGO: ECDSA_P256
FLOW_SERVICEKEYHASHALGO: SHA3_256
FLOW_DBPATH: /flowdb
networks:
- private
api:
build:
context: .
dockerfile: ./docker/wallet/Dockerfile
target: dist
network: host # docker build sometimes has problems fetching from alpine's CDN
networks:
- private
ports:
- "3000:3000"
env_file:
- ./.env
environment:
FLOW_WALLET_DATABASE_DSN: postgresql://wallet:wallet@db:5432/wallet
FLOW_WALLET_DATABASE_TYPE: psql
FLOW_WALLET_ACCESS_API_HOST: emulator:3569
FLOW_WALLET_CHAIN_ID: flow-emulator
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
emulator:
condition: service_started