Skip to content

firas-sitech/coding_challange_1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Exercise 1: E2E Application

1- Application will be run and executed using the bellow command.
2- Site accessible from url http://localhost:8080

Docker Compose Spring Boot and MySQL example

Make suer your docker is up and runing on your local machine

###Run the System We can easily run the whole with only a single command:

docker-compose up

Docker will pull the MySQL and Spring Boot images (if our machine does not have it before). The services can be run on the background with command:

docker-compose up -d

Stop the System

Stopping all the running containers is also simple with a single command:

docker-compose down

Note

This application testn Windows you will may face issue related to .env file on iOS So replace docker-compose.yml content file with following code:

version: "3.8"

services:
  mysqldb:
    image: mysql:5.7
    container_name: mysql-image
    restart: unless-stopped
    env_file: ./.env
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=student_service
    ports:
      - 3306:3306
    volumes:
      - ./data/logs:/logs
      - ./usr/local/var/mysql:/var/lib/mysql
  
  api:
    depends_on:
      - mysqldb
    links:
      - mysqldb:mysqldb
    container_name: api
    restart: on-failure
    image: studnent-service-img
    build:
      context: ./crud-service
      dockerfile: ./Dockerfile
    ports:
      - 8080:8080

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published