forked from Luivatra/ergopad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
136 lines (123 loc) · 3.53 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
136
version: '3.9'
# docker compose -f docker-compose-{env}.yml --profile {env} up -d
# up will include changes; rebuilding container if needed
# -d = daemon mode
# docker compose -f docker-compose-dev.yml -f docker-compose.yml up flower
services:
nginx:
container_name: nginx
env_file: .env
image: nginx:1.21
volumes:
- ./nginx:/etc/nginx
ports:
- ${NGINX_PORT}:${NGINX_PORT}
backend:
container_name: backend
env_file: .env
build:
context: .
dockerfile: Dockerfile.backend
volumes:
- ./backend/app:/app
ports:
- ${BACKEND_PORT}:${BACKEND_PORT}
depends_on:
- postgres
command: uvicorn main:app --reload --workers 4 --reload-dir /app --host 0.0.0.0 --port ${BACKEND_PORT}
postgres:
container_name: postgres
env_file: .env
image: postgres:14-alpine
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data:cached
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
redis:
container_name: redis
env_file: .env
image: redis
volumes:
- redis_data:/data # redis persistence
ports:
- ${REDIS_PORT}:6379
entrypoint: redis-server --appendonly yes
pgadmin:
container_name: pgadmin
env_file: .env
image: dpage/pgadmin4
ports:
- ${PGADMIN_LISTEN_PORT}:${PGADMIN_LISTEN_PORT}
depends_on:
- postgres
profiles:
- monitor
aggregator:
container_name: aggregator
env_file: .env
build:
context: .
dockerfile: Dockerfile.aggregator
volumes:
- ./aggregator/app:/app # !! update for main docker-compose file
ports:
- ${AGGREGATOR_PORT}:${AGGREGATOR_PORT}
# command: uvicorn main:app --reload --workers 4 --reload-dir /app --host 0.0.0.0 --port ${AGGREGATOR_PORT}
command: python main.py # TODO: automate with celery and API to call refreshes; infinite loop for now
celery:
container_name: celery
env_file: .env
build:
context: .
dockerfile: Dockerfile.celery
volumes:
- ./celery/app:/app # !! update for main docker-compose file
# command: celery --app app.tasks worker --loglevel=${CELERY_LOGLEVEL} -Q main-queue -c 1
flower:
container_name: flower
env_file: .env
image: mher/flower
ports:
- ${FLOWER_PORT}:${FLOWER_PORT}
depends_on:
- redis
- celery
profiles:
- monitor
command: celery --broker=redis://redis:${REDIS_PORT}/0 flower --port=${FLOWER_PORT}
ergonode:
container_name: ergonode
env_file: .env
image: openjdk
volumes:
- ./ergonode/:/opt/ergo # jar/conf
- /ergo/mainnet/.ergo:/opt/ergo/.ergo # blockchain
ports:
- ${ERGONODE_PORT}:${ERGONODE_PORT}
- 9030:9030
working_dir: /opt/ergo
logging:
driver: "json-file"
options:
max-file: 5
max-size: 10m
command: java -jar -Xmx3G -Dlogback.stdout.level=${ERGONODE_LOGLEVEL} -Dlogback.file.level=${ERGONODE_LOGLEVEL} ergo.jar --${ERGONODE_NETWORK} -c ${ERGONODE_CONF}
assembler:
container_name: assembler
env_file: .env
image: openjdk:11.0.13-jdk-buster
volumes:
- ./assembler/:/opt/assembler
ports:
- ${ASSEMBLER_PORT}:${ASSEMBLER_PORT}
working_dir: /opt/assembler # set this if using image and not build
logging:
driver: "json-file"
options:
max-file: 5
max-size: 10m
command: java -jar -Dconfig.file=${ASSEMBLER_CONF} -Dhttp.port=${ASSEMBLER_PORT} ${ASSEMBLER_JAR}
volumes:
postgres_data:
redis_data: