-
-
Save lysandroc/6506b8c23b9ae022427db8fef49505e4 to your computer and use it in GitHub Desktop.
Architecture Distributed Environment
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
version: '3.4' | |
services: | |
cache-redis: | |
image: 'redis:6-alpine' | |
container_name: cache-redis | |
environment: | |
REDIS_HOST: ${REDIS_HOST} | |
REDIS_DEFAULT_USER: ${REDIS_DEFAULT_USER} | |
REDIS_DEFAULT_PASS: ${REDIS_DEFAULT_PASS} | |
ports: | |
- 6379:6379 | |
hostname: cache-redis | |
healthcheck: | |
test: ["CMD", "redis-cli", "ping"] | |
interval: 1s | |
timeout: 3s | |
retries: 30 | |
messaging-broker-rabbitmq: | |
image: 'rabbitmq:3-management-alpine' | |
container_name: messaging-broker-rabbitmq | |
environment: | |
RABBITMQ_HOST: ${RABBITMQ_HOST} | |
RABBITMQ_ERLANG_COOKIE: ${RABBITMQ_ERLANG_COOKIE} | |
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER} | |
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS} | |
ports: | |
- 5672:5672 | |
- 15672:15672 | |
hostname: messaging-broker-rabbitmq | |
healthcheck: | |
test: [ "CMD", "nc", "-z", "localhost", "5672" ] | |
interval: 10s | |
timeout: 5s | |
retries: 5 | |
volumes: | |
- './docker-volumes/messaging-broker-rabbitmq/etc/:/etc/rabbitmq/' | |
- './docker-volumes/messaging-broker-rabbitmq/data/:/var/lib/rabbitmq/' | |
- './docker-volumes/messaging-broker-rabbitmq/logs/:/var/log/rabbitmq/' | |
distributed-couchdb-headquarters: | |
image: 'couchdb:3.1.0' | |
container_name: distributed-couchdb-headquarters | |
environment: | |
COUCHDB_HOST_HEADQUARTERS: ${COUCHDB_HOST_HEADQUARTERS} | |
COUCHDB_USER: ${COUCHDB_USER} | |
COUCHDB_PASSWORD: ${COUCHDB_PASSWORD} | |
ports: | |
- '5985:5985' | |
hostname: distributed-couchdb-headquarters | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:5985"] | |
interval: 10s | |
timeout: 5s | |
retries: 5 | |
volumes: | |
- './docker-volumes/distributed-couchdb-headquarters/data:/opt/couchdb/data/' | |
- './docker-volumes/distributed-couchdb-headquarters/etc/local.ini:/opt/couchdb/etc/local.d/docker.ini' | |
- './docker-volumes/distributed-couchdb-headquarters/log/:/opt/couchdb/var/log/' | |
distributed-couchdb-office: | |
image: 'couchdb:3.1.0' | |
container_name: distributed-couchdb-office | |
environment: | |
COUCHDB_HOST_OFFICE: ${COUCHDB_HOST_OFFICE} | |
COUCHDB_USER: ${COUCHDB_USER} | |
COUCHDB_PASSWORD: ${COUCHDB_PASSWORD} | |
ports: | |
- '5984:5984' | |
hostname: distributed-couchdb-office | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:5984"] | |
interval: 10s | |
timeout: 5s | |
retries: 5 | |
volumes: | |
- './docker-volumes/distributed-couchdb-office/data:/opt/couchdb/data' | |
- './docker-volumes/distributed-couchdb-office/etc/local.ini:/opt/couchdb/etc/local.d/docker.ini' | |
- './docker-volumes/distributed-couchdb-office/log/:/opt/couchdb/var/log/' | |
postgres-log: | |
image: 'postgres:9.6.2' | |
container_name: postgres-log | |
environment: | |
POSTGRES_HOST: ${POSTGRES_HOST} | |
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | |
POSTGRES_DB: ${POSTGRES_DB} | |
POSTGRES_USER: ${POSTGRES_USER} | |
PGDATA: /tmp | |
ports: | |
- '5432:5432' | |
hostname: postgres-log | |
healthcheck: | |
test: ["CMD-SHELL", "pg_isready -U postgres"] | |
interval: 10s | |
timeout: 5s | |
retries: 5 | |
volumes: | |
- './docker-volumes/postgres-desenvolvimento:/var/lib/postgresql/data' | |
database-application-sqlserver: | |
image: mcr.microsoft.com/mssql/server:2017-latest | |
container_name: database-application-sqlserver | |
environment: | |
SQLSERVER_HOST: ${SQLSERVER_HOST} | |
SA_PASSWORD: ${SA_PASSWORD} | |
ACCEPT_EULA: 'Y' | |
ports: | |
- '1433:1433' | |
hostname: database-application-sqlserver | |
healthcheck: | |
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-Usa", "-P!@#123qweA", "-Q", "select 1"] | |
interval: 1s | |
retries: 20 | |
volumes: | |
- './docker-volumes/database-application-sqlserver/scripts:/scripts' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment