1

I am unable to access a spring boot application. I have deployed a Spring boot application on AWS app runner using ECR. I don't see any errors on neither application logs Event logs. App runner status is also green.

On app runner port is configured to 8080.

docker-compose file

services:
  my-app:
    image: my-app
    ports:
      - "8080:8080"
    environment:
      - DATABASE_HOST=${DATABASE_HOST}
      - DATABASE_USER=${DATABASE_USER}
      - DATABASE_PASSWORD=${DATABASE_PASSWORD}
      - DATABASE_NAME=${DATABASE_NAME}
      - DATABASE_PORT=3306  
    networks:
      - dummy-mysql
    depends_on:
            mysqldb:
                condition: service_healthy
      
 
  mysqldb:
    image: mysql:8
    ports:
      - '3307:3306'
    networks:
      - dummy-mysql
    environment:
      - MYSQL_ROOT_PASSWORD=${DATABASE_PASSWORD}
      - MYSQL_DATABASE=${DATABASE_NAME}
    healthcheck:
        test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
        timeout: 20s
        retries: 10  
      
networks:
  dummy-mysql:
kunal
  • 779
  • 6
  • 25
  • please add some example of your Dockerfile, Docker-compose and file structure. – Dory Nguyen Jul 07 '21 at 18:56
  • Attached docker-compose file. – kunal Jul 07 '21 at 19:10
  • Have you tried change `- DATABASE_PORT=3306` to 3307? – Dory Nguyen Jul 07 '21 at 19:20
  • Do you see any messages in on the screen? Or is it just timeout? – Dory Nguyen Jul 07 '21 at 19:24
  • How are you setting up the application in App Runner? AR does not support docker-compose syntax (and it doesn't support stateful/db services) so you will have to break up that compose file into a mysql backend that you are deploying separately (how?) and an AR service that will have to talk to that mysql endpoint. You can't use a compose file to define your springboot app running in AR. – mreferre Jun 20 '22 at 13:18

0 Answers0