Git Product home page Git Product logo

accenture's Introduction

DOCKER SHOULD INCLUDE

docker pull mysql
docker pull openjdk:8

CREATE NETWORK

docker network create accenture-network

CREATE MYSQL CONTAINER

docker run --detach \
--name accenture-mysql \
--net=accenture-network\
-p 3307:3306 \
-e MYSQL_ROOT_PASSWORD=root \
-e MYSQL_DATABASE=accenturedb \
-e MYSQL_USER=sa \
-e MYSQL_PASSWORD=sa \
-d mysql

LOAD SCHEMA TO DOCKER (a0 => ????) -In terminal, type 'docker container ls'. -take the container Id which you created. -replace with 'e0' -After replacing, run below command.

docker exec -i e0 mysql -uroot -proot < src/main/resources/schema.sql 

BUILD In intellij terminal, type below command

docker build . -t accenture-spring

RUN IMAGE

docker run -dit -p 8080:8080 --net=accenture-network accenture-spring

or docker run -dit -p 8080:8080 --net=accenture-network accenture-spring

-Go to localhost:8080/load -Load data only one times. It will take some time to load all data. When you see below 3 command in terminal, load process is completed successfully. ?*** CountrytLoad is complete successfully ?*** AirportLoad is complete successfully ?*** CountrytLoad is complete successfully Locally it takes short time but in docker takes some time. Please wait

-Go to localhost:8080/index -Search country with code or name. If you enter both option then code will be proceed. If you enter not complete code, first found result will be shown. -Back to localhost:8080/

DELETE BELOW! NOTE FOR MYSELF FileName docker exec -i e0 mysql -uroot -proot < src/main/resources/schema.sql docker run --net=host test-accenture-spring docker run -p 8080:8080 --name accenture-spring --link accenture-mysql-2:mysql -d accenture-spring

docker run --name accenture-mysql -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=accenture-db -e MYSQL_USER=sa -e MYSQL_PASSWORD=sa -d mysql FIle Name https://github.com/Damla78/accenture

=== load schema to docker docker exec -i e0 mysql -uroot -proot < src/main/resources/schema.sql

== start using host network docker run --net=host test-accenture-spring

START MY SQL CONTAINER

docker run --detach --name accenture-mysql-2 -p 3307:3306 -e MYSQL_ROOT_PASSWORD=root \
-e MYSQL_DATABASE=accenturedb -e MYSQL_USER=sa -e MYSQL_PASSWORD=sa -d mysql

application properties finalName build -docker pull adoptopenjdk/openjdk8 docker pull openjdk:8

BUILD DOCKER IMAGE In Intellij terminal, run following command

docker build -t flightdb .

INTERACT WITH MY DATABASE

docker run -it --link flight-mysql --rm mysql sh -c 'exec mysql 
-h"$MYSQL_POORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_POORT" 
-uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'

docker run -it --link flight:mysql --rm mysql sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'

FROM adoptopenjdk/openjdk8:ubi ADD target/accenture-spring.jar accenture-spring.jar EXPOSE 8080 ENTRYPOINT ["java", "-Dspring.profiles.active=mysql", "-jar","/accenture-spring.jar"]

FROM openjdk:8 ADD target/accenture-spring.jar accenture-spring.jar EXPOSE 8080 ENTRYPOINT ["java", "-Dspring.profiles.active=mysql", "-jar","accenture-spring.jar"]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.