Giter Site home page Giter Site logo

franco148 / fullstack-ci-cd Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 24.58 MB

Implement a complete fullstack app taking into account continuous integration, and continuous delivery with GitHub actions.

Java 47.79% HTML 5.56% CSS 4.13% JavaScript 42.52%

fullstack-ci-cd's Introduction

Mac

  • ./mvnw jib:dockerBuild -Djib.to.image=fullstack:v1
  • ./mvnw clean install jib:dockerBuild -Djib.to.image=fullstack:v1

Windows

  • mvnw jib:dockerBuild -Djib.to.image=fullstack:v1
  • mvnw clean install jib:dockerBuild -Djib.to.image=fullstack:v1

To run container

  • docker run --name fullstack -p 8080:8080 fullstack:v1
  • docker run --name fullstack -p 8080:8080 --net=host fullstack-ci-cd:v1 (This worked in ubuntu)

To delete container with name fullstack

  • docker rm -f fullstack

To view local images run

  • docker image ls

To view running containers

  • docker ps

Commands used:

  • docker login
  • docker pull
  • docker rm -f id
  • ./mvnw clean install jib:build -Djib.to.image=franco148/fullstack-ci-cd:v1.0
  • ./mvnw clean install jib:build -Djib.to.image=franco148/fullstack-ci-cd:latest -D jib.to.auth.username=franco148 -Djib.to.auth.password=yourpassword
  • docker pull franco148/fullstack-ci-cd:latest
  • docker run -p 8080:8080 --net=host franco148/fullstack-ci-cd

Commands used:

  • ./mvnw help:active-profiles

  • ./mvnw clean install -P build-frontend -P jib-push-to-dockerhub -Dapp.image.tag=2

  • ./mvnw clean install -P build-frontend -P jib-push-to-local -Dapp.image.tag=latest

  • docker run --rm -p 8080:8080 franco148/fullstack-ci-cd // This by default is going to execute the LATEST version of the image.

Postgres in Docker:

  • docker run -it --rm postgres:alpine psql -h aa9320n4muma7h.celswdmxhcr1.eu-west-1.rds.amazonaws.com -U amigoscode -d postgres

  • https://hub.docker.com/_/postgres

  • docker network create db, if we want to remove the network docker network rm db

  • Create a folder for the container volume, and go in it.

    1. create a folder to mount /var/lib/postgresql/data
    1. cd into that folder
    • a). Linux: docker run --name db -p 5432:5432 --network=db -v "$PWD:/var/lib/postgresql/data" -e POSTGRES_PASSWORD=password -d postgres:alpine
    • b). Windows: docker run --name db -p 5432:5432 --network=db -v "$(pwd)":/var/lib/postgresql/data -e POSTGRES_PASSWORD=password -d postgres:alpine
    1. Connecting to docker container: docker run -it --rm --network=db postgres:alpine psql -h db -U postgres
  • https://www.mockaroo.com/

One way to run DEV profile, is configuring it in the Intellij IDE

  • Environment Variables: SPRING_PROFILES_ACITVE=dev

Executing the correct profile.

  • java -jar -Dspring.profiles.active=dev target/fullstack-ci-cd-0.0.1-SNAPSHOT.jar

Connecting to the remote AWS RDS

  • docker run -it --rm postgres:alpine psql -h <rds-url-db> -U <database-user> -d postgres

Deploying APP

  • Mac

    • ./mvnw clean install -P build-frontend -P jib-push-to-dockerhub -Dapp.image.tag=3
  • Windows

    • mvnw clean install -P build-frontend -P jib-push-to-dockerhub -Dapp.image.tag=3

Mvn clean install will execute build-frontend automatically.

fullstack-ci-cd's People

Contributors

franco148 avatar franco-avantica avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

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.