diff --git a/compose.yaml b/compose.yaml index d4b7a24d..78fa2aa0 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,5 +1,6 @@ # This docker compose is for testing a real production env locally.. # Simulates a network etc. +version: '3.7' services: # ----- GENERAL SERVICES ------- @@ -12,38 +13,39 @@ services: retries: 3 networks: - microservices - ports: - - "5672:5672" - - "15672:15672" + # ports: + # - "5672:5672" + # - "15672:15672" # ----- JOBS MICROSERVICE ------- service_jobs: - build: ./services/jobs + image: ahmad45123/workup:service_jobs depends_on: - jobs_db: - condition: service_healthy - service_mq: - condition: service_healthy + - jobs_db + - service_mq networks: - microservices - - jobs # ----- PAYMENTS MICROSERVICE ------- service_payments: - build: ./services/payments + image: ahmad45123/workup:service_payments depends_on: - payments_db: - condition: service_healthy - service_mq: - condition: service_started + - payments_db + - service_mq networks: - microservices - - payments + # ----- PAYMENTS MICROSERVICE ------- + service_contracts: + image: ahmad45123/workup:service_contracts + depends_on: + - contracts_db + - service_mq + networks: + - microservices + jobs_db: image: cassandra:4.0.7 - networks: - - jobs # only accessible by the jobs service volumes: - ./services/jobs/cassandra-config/cassandra.yaml:/etc/cassandra/cassandra.yaml healthcheck: @@ -51,8 +53,14 @@ services: interval: 20s timeout: 10s retries: 60 - ports: - - "9042:9042" + + contracts_db: + image: cassandra:4.0.7 + healthcheck: + test: [ "CMD", "cqlsh", "-e", "describe keyspaces" ] + interval: 20s + timeout: 10s + retries: 60 payments_db: image: postgres:latest @@ -60,13 +68,13 @@ services: POSTGRES_PASSWORD: payments_password POSTGRES_USER: payments_user POSTGRES_DB: payments_database - ports: - - "5432:5432" + + healthcheck: + test: ["CMD", "pg_isready"] + interval: 20s + timeout: 10s + retries: 10 networks: microservices: - driver: bridge - jobs: - driver: bridge - payments: - driver: bridge \ No newline at end of file + driver: overlay