|
| 1 | +version: '2.1' |
| 2 | +networks: |
| 3 | + step5-compose-network: |
| 4 | + driver: bridge |
| 5 | +services: |
| 6 | + postgres: |
| 7 | + image: postgres:alpine |
| 8 | + labels: |
| 9 | + MAINTAINER: Maksim Kostromin https://github.com/daggerok |
| 10 | + ports: ['5432:5432'] |
| 11 | + environment: |
| 12 | + POSTGRES_DB: postgres |
| 13 | + POSTGRES_USER: postgres |
| 14 | + POSTGRES_PASSWORD: postgres |
| 15 | + POSTGRES_HOST: postgres |
| 16 | + POSTGRES_PORT: 5432 |
| 17 | + networks: |
| 18 | + step5-compose-network: |
| 19 | + aliases: |
| 20 | + - postgres |
| 21 | + - postgres.step5-compose-network |
| 22 | + healthcheck: |
| 23 | + retries: 9 |
| 24 | + timeout: 3s |
| 25 | + interval: 3s |
| 26 | + test: pg_isready -h 127.0.0.1 -p $$POSTGRES_PORT -d $$POSTGRES_DB -U $$POSTGRES_USER |
| 27 | + sessions: |
| 28 | + image: openjdk:8u212-jre-alpine |
| 29 | + labels: |
| 30 | + MAINTAINER: Maksim Kostromin https://github.com/daggerok |
| 31 | + volumes: ['./step5-sessions-rsocket-service/target:/tmp'] |
| 32 | + entrypoint: ash -c 'java -jar /tmp/*.jar' |
| 33 | + ports: ['8093:8093'] |
| 34 | + environment: |
| 35 | + SERVER_PORT: 8093 |
| 36 | + POSTGRES_DB: postgres |
| 37 | + POSTGRES_USER: postgres |
| 38 | + POSTGRES_PASSWORD: postgres |
| 39 | + POSTGRES_HOST: postgres |
| 40 | + POSTGRES_PORT: 5432 |
| 41 | + depends_on: |
| 42 | + postgres: |
| 43 | + condition: service_healthy |
| 44 | + networks: |
| 45 | + step5-compose-network: |
| 46 | + aliases: |
| 47 | + - sessions |
| 48 | + - sessions.step5-compose-network |
| 49 | + healthcheck: |
| 50 | + retries: 9 |
| 51 | + timeout: 3s |
| 52 | + interval: 3s |
| 53 | + test: wget --quiet --tries=1 --spider http://127.0.0.1:$$SERVER_PORT/actuator/health || exit |
| 54 | + speakers: |
| 55 | + image: openjdk:8u212-jre-alpine |
| 56 | + labels: |
| 57 | + MAINTAINER: Maksim Kostromin https://github.com/daggerok |
| 58 | + volumes: ['./step5-speakers-rest-api-service/target:/tmp'] |
| 59 | + entrypoint: ash -c 'java -jar /tmp/*.jar' |
| 60 | + ports: ['8094:8094'] |
| 61 | + environment: |
| 62 | + SERVER_PORT: 8094 |
| 63 | + POSTGRES_DB: postgres |
| 64 | + POSTGRES_USER: postgres |
| 65 | + POSTGRES_PASSWORD: postgres |
| 66 | + POSTGRES_HOST: postgres |
| 67 | + POSTGRES_PORT: 5432 |
| 68 | + depends_on: |
| 69 | + postgres: |
| 70 | + condition: service_healthy |
| 71 | + networks: |
| 72 | + step5-compose-network: |
| 73 | + aliases: |
| 74 | + - speakers |
| 75 | + - speakers.step5-compose-network |
| 76 | + healthcheck: |
| 77 | + retries: 9 |
| 78 | + timeout: 3s |
| 79 | + interval: 3s |
| 80 | + test: wget --quiet --tries=1 --spider http://127.0.0.1:$$SERVER_PORT/actuator/health || exit |
| 81 | + frontend: |
| 82 | + image: openjdk:8u212-jre-alpine |
| 83 | + labels: |
| 84 | + MAINTAINER: Maksim Kostromin https://github.com/daggerok |
| 85 | + volumes: ['./step5-frontend/target:/tmp'] |
| 86 | + entrypoint: ash -c 'java -jar /tmp/*.jar' |
| 87 | + ports: ['8092:8092'] |
| 88 | + environment: |
| 89 | + SERVER_PORT: 8092 |
| 90 | + SESSIONS_HOST: sessions |
| 91 | + SESSIONS_PORT: 8093 |
| 92 | + SPEAKERS_HOST: speakers |
| 93 | + SPEAKERS_PORT: 8094 |
| 94 | + depends_on: |
| 95 | + sessions: |
| 96 | + condition: service_healthy |
| 97 | + speakers: |
| 98 | + condition: service_healthy |
| 99 | + networks: |
| 100 | + step5-compose-network: |
| 101 | + aliases: |
| 102 | + - frontend |
| 103 | + - frontend.step5-compose-network |
| 104 | + healthcheck: |
| 105 | + retries: 9 |
| 106 | + timeout: 3s |
| 107 | + interval: 3s |
| 108 | + test: wget --quiet --tries=1 --spider http://127.0.0.1:$$SERVER_PORT/actuator/health || exit |
| 109 | + healthcheck: |
| 110 | + image: openjdk:8u212-jre-alpine |
| 111 | + depends_on: |
| 112 | + postgres: |
| 113 | + condition: service_started |
| 114 | + sessions: |
| 115 | + condition: service_started |
| 116 | + speakers: |
| 117 | + condition: service_started |
| 118 | + frontend: |
| 119 | + condition: service_healthy |
0 commit comments