version: "3.0" services: quarkus-petclinic-native: # Build the native image first with the following command: mvn -P native -DskipTests package build: context: . dockerfile: src/main/docker/Dockerfile.native image: quarkus-petclinic-native:latest environment: - QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://quarkus-petclinic-db:5432/mydb ports: - "8080:8080" depends_on: quarkus-petclinic-db: condition: service_healthy networks: - petclinic quarkus-petclinic-db: image: "postgres:14" mem_limit: 128m environment: - POSTGRES_USER=developer - POSTGRES_PASSWORD=developer - POSTGRES_DB=mydb healthcheck: test: ["CMD-SHELL", "pg_isready --dbname $$POSTGRES_DB --username $$POSTGRES_USER"] interval: 5s timeout: 5s retries: 6 ports: - "5432:5432" networks: - petclinic networks: petclinic: driver: bridge