DEV Community

loading...

Expense Manager - SpringBoot and ThymLeaf (Dockerized)

Vijai
Backend Developer - Java | Spring boot | Docker | Kubernetes
・1 min read

EXPENSE MANAGER

Pull the image using the below command:

 docker pull vijaim/expensemanager:latest 
Enter fullscreen mode Exit fullscreen mode

Use the below as docker compose file.

Docker-compose.yml


 version: "3.7"
services:
  mysql-service:
    image: mysql:5.7
    networks:
      - spring-boot-mysql-network
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=1234
      - MYSQL_DATABASE=testapp
  expensemanager: 
    image: {id of the pulled image }
    ports:
      - "4000:4000"
    networks:
      - spring-boot-mysql-network
    depends_on:
      - mysql-service
networks:
  spring-boot-mysql-network:
    driver: bridge

Enter fullscreen mode Exit fullscreen mode

Run the below command:

docker-compose up
Enter fullscreen mode Exit fullscreen mode

After successful build,You can access the application in

http://localhost:4000
Enter fullscreen mode Exit fullscreen mode

Discussion (0)