forked from planetarium/Corvette
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
104 lines (104 loc) · 3.13 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
version: '3.8'
services:
observer:
depends_on:
message-queue-broker:
condition: service_healthy
image: "ghcr.io/planetarium/corvette-observer:${VERSION:-build-latest}"
build:
context: .
target: observer
container_name: observer
environment:
DATABASE_URL: postgres://postgres:V0uYcxk2dFixtPWfK4Nb@db/postgres
AMQP_BROKER_URL: amqp://message-queue-broker
CHAIN_DEFINITION_URL: https://esm.sh/@wagmi/[email protected]#goerli
BLOCK_FINALITY: safe
emitter:
depends_on:
message-queue-broker:
condition: service_healthy
image: "ghcr.io/planetarium/corvette-emitter:${VERSION:-build-latest}"
build:
context: .
target: emitter
container_name: emitter
environment:
DATABASE_URL: postgres://postgres:V0uYcxk2dFixtPWfK4Nb@db/postgres
AMQP_BROKER_URL: amqp://message-queue-broker
CHAIN_DEFINITION_URL: https://esm.sh/@wagmi/[email protected]#goerli
api:
depends_on:
message-queue-broker:
condition: service_healthy
image: "ghcr.io/planetarium/corvette-api:${VERSION:-build-latest}"
ports:
- "8000:80/tcp"
build:
context: .
target: api
container_name: api
environment:
DATABASE_URL: postgres://postgres:V0uYcxk2dFixtPWfK4Nb@db/postgres
AMQP_BROKER_URL: amqp://message-queue-broker
API_URL: http://api:80
web:
depends_on:
message-queue-broker:
condition: service_healthy
api:
condition: service_started
image: "ghcr.io/planetarium/corvette-web:${VERSION:-build-latest}"
ports:
- "3000:80/tcp"
environment:
DATABASE_URL: postgres://postgres:V0uYcxk2dFixtPWfK4Nb@db/postgres
AMQP_BROKER_URL: amqp://message-queue-broker
WEBUI_URL: http://web:80
build:
context: .
target: web
args:
DENO_DEPLOYMENT_ID: "${VERSION}"
container_name: web
migrate-db:
depends_on:
db:
condition: service_healthy
build:
context: .
target: common
environment:
DATABASE_URL: postgres://postgres:V0uYcxk2dFixtPWfK4Nb@db/postgres
command: sh -c 'deno task prisma migrate diff --from-schema-datasource prisma/schema.prisma --to-schema-datamodel prisma/schema.prisma --script > migrate.sql && deno task prisma db execute --file ./migrate.sql --schema prisma/schema.prisma'
message-queue-broker:
image: rabbitmq:3.12.2-alpine
restart: always
container_name: message-queue-broker
hostname: message-queue-broker
volumes:
- ./docker-compose-data/mq:/var/lib/rabbitmq
healthcheck:
timeout: 5s
interval: 5s
retries: 5
test:
- "CMD"
- "rabbitmqctl"
- "status"
db:
image: postgres:15.3-alpine3.18
command: ["postgres", "-c", "log_min_messages=fatal"]
restart: always
container_name: db
environment:
POSTGRES_PASSWORD: "V0uYcxk2dFixtPWfK4Nb"
volumes:
- ./docker-compose-data/db:/var/lib/postgresql/data/
healthcheck:
timeout: 5s
interval: 5s
retries: 5
test:
- "CMD-SHELL"
- "pg_isready --dbname=postgres --host=localhost --username=postgres"