forked from keep-starknet-strange/art-peace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
135 lines (133 loc) · 2.95 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
version: "3"
services:
redis:
image: redis:7.2.4-alpine
restart: always
ports:
- 6379:6379
command: redis-server
volumes:
- redis:/data
postgres:
image: postgres:14.11-alpine
restart: always
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql/data
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=art-peace-user
- POSTGRES_DB=art-peace-db
backend:
build:
dockerfile: backend/Dockerfile
context: .
ports:
- 8080:8080
links:
- redis
- postgres
restart: always
environment:
- POSTGRES_PASSWORD=password
devnet:
image: shardlabs/starknet-devnet-rs:0.0.3
command:
- --dump-on=transaction
- --dump-path=/data/dump
- --seed=42
volumes:
- devnet:/data
ports:
- 5050:5050
deployer:
build:
dockerfile: onchain/Dockerfile.init
context: .
depends_on:
- devnet
restart: no
command: bash -c "./initialize.sh"
environment:
- SCARB=/root/.local/bin/scarb
volumes:
- configs:/configs
updater:
build:
dockerfile: onchain/Dockerfile.update
context: .
depends_on:
devnet:
condition: service_started
deployer:
condition: service_completed_successfully
command: bash -c "./update_devnet.sh"
volumes:
- configs:/configs
apibara:
image: quay.io/apibara/starknet:1.5.0
command:
- start
- --rpc=http://devnet:5050/rpc
- --name=devnet
- --head-refresh-interval-ms=1000
- --wait-for-rpc
- --address=0.0.0.0:7171
environment:
- XDG_DATA_HOME=/data
volumes:
- apibara:/data
ports:
- 7171:7171
links:
- backend
- devnet
depends_on:
devnet:
condition: service_started
indexer:
build:
dockerfile: indexer/Dockerfile
context: .
depends_on:
deployer:
condition: service_completed_successfully
apibara:
condition: service_started
links:
- backend
- apibara
environment:
- APIBARA_STREAM_URL=http://art-peace-apibara-1:7171
- BACKEND_TARGET_URL=http://art-peace-backend-1:8080/consume-indexer-msg
- PERSIST_TO_REDIS=redis://art-peace-redis-1:6379
- INDEXER_ID=art-peace-indexer-id
volumes:
- configs:/configs
restart: on-failure
frontend:
build:
dockerfile: frontend/Dockerfile
context: .
depends_on:
deployer:
condition: service_completed_successfully
ports:
- 3000:3000
links:
- backend
- devnet
volumes:
- ./frontend/package.json:/app/package.json
- ./frontend/package-lock.json:/app/package-lock.json
- ./frontend/public/:/app/public
- ./frontend/src:/app/src
- configs:/app/src/configs
volumes:
redis:
postgres:
devnet:
apibara:
configs: