| version: '2.1' |
| |
| services: |
| mysql: |
| image: "mysql/mysql-server:5.7" |
| hostname: mysql |
| environment: |
| - MYSQL_ROOT_PASSWORD=password |
| - MYSQL_DATABASE=saga |
| - MYSQL_USER=saga |
| - MYSQL_PASSWORD=password |
| ports: |
| - "3306:3306" |
| healthcheck: |
| test: ["CMD-SHELL", "nc -z localhost 3306 &> /dev/null; echo $$?"] |
| interval: 30s |
| timeout: 10s |
| retries: 5 |
| |
| payment: |
| image: "payment:0.0.2-SNAPSHOT" |
| hostname: payment |
| ports: |
| - "8080" |
| |
| membership: |
| image: "membership:0.0.2-SNAPSHOT" |
| hostname: membership |
| ports: |
| - "8080" |
| |
| inventory: |
| image: "inventory:0.0.2-SNAPSHOT" |
| hostname: inventory |
| ports: |
| - "8080" |
| |
| supplier: |
| image: "supplier:0.0.2-SNAPSHOT" |
| hostname: supplier |
| ports: |
| - "8080" |
| |
| saga: |
| image: "saga-spring:0.0.2-SNAPSHOT" |
| hostname: saga |
| links: |
| - "mysql:mysql.servicecomb.io" |
| - "payment:payment.servicecomb.io" |
| - "membership:membership.servicecomb.io" |
| - "inventory:inventory.servicecomb.io" |
| - "supplier:supplier.servicecomb.io" |
| environment: |
| - JAVA_OPTS=-Dspring.profiles.active=prd -Dspring.main.webEnvironment=true |
| ports: |
| - "8083:8080" |
| depends_on: |
| mysql: |
| condition: service_healthy |