diff --git a/back/docker-compose.yaml b/back/docker-compose.yaml deleted file mode 100644 index f400c1a..0000000 --- a/back/docker-compose.yaml +++ /dev/null @@ -1,36 +0,0 @@ -version: '3' - -services: - postgres: - image: postgres:13.2-alpine - restart: always - volumes: - - ./migrations/:/docker-entrypoint-initdb.d/ - ports: - - "5432:5432" - environment: - POSTGRES_PASSWORD: hh - POSTGRES_DB: hh - POSTGRES_USER: hh - healthcheck: - test: ["CMD-SHELL", "pg_isready -U hh"] - interval: 10s - timeout: 5s - retries: 5 - - back: - image: maven:3.6.3-jdk-11 - restart: always - working_dir: /mnt/app - command: mvn install exec:java - volumes: - - gowork-back-maven-repo:/root/.m2 - - .:/mnt/app:Z - ports: - - "8080:8080" - links: - - postgres - depends_on: - - postgres -volumes: - gowork-back-maven-repo: diff --git a/docker-compose.yaml b/docker-compose.yaml index 59f78f9..6e28df9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,4 @@ -version: '3' +version: '3.4' services: postgres: @@ -32,6 +32,12 @@ services: - postgres depends_on: - postgres + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080/status"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 180s # first start may be long due to downloading dependencies front: build: ./front ports: