-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alexander Pyatakov <alex.pyatakov@envisionblockchain.com>
- Loading branch information
Showing
10 changed files
with
1,058 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,20 @@ | ||
## GUARDIAN ECOSYSTEM ENVIRONMENT NAME | ||
# if you already started to use actively Guardian leave GUARDIAN_ENV empty when you want to use it as usual | ||
# if you want to use a new environment configure GUARDIAN_ENV with a significative environment name | ||
GUARDIAN_ENV="" | ||
# GUARDIAN ECOSYSTEM ENVIRONMENT NAME | ||
# if you have already started actively using Guardian, leave GUARDIAN_ENV blank if you want to continue use it as normal | ||
# if you want to use a new environment, configure GUARDIAN_ENV with a meaningful environment name | ||
GUARDIAN_ENV= | ||
|
||
# GUARDIAN_VERSION | ||
# This variable specifies the version tag for Guardian services images. | ||
# It is used for multiple services in Docker Compose configurations without the "-build" postfix. | ||
# | ||
# Usage: | ||
# - Set to a specific version number for reproducible builds (e.g., "2.27.1") | ||
# - Leave empty to use the default version specified in the Docker Compose file | ||
# | ||
# Examples: | ||
# GUARDIAN_VERSION=2.27.1 | ||
# GUARDIAN_VERSION=latest | ||
# GUARDIAN_VERSION= | ||
# | ||
# Note: If not set, it defaults to "latest" in the Docker Compose file. | ||
GUARDIAN_VERSION= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# https://docs.docker.com/compose/environment-variables/envvars-precedence/ | ||
# Environment leverage the gerarchy defined in the docker compose between "env_file" and "environment" attributes | ||
# ecosystem variables defined in the "env_file" .env.${GUARDIAN_ENV}.guardian.system | ||
# specific service variables defined by "environment" can override what is defined in the ecosystem file | ||
|
||
# YAML anchor that contains common configuration elements for our services | ||
x-service-template: &service-template | ||
init: true | ||
env_file: | ||
- ./configs/.env.${GUARDIAN_ENV}.guardian.system | ||
environment: | ||
- GUARDIAN_ENV=${GUARDIAN_ENV} | ||
|
||
services: | ||
mongo: | ||
image: mongo:6.0.16 | ||
command: "--setParameter allowDiskUseByDefault=true" | ||
restart: always | ||
expose: | ||
- 27017 | ||
|
||
message-broker: | ||
image: nats:2.9.25 | ||
expose: | ||
- 4222 | ||
ports: | ||
- '8222:8222' | ||
command: '-c /etc/nats/nats.conf --http_port 8222' | ||
volumes: | ||
- ./configs/nats.conf:/etc/nats/nats.conf | ||
|
||
logger-service: | ||
<<: *service-template | ||
build: | ||
context: . | ||
dockerfile: ./logger-service/Dockerfile | ||
depends_on: | ||
- message-broker | ||
volumes: | ||
- ./logger-service/configs:/usr/local/app/configs:ro | ||
|
||
auth-service: | ||
<<: *service-template | ||
build: | ||
context: . | ||
dockerfile: ./auth-service/Dockerfile | ||
volumes: | ||
- ./auth-service/tls:/usr/local/app/tls:ro | ||
- ./auth-service/configs:/usr/local/app/configs:ro | ||
depends_on: | ||
- mongo | ||
- message-broker | ||
- logger-service | ||
expose: | ||
- 6555 | ||
- 5005 | ||
|
||
queue-service: | ||
<<: *service-template | ||
build: | ||
context: . | ||
dockerfile: ./queue-service/Dockerfile | ||
depends_on: | ||
- mongo | ||
- message-broker | ||
expose: | ||
- 6555 | ||
volumes: | ||
- ./queue-service/configs:/usr/local/app/configs:ro | ||
|
||
worker-service: | ||
<<: *service-template | ||
build: | ||
context: . | ||
dockerfile: ./worker-service/Dockerfile | ||
depends_on: | ||
queue-service: | ||
condition: service_started | ||
auth-service: | ||
condition: service_started | ||
expose: | ||
- 6555 | ||
volumes: | ||
- ./worker-service/tls:/usr/local/app/tls:ro | ||
- ./worker-service/configs:/usr/local/app/configs:ro | ||
deploy: | ||
replicas: 10 | ||
|
||
analytics-service: | ||
<<: *service-template | ||
build: | ||
context: . | ||
dockerfile: ./analytics-service/Dockerfile | ||
depends_on: | ||
- message-broker | ||
- queue-service | ||
expose: | ||
- 6555 | ||
ports: | ||
- "3000:3020" | ||
volumes: | ||
- ./analytics-service/configs:/usr/local/app/configs:ro | ||
|
||
networks: | ||
monitoring: | ||
driver: bridge |
Oops, something went wrong.