8000 add request response docker compose file by jo-bisonai · Pull Request #263 · Bisonai/orakl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

add request response docker compose file #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions core/.env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
NODE_ENV=
CHAIN=
HOST_SETTINGS_DB_DIR=
HEALTH_CHECK_PORT=
SLACK_WEBHOOK_URL=
LOG_LEVEL=
LOG_DIR=
REDIS_HOST=
REDIS_PORT=
REDIS_PORT=
## Below settings for Docker
HOST_SETTINGS_DB_DIR=
HOST_SETTINGS_LOG_DIR=
4 changes: 2 additions & 2 deletions core/docker-compose.build.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: '3.7'

services:
icn:
orakl:
build:
context: .
dockerfile: src/Dockerfile.dev
image: core-icn
image: orakl:v.0.0.1
100 changes: 100 additions & 0 deletions core/docker-compose.request-response.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
version: '3.7'

services:
redis:
# redis:7.0.5-alpine3.17
image: redis@sha256:06e4453169faaf4af93fe38689c8f8f85440990f9b9c1e91b0f9f98b1679452a
container_name: redis_dev
hostname: redis_dev
expose:
- 6379
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 30s
retries: 50
restart: always

listener-request-response:
image: orakl:v.0.0.1
container_name: listener_request_response_dev
hostname: listener_request-response_dev
entrypoint: ["yarn", "start:listener:request_response"]
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- NODE_ENV=production
- ORAKL_DIR=/app/db
- CHAIN=baobab
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be careful with this CHAIN settings, later we will deploy to other chains.

- HEALTH_CHECK_PORT
- SLACK_WEBHOOK_URL
- LOG_DIR=/app/log
- LOG_LEVEL=info
- REDIS_HOST=redis
- REDIS_PORT=6379
healthcheck:
&common-healthcheck
test: "curl --fail http://localhost:${HEALTH_CHECK_PORT} || exit 1"
interval: 5s
timeout: 30s
retries: 3
start_period: 10s
depends_on:
&common-depends_on
redis:
condition: service_healthy
restart: unless-stopped
volumes:
- ${HOST_SETTINGS_DB_DIR}:/app/db
- ${HOST_SETTINGS_LOG_DIR}:/app/log

worker-request-response:
image: orakl:v.0.0.1
container_name: worker_request-response_dev
hostname: worker_request-response_dev
entrypoint: ["yarn", "start:worker:request_response"]
environment:
- NODE_ENV=production
- ORAKL_DIR=/app/db
- CHAIN=baobab
- HEALTH_CHECK_PORT
- SLACK_WEBHOOK_URL
- LOG_DIR=/app/log
- LOG_LEVEL=info
- REDIS_HOST=redis
- REDIS_PORT=6379
healthcheck:
<<: *common-healthcheck
depends_on:
<<: *common-depends_on
restart: unless-stopped
volumes:
- ${HOST_SETTINGS_DB_DIR}:/app/db
- ${HOST_SETTINGS_LOG_DIR}:/app/log

reporter-request-response:
image: orakl:v.0.0.1
extra_hosts:
- "host.docker.internal:host-gateway"
container_name: reporter_request-response_dev
hostname: reporter_request-response_dev
entrypoint: ["yarn", "start:reporter:request_response"]
environment:
- NODE_ENV=production
- ORAKL_DIR=/app/db
- CHAIN
- HEALTH_CHECK_PORT
- SLACK_WEBHOOK_URL
- LOG_DIR=/app/log
- LOG_LEVEL=info
- REDIS_HOST=redis
- REDIS_PORT=6379
healthcheck:
<<: *common-healthcheck
depends_on:
<<: *common-depends_on
restart: unless-stopped
volumes:
- ${HOST_SETTINGS_DB_DIR}:/app/db
- ${HOST_SETTINGS_LOG_DIR}:/app/log

25 changes: 20 additions & 5 deletions core/docker-compose.vrf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
restart: always

listener-vrf:
image: core-icn
image: orakl:v.0.0.1
container_name: listener_vrf_dev
hostname: listener_vrf_dev
entrypoint: ["yarn", "start:listener:vrf"]
Expand All @@ -25,9 +25,13 @@ services:
environment:
- NODE_ENV=production
- ORAKL_DIR=/app/db
- CHAIN
- CHAIN=baobab
- HEALTH_CHECK_PORT
- SLACK_WEBHOOK_URL
- LOG_DIR=/app/log
- LOG_LEVEL=info
- REDIS_HOST=redis
- REDIS_PORT=6379
healthcheck:
&common-healthcheck
test: "curl --fail http://localhost:${HEALTH_CHECK_PORT} || exit 1"
Expand All @@ -42,28 +46,34 @@ services:
restart: unless-stopped
volumes:
- ${HOST_SETTINGS_DB_DIR}:/app/db
- ${HOST_SETTINGS_LOG_DIR}:/app/log

worker-vrf:
image: core-icn
image: orakl:v.0.0.1
container_name: worker_vrf_dev
hostname: worker_vrf_dev
entrypoint: ["yarn", "start:worker:vrf"]
environment:
- NODE_ENV=production
- ORAKL_DIR=/app/db
- CHAIN
- CHAIN=baobab
- HEALTH_CHECK_PORT
- SLACK_WEBHOOK_URL
- LOG_DIR=/app/log
- LOG_LEVEL=info
- REDIS_HOST=redis
- REDIS_PORT=6379
healthcheck:
<<: *common-healthcheck
depends_on:
<<: *common-depends_on
restart: unless-stopped
volumes:
- ${HOST_SETTINGS_DB_DIR}:/app/db
- ${HOST_SETTINGS_LOG_DIR}:/app/log

reporter-vrf:
image: core-icn
image: orakl:v.0.0.1
extra_hosts:
- "host.docker.internal:host-gateway"
container_name: reporter_vrf_dev
Expand All @@ -75,10 +85,15 @@ services:
- CHAIN
- HEALTH_CHECK_PORT
- SLACK_WEBHOOK_URL
- LOG_DIR=/app/log
- LOG_LEVEL=info
- REDIS_HOST=redis
- REDIS_PORT=6379
healthcheck:
<<: *common-healthcheck
depends_on:
<<: *common-depends_on
restart: unless-stopped
volumes:
- ${HOST_SETTINGS_DB_DIR}:/app/db
- ${HOST_SETTINGS_LOG_DIR}:/app/log
0