Skip to content

Commit 4e8f845

Browse files
committed
Initial commit
1 parent 5ad8793 commit 4e8f845

File tree

158 files changed

+19650
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+19650
-2
lines changed

.github/workflows/digitalocean.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
branches:
7+
- main
8+
# Environment variables available to all jobs and steps in this workflow
9+
env:
10+
ANGULAR_IMAGE_NAME: social-login-app-client
11+
ANGULAR_CONTAINER_NAME: social-login-app-client
12+
ANGULAR_DEPLOYMENT_NAME: social-login-app-client
13+
SPRING_BOOT_IMAGE_NAME: social-login-app-server
14+
SPRING_BOOT_CONTAINER_NAME: social-login-app-server
15+
SPRING_BOOT_DEPLOYMENT_NAME: social-login-app-server
16+
jobs:
17+
18+
build:
19+
name: Build, push, and deploy
20+
runs-on: ubuntu-latest
21+
steps:
22+
23+
- name: Checkout main
24+
uses: actions/checkout@main
25+
26+
- name: Login to Docker Hub
27+
uses: docker/login-action@v1
28+
with:
29+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
30+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
31+
32+
- name: Provide permission to run mvnw
33+
run: chmod +x ./spring-boot-oauth2-social-login/mvnw
34+
35+
- name: Build and push Angular Image
36+
id: angular_docker_build
37+
uses: docker/build-push-action@v2
38+
with:
39+
context: ./angular-11-social-login
40+
file: ./angular-11-social-login/Dockerfile
41+
push: true
42+
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.ANGULAR_IMAGE_NAME }}:${{ github.sha }}
43+
44+
- name: Build and push Spring Boot Image
45+
id: spring-boot-docker_build
46+
uses: docker/build-push-action@v2
47+
with:
48+
context: ./spring-boot-oauth2-social-login
49+
file: ./spring-boot-oauth2-social-login/Dockerfile
50+
push: true
51+
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.SPRING_BOOT_IMAGE_NAME }}:${{ github.sha }}
52+
53+
- name: Install doctl
54+
uses: digitalocean/action-doctl@v2
55+
with:
56+
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
57+
58+
- name: Save DigitalOcean kubeconfig with short-lived credentials
59+
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 k8s-1-20-2-do-0-blr1-1619022201280
60+
61+
# Deploy Angular & Spring Boot Docker image to the DigitalOcean kubernetes cluster
62+
- name: Deploy
63+
run: |-
64+
kubectl set image deployment/${{env.ANGULAR_DEPLOYMENT_NAME}} ${{env.ANGULAR_CONTAINER_NAME}}=${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.ANGULAR_IMAGE_NAME }}:${{ github.sha }}
65+
kubectl set image deployment/${{env.SPRING_BOOT_DEPLOYMENT_NAME}} ${{ env.SPRING_BOOT_CONTAINER_NAME}}=${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.SPRING_BOOT_IMAGE_NAME }}:${{ github.sha }}
66+
kubectl rollout status deployment/${{env.ANGULAR_DEPLOYMENT_NAME}}
67+
kubectl rollout status deployment/${{env.SPRING_BOOT_DEPLOYMENT_NAME}}
68+
kubectl get services -o wide

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
1-
# angular-spring-boot-razorpay-integration
2-
Integrate Payment Gateway with Angular and Spring Boot Application
1+
# Integrate Payment Gateway with Angular and Spring Boot Application
2+
3+
[Creating Backend - Spring REST API - Part 1](https://www.javachinna.com/spring-boot-angular-two-factor-authentication/)
4+
5+
[Creating Backend - Spring REST API - Part 2](https://www.javachinna.com/2020/10/23/spring-boot-angular-10-user-registration-oauth2-social-login-part-2/)
6+
7+
[Creating Angular 10 Client Application - Part 3](https://www.javachinna.com/2020/10/28/spring-boot-angular-10-user-registration-oauth2-social-login-part-3/)
8+
9+
[Secure Spring Boot Angular Application with Two Factor Authentication](https://www.javachinna.com/spring-boot-angular-two-factor-authentication/)
10+
11+
[Dockerize Angular with NGINX and Spring Boot with MySQL using Docker Compose](https://www.javachinna.com/angular-nginx-spring-boot-mysql-docker-compose/)
12+
13+
[Deploy Angular, Spring Boot, and MySQL Application to DigitalOcean Kubernetes in 30 mins](https://www.javachinna.com/deploy-angular-spring-boot-mysql-digitalocean-kubernetes/)
14+
15+
[Create CI/CD pipeline using GitHub Actions to Build and Deploy Angular Spring Boot App on Kubernetes in 15 mins
16+
](https://www.javachinna.com/spring-boot-angular-ci-cd-pipeline-github-actions-kubernetes/)
17+
18+
[Integrate Razorpay Payment Gateway with Angular and Spring Boot Application in 14 Simple Steps
19+
](https://www.javachinna.com/integrate-razorpay-payment-gateway-angular-spring-boot-mysql/)
20+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major version
15+
last 2 iOS major versions
16+
Firefox ESR
17+
not IE 9-11 # For IE 9-11 support, remove 'not'.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.git
3+
.gitignore
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

angular-11-social-login/.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
16+
17+
# IDEs and editors
18+
/.idea
19+
.project
20+
.classpath
21+
.c9/
22+
*.launch
23+
.settings/
24+
*.sublime-workspace
25+
26+
# IDE - VSCode
27+
.vscode/*
28+
!.vscode/settings.json
29+
!.vscode/tasks.json
30+
!.vscode/launch.json
31+
!.vscode/extensions.json
32+
.history/*
33+
34+
# misc
35+
/.sass-cache
36+
/connect.lock
37+
/coverage
38+
/libpeerconnection.log
39+
npm-debug.log
40+
yarn-error.log
41+
testem.log
42+
/typings
43+
44+
# System Files
45+
.DS_Store
46+
Thumbs.db

angular-11-social-login/Dockerfile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#### Stage 1: Build the angular application
2+
FROM node as build
3+
4+
# Configure the main working directory inside the docker image.
5+
# This is the base directory used in any further RUN, COPY, and ENTRYPOINT
6+
# commands.
7+
WORKDIR /app
8+
9+
# Copy the package.json as well as the package-lock.json and install
10+
# the dependencies. This is a separate step so the dependencies
11+
# will be cached unless changes to one of those two files
12+
# are made.
13+
COPY package*.json ./
14+
RUN npm install
15+
16+
# Copy the main application
17+
COPY . ./
18+
19+
# Arguments
20+
ARG configuration=production
21+
22+
# Build the application
23+
RUN npm run build -- --outputPath=./dist/out --configuration $configuration
24+
25+
#### Stage 2, use the compiled app, ready for production with Nginx
26+
FROM nginx
27+
28+
# Copy the angular build from Stage 1
29+
COPY --from=build /app/dist/out/ /usr/share/nginx/html
30+
31+
# Copy our custom nginx config
32+
COPY /nginx-custom.conf /etc/nginx/conf.d/default.conf
33+
34+
35+
# Expose port 80 to the Docker host, so we can access it
36+
# from the outside.
37+
EXPOSE 80
38+
39+
ENTRYPOINT ["nginx","-g","daemon off;"]

angular-11-social-login/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Spring Boot 2 + Angular 10: User Registration and Login using JWT Authentication, OAuth2 Social Login with Facebook, Google, LinkedIn, and Github using Spring Security 5 and Two Factor Authentication (2FA)
2+
3+
[Creating Backend - Spring REST API - Part 1](https://www.javachinna.com/spring-boot-angular-two-factor-authentication/)
4+
5+
[Creating Backend - Spring REST API - Part 2](https://www.javachinna.com/2020/10/23/spring-boot-angular-10-user-registration-oauth2-social-login-part-2/)
6+
7+
[Creating Angular 10 Client Application - Part 3](https://www.javachinna.com/2020/10/28/spring-boot-angular-10-user-registration-oauth2-social-login-part-3/)
8+
9+
[Secure Spring Boot Angular Application with Two Factor Authentication](https://www.javachinna.com/spring-boot-angular-two-factor-authentication/)

0 commit comments

Comments
 (0)