Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

innodata-testproject-patch1 #18

Open
wants to merge 772 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
772 commits
Select commit Hold shift + click to select a range
c9f6e7f
Update node.js.yml
mnagaraju5628 Mar 26, 2024
93b991e
Update node.js.yml
mnagaraju5628 Mar 26, 2024
286abe7
Update node.js.yml
mnagaraju5628 Mar 26, 2024
a402673
Update node.js.yml
mnagaraju5628 Mar 26, 2024
cd5f831
Update node.js.yml
mnagaraju5628 Mar 26, 2024
e7794cb
Update node.js.yml
mnagaraju5628 Mar 26, 2024
ab7dc2c
Update node.js.yml
mnagaraju5628 Mar 26, 2024
dbf9503
Update node.js.yml
mnagaraju5628 Mar 26, 2024
2f778cd
Update node.js.yml
mnagaraju5628 Mar 26, 2024
32d0da4
Update node.js.yml
mnagaraju5628 Mar 26, 2024
3be9988
Update node.js.yml
mnagaraju5628 Mar 26, 2024
7d500f2
Update node.js.yml
mnagaraju5628 Mar 26, 2024
b64081b
Update node.js.yml
mnagaraju5628 Mar 26, 2024
06545f0
Update node.js.yml
mnagaraju5628 Mar 26, 2024
340703a
Update node.js.yml
mnagaraju5628 Mar 26, 2024
b4a3333
Update node.js.yml
mnagaraju5628 Mar 26, 2024
7f05f44
Update node.js.yml
mnagaraju5628 Mar 26, 2024
c58a5f1
Update node.js.yml
mnagaraju5628 Mar 26, 2024
309bc22
Update node.js.yml
mnagaraju5628 Mar 26, 2024
acee833
Update node.js.yml
mnagaraju5628 Mar 26, 2024
7e642d4
Update node.js.yml
mnagaraju5628 Mar 26, 2024
0a7bff7
Update node.js.yml
mnagaraju5628 Mar 26, 2024
0b1109d
Update node.js.yml
mnagaraju5628 Mar 26, 2024
ccb2876
Update node.js.yml
mnagaraju5628 Mar 26, 2024
1f03ead
Update node.js.yml
mnagaraju5628 Mar 26, 2024
98bb7a4
Update node.js.yml
mnagaraju5628 Mar 26, 2024
71f99b2
Update deployment.yaml
mnagaraju5628 May 9, 2024
85d6a19
Update node.js.yml
mnagaraju5628 May 9, 2024
29fa742
Update node.js.yml
mnagaraju5628 May 9, 2024
a015f03
Update node.js.yml
mnagaraju5628 May 9, 2024
d222736
Update node.js.yml
mnagaraju5628 May 9, 2024
58369f6
Update node.js.yml
mnagaraju5628 May 9, 2024
0c341cf
Update node.js.yml
mnagaraju5628 May 9, 2024
a2201e0
Update node.js.yml
mnagaraju5628 May 9, 2024
6dc987b
Update node.js.yml
mnagaraju5628 May 14, 2024
5aed163
Update node.js.yml
mnagaraju5628 May 14, 2024
a15b85e
Update node.js.yml
mnagaraju5628 May 14, 2024
2b74976
Update node.js.yml
mnagaraju5628 May 14, 2024
a79fca6
Update node.js.yml
mnagaraju5628 May 14, 2024
13b5b9c
Update node.js.yml
mnagaraju5628 May 14, 2024
bdb36cc
Update node.js.yml
mnagaraju5628 May 14, 2024
51faa8d
Update node.js.yml
mnagaraju5628 May 14, 2024
18a0afa
Update node.js.yml
mnagaraju5628 May 14, 2024
a49a573
Update node.js.yml
mnagaraju5628 May 14, 2024
d2665cd
Update node.js.yml
mnagaraju5628 May 14, 2024
94507fb
Update node.js.yml
mnagaraju5628 May 14, 2024
3e175b6
Update node.js.yml
mnagaraju5628 May 14, 2024
4ba385c
Update node.js.yml
mnagaraju5628 May 14, 2024
41b9801
Update node.js.yml
mnagaraju5628 May 14, 2024
0af4f6f
Update node.js.yml
mnagaraju5628 May 17, 2024
95c5930
Update node.js.yml
mnagaraju5628 May 17, 2024
d1f226b
Update node.js.yml
mnagaraju5628 May 17, 2024
649a237
Update node.js.yml
mnagaraju5628 May 17, 2024
da9a50e
Update node.js.yml
mnagaraju5628 May 17, 2024
40c98ac
Update node.js.yml
mnagaraju5628 May 17, 2024
43ca8dd
Update node.js.yml
mnagaraju5628 May 17, 2024
2b43d9f
Update node.js.yml
mnagaraju5628 May 17, 2024
c41e7f7
Update deployment.yaml
mnagaraju5628 May 17, 2024
cc8e291
Update node.js.yml
mnagaraju5628 May 17, 2024
e546a5e
Update node.js.yml
mnagaraju5628 May 17, 2024
743a252
Create testing with SA key
mnagaraju5628 May 17, 2024
905ef6c
Update node.js.yml
mnagaraju5628 May 17, 2024
0d823da
Rename node.js.yml to testing with SA keys
mnagaraju5628 May 17, 2024
18b9db8
Update testing with SA keys
mnagaraju5628 May 17, 2024
2801cef
Delete .github/workflows/testing with SA key
mnagaraju5628 May 17, 2024
7756dab
Create testing with workload identity
mnagaraju5628 May 17, 2024
f2f41fd
Update testing with workload identity
mnagaraju5628 May 17, 2024
13d837e
Create node.js.yml
mnagaraju5628 May 17, 2024
d174c00
Delete .github/workflows/node.js.yml
mnagaraju5628 May 17, 2024
bff2a2e
Update testing with workload identity
mnagaraju5628 May 17, 2024
88d436a
Create nodejs.yaml
mnagaraju5628 May 27, 2024
1e12480
Create testing with sa key
mnagaraju5628 May 27, 2024
40be31f
Create testing with WI
mnagaraju5628 May 27, 2024
b3f913f
Create testing with Workload Identity
mnagaraju5628 May 27, 2024
c4574de
Update nodejs.yaml
mnagaraju5628 May 27, 2024
8fd06e7
Update nodejs.yaml
mnagaraju5628 May 27, 2024
7fe3451
Update nodejs.yaml
mnagaraju5628 May 27, 2024
cb58f8d
Update nodejs.yaml
mnagaraju5628 May 27, 2024
fd238bd
Update nodejs.yaml
mnagaraju5628 May 27, 2024
07feb1d
testing with Workload identity
mnagaraju5628 May 27, 2024
4670c47
Update and rename nodejs.yaml to testing with wi
mnagaraju5628 May 27, 2024
8ef4ec6
Delete .github/workflows/testing with wi
mnagaraju5628 May 27, 2024
7137538
Delete .github/workflows/testing with WI
mnagaraju5628 May 27, 2024
f273ba4
Delete .github/workflows/testing with Workload Identity
mnagaraju5628 May 27, 2024
b654410
Create Testing with Workload Identity
mnagaraju5628 May 27, 2024
7b618c2
Create node.js.yml
mnagaraju5628 May 27, 2024
775b607
Update node.js.yml
mnagaraju5628 May 27, 2024
5f1024f
Update node.js.yml
mnagaraju5628 May 27, 2024
979382b
Update node.js.yml
mnagaraju5628 May 27, 2024
2b67ddb
Update node.js.yml
mnagaraju5628 May 27, 2024
c8fdadc
Rename node.js.yml to testing with Workload Identity
mnagaraju5628 May 27, 2024
03df70f
Create Testing with sa key
mnagaraju5628 May 27, 2024
4c7f77e
Delete .github/workflows/Testing with Workload Identity
mnagaraju5628 May 27, 2024
79d83b8
Delete .github/workflows/Testing with sa key
mnagaraju5628 May 27, 2024
d1e9c4f
Delete .github/workflows/testing with SA keys
mnagaraju5628 May 27, 2024
acd6839
Delete .github/workflows/testing with Workload Identity
mnagaraju5628 May 27, 2024
9cbbda1
Delete .github/workflows/testing with sa key
mnagaraju5628 May 27, 2024
5ff9cbc
Delete .github/workflows/testing with workload identity
mnagaraju5628 May 27, 2024
06923ee
Create testing with Workload identity
mnagaraju5628 May 27, 2024
cf55278
Update testing with Workload identity
mnagaraju5628 May 27, 2024
a3b7266
Delete .github/workflows/testing with Workload identity
mnagaraju5628 May 27, 2024
2a226c1
Create node.js.yml
mnagaraju5628 May 27, 2024
d585862
Create nodejs.yml
mnagaraju5628 May 27, 2024
eb7065e
Update nodejs.yml
mnagaraju5628 May 27, 2024
be904c9
Update node.js.yml
mnagaraju5628 May 27, 2024
da1ddb2
Update node.js.yml
mnagaraju5628 May 27, 2024
6fdee03
Delete .github/workflows/nodejs.yml
mnagaraju5628 May 27, 2024
85d883d
Update node.js.yml
mnagaraju5628 May 27, 2024
b5bc645
Update node.js.yml
mnagaraju5628 May 27, 2024
3fb839d
Update node.js.yml
mnagaraju5628 May 27, 2024
49cdb50
Update node.js.yml
mnagaraju5628 May 28, 2024
b97ab11
Update node.js.yml
mnagaraju5628 May 28, 2024
cd134d6
Update node.js.yml
mnagaraju5628 May 28, 2024
d622adf
Update node.js.yml
mnagaraju5628 May 28, 2024
dfc3eee
Update node.js.yml
mnagaraju5628 May 28, 2024
7dd7b47
Update dockerfile
mnagaraju5628 May 28, 2024
21321d9
Update node.js.yml
mnagaraju5628 May 28, 2024
375fda4
Update node.js.yml
mnagaraju5628 May 28, 2024
c50828c
Update node.js.yml
mnagaraju5628 May 28, 2024
a8817d5
Update node.js.yml
mnagaraju5628 May 28, 2024
31e9c8c
Update node.js.yml
mnagaraju5628 May 28, 2024
eb7292d
Update node.js.yml
mnagaraju5628 May 28, 2024
0488d4e
Update node.js.yml
mnagaraju5628 May 29, 2024
4c080e0
Update node.js.yml
mnagaraju5628 May 29, 2024
0f5a53f
Update node.js.yml
mnagaraju5628 May 29, 2024
6a971b4
Update node.js.yml
mnagaraju5628 May 29, 2024
15374fe
Update node.js.yml
mnagaraju5628 May 29, 2024
8c173c3
Update node.js.yml
mnagaraju5628 May 29, 2024
55fc6db
Update node.js.yml
mnagaraju5628 May 29, 2024
9bfa0bb
Update node.js.yml
mnagaraju5628 May 29, 2024
f3fdd8b
Update node.js.yml
mnagaraju5628 May 29, 2024
f499ffe
Update node.js.yml
mnagaraju5628 May 29, 2024
5f15be2
Update node.js.yml
mnagaraju5628 May 29, 2024
46064e1
Update dockerfile
mnagaraju5628 Aug 7, 2024
294c3dc
Add encrypted credentials
Aug 7, 2024
c84246a
Update node.js.yml
mnagaraju5628 Aug 7, 2024
f87a434
Update node.js.yml
mnagaraju5628 Aug 7, 2024
b57bbdd
Update node.js.yml
mnagaraju5628 Aug 7, 2024
16cee4c
Update node.js.yml
mnagaraju5628 Aug 7, 2024
478493e
Update node.js.yml
mnagaraju5628 Aug 7, 2024
51e0ff7
Update node.js.yml
mnagaraju5628 Aug 7, 2024
75a1eec
Update node.js.yml
mnagaraju5628 Aug 7, 2024
e61b8b2
Update node.js.yml
mnagaraju5628 Aug 8, 2024
b842175
Update node.js.yml
mnagaraju5628 Aug 8, 2024
7f16b61
Update dockerfile
mnagaraju5628 Aug 8, 2024
6724901
Update node.js.yml
mnagaraju5628 Aug 8, 2024
a1d6e39
Update node.js.yml
mnagaraju5628 Aug 8, 2024
fdf5de6
Update node.js.yml
mnagaraju5628 Aug 8, 2024
9efa7ed
Update node.js.yml
mnagaraju5628 Aug 8, 2024
77683cc
Update node.js.yml
mnagaraju5628 Aug 8, 2024
84beda0
Update node.js.yml
mnagaraju5628 Aug 8, 2024
d0f8a1a
Update node.js.yml
mnagaraju5628 Aug 8, 2024
d9cfc7f
Update node.js.yml
mnagaraju5628 Aug 8, 2024
c11a99e
Update node.js.yml
mnagaraju5628 Aug 8, 2024
a7c59b1
Update node.js.yml
mnagaraju5628 Aug 8, 2024
1b3d1b8
Update node.js.yml
mnagaraju5628 Aug 8, 2024
61d2b2a
Update node.js.yml
mnagaraju5628 Aug 8, 2024
09df4ee
Update node.js.yml
mnagaraju5628 Aug 8, 2024
7d69add
Update node.js.yml
mnagaraju5628 Aug 8, 2024
01b64a9
Update node.js.yml
mnagaraju5628 Aug 8, 2024
da7a0ec
Update node.js.yml
mnagaraju5628 Aug 8, 2024
1736b41
Update node.js.yml
mnagaraju5628 Aug 8, 2024
7639c67
Update node.js.yml
mnagaraju5628 Aug 8, 2024
fda5f25
Update dockerfile
mnagaraju5628 Aug 8, 2024
1c39831
Create docker-compose-test.yml
mnagaraju5628 Aug 8, 2024
5a300f8
Update node.js.yml
mnagaraju5628 Aug 8, 2024
25ebe0d
Update docker-compose-test.yml
mnagaraju5628 Aug 8, 2024
e9d3bcf
Update node.js.yml
mnagaraju5628 Aug 8, 2024
1ce9c5d
Update node.js.yml
mnagaraju5628 Aug 8, 2024
e7fcf4c
Update docker-compose-test.yml
mnagaraju5628 Aug 8, 2024
d302fc0
Create decrypt.sh
mnagaraju5628 Aug 12, 2024
5b9d9b6
Update node.js.yml
mnagaraju5628 Sep 2, 2024
e670cc6
Create dockerfile-optimize
mnagaraju5628 Sep 2, 2024
f33131a
Create test. yml
mnagaraju5628 Sep 2, 2024
aec961b
Update test. yml
mnagaraju5628 Sep 2, 2024
d320c0c
Update docker-compose-test.yml
mnagaraju5628 Sep 2, 2024
cb94930
Update docker-compose-test.yml
mnagaraju5628 Sep 2, 2024
21d74ed
Update node.js.yml
mnagaraju5628 Sep 2, 2024
5dbdedb
Update node.js.yml
mnagaraju5628 Sep 2, 2024
e80b523
Update node.js.yml
mnagaraju5628 Sep 2, 2024
3083c8d
Update node.js.yml
mnagaraju5628 Sep 2, 2024
0c8bbde
Delete .github/workflows/test. yml
mnagaraju5628 Sep 2, 2024
aba3ad8
Update node.js.yml
mnagaraju5628 Sep 2, 2024
6e0d5bf
Rename dockerfile-optimize to Dockerfile
mnagaraju5628 Sep 2, 2024
054107a
Rename Dockerfile to Dockerfile - optimize
mnagaraju5628 Sep 2, 2024
cf47741
Rename Dockerfile - optimize to dockerfile-optimize
mnagaraju5628 Sep 2, 2024
d36ce5a
Update node.js.yml
mnagaraju5628 Sep 2, 2024
664dfb8
Update node.js.yml
mnagaraju5628 Sep 2, 2024
32415eb
Update dockerfile
mnagaraju5628 Sep 3, 2024
5ee1c27
Update node.js.yml
mnagaraju5628 Sep 3, 2024
20d47d5
Update dockerfile-optimize
mnagaraju5628 Sep 3, 2024
18293a1
Update node.js.yml
mnagaraju5628 Sep 3, 2024
54477cf
Update node.js.yml
mnagaraju5628 Sep 3, 2024
d77047e
Update node.js.yml
mnagaraju5628 Sep 3, 2024
af762e3
Update dockerfile-optimize
mnagaraju5628 Sep 3, 2024
092b16e
Update node.js.yml
mnagaraju5628 Sep 3, 2024
d132e4b
Update node.js.yml
mnagaraju5628 Sep 3, 2024
c4c7f7d
Update node.js.yml
mnagaraju5628 Sep 3, 2024
f8b3c1c
Update node.js.yml
mnagaraju5628 Sep 3, 2024
7c01293
Update node.js.yml
mnagaraju5628 Sep 3, 2024
77b8f49
Update node.js.yml
mnagaraju5628 Sep 3, 2024
a9abeb8
Update node.js.yml
mnagaraju5628 Sep 3, 2024
46ace00
Update node.js.yml
mnagaraju5628 Sep 3, 2024
99e7d55
Update node.js.yml
mnagaraju5628 Sep 3, 2024
b72d595
Update dockerfile-optimize
mnagaraju5628 Sep 3, 2024
ee83cb0
Update node.js.yml
mnagaraju5628 Sep 3, 2024
5b14801
Update node.js.yml
mnagaraju5628 Sep 3, 2024
4a8eb8c
Update node.js.yml
mnagaraju5628 Sep 3, 2024
eb4dbcd
Update dockerfile-optimize
mnagaraju5628 Sep 3, 2024
09e29cc
Update dockerfile-optimize
mnagaraju5628 Sep 3, 2024
1ce4c80
Update node.js.yml
mnagaraju5628 Sep 3, 2024
46dfa84
Update node.js.yml
mnagaraju5628 Sep 3, 2024
77ffe54
Update node.js.yml
mnagaraju5628 Sep 3, 2024
2be1e79
Update node.js.yml
mnagaraju5628 Sep 3, 2024
b470d09
Update node.js.yml
mnagaraju5628 Sep 3, 2024
4fc6ea1
Update node.js.yml
mnagaraju5628 Sep 3, 2024
6113d5f
Update dockerfile-optimize
mnagaraju5628 Sep 3, 2024
af152e8
Update dockerfile-optimize
mnagaraju5628 Sep 3, 2024
c112eac
Update node.js.yml
mnagaraju5628 Sep 3, 2024
8172930
Update node.js.yml
mnagaraju5628 Sep 3, 2024
d3de0ba
Update dockerfile-optimize
mnagaraju5628 Sep 3, 2024
7e314f2
Update node.js.yml
mnagaraju5628 Sep 5, 2024
961b1dd
Update node.js.yml
mnagaraju5628 Sep 10, 2024
76f998e
Update node.js.yml
mnagaraju5628 Sep 10, 2024
2465a17
Update node.js.yml
mnagaraju5628 Sep 10, 2024
17710f5
Update node.js.yml
mnagaraju5628 Sep 10, 2024
27eab7c
Update node.js.yml
mnagaraju5628 Sep 12, 2024
3101420
Update node.js.yml
mnagaraju5628 Sep 12, 2024
55df7f1
Update node.js.yml
mnagaraju5628 Sep 12, 2024
cd34e15
Update node.js.yml
mnagaraju5628 Sep 12, 2024
989757d
Update node.js.yml
mnagaraju5628 Sep 12, 2024
c2022fe
Update node.js.yml
mnagaraju5628 Sep 12, 2024
b6e1618
Update node.js.yml
mnagaraju5628 Sep 12, 2024
77d4e12
Update node.js.yml
mnagaraju5628 Sep 12, 2024
57cde13
Update node.js.yml
mnagaraju5628 Sep 13, 2024
3842610
Update node.js.yml
mnagaraju5628 Sep 16, 2024
86ee50e
Update node.js.yml
mnagaraju5628 Sep 16, 2024
ad09512
Update node.js.yml
mnagaraju5628 Sep 16, 2024
68cd754
Update node.js.yml
mnagaraju5628 Sep 16, 2024
dc4ff60
Update node.js.yml
mnagaraju5628 Sep 16, 2024
00b194e
Update node.js.yml
mnagaraju5628 Sep 17, 2024
d3e308c
Update node.js.yml
mnagaraju5628 Sep 17, 2024
a96374f
Create zephus-dockerfile
mnagaraju5628 Sep 17, 2024
e2a3769
Create zephus-dokerfile-optimize
mnagaraju5628 Sep 17, 2024
9f04653
Create horizon-dockerfile
mnagaraju5628 Sep 17, 2024
a66886d
Create horizon-dockerfile-optimize
mnagaraju5628 Sep 17, 2024
dc3f5ff
Update node.js.yml
mnagaraju5628 Sep 17, 2024
11adb6a
Update zephus-dockerfile
mnagaraju5628 Sep 17, 2024
5c2f471
Update node.js.yml
mnagaraju5628 Sep 18, 2024
ba24651
Create main.tf
mnagaraju5628 Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .github/workflows/main.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Deploy

on:
push:
branches:
- main

jobs:
deploy:
runs-on: self-hosted
steps:

- name: Build Docker image for app
run: |
docker build -t my-app:latest -f /home/mnagaraju/actions-runner/Testproject-inno/zephus-dockerfile /home/mnagaraju/actions-runner/Testproject-inno

- name: Build Docker image for node
run: |
docker build -t my-node:latest -f /home/mnagaraju/actions-runner/Testproject-inno/zephus-dokerfile-optimize /home/mnagaraju/actions-runner/Testproject-inno/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Node.js Application
44 changes: 44 additions & 0 deletions ansible/repo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
- name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE
hosts: localhost
gather_facts: false

tasks:
- name: Ensure git is installed
become: true
apt:
name: git
state: present

- name: Ensure Docker dependencies are installed
become: true
apt:
name: "{{ item }}"
state: present
loop:
- containerd
- docker.io

- name: Clone Node.js code from GitHub
git:
repo: https://github.com/mnagaraju5628/Testproject-INNO.git
dest: /home/ubuntu/actions-runner/Testproject-INNO
version: main
become: true

- name: Build Docker image
command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO"
become: true

- name: Push Docker image to artifact registry
command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest"
become: true

- name: Deploy to GKE
become: true
shell: |
cd /home/ubuntu/actions-runner/Testproject-INNO/
gcloud container clusters get-credentials innotest-cluster --region us-central1-c
kubectl rollout restart deployment nodeapp-deployment
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
1 change: 1 addition & 0 deletions credentials.enc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Salted__�ȣ-@���Xrd%�%�֨�>��„�g���S�4f�W��
Expand Down
16 changes: 16 additions & 0 deletions decrypt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# Path variables
CREDENTIALS_ENC="/home/mnagaraju/actions-runner/Testproject-inno/credentials.enc"
ENCRYPTION_KEY="/home/mnagaraju/actions-runner/Testproject-inno/encryption_key.txt"
CREDENTIALS="/home/mnagaraju/actions-runner/Testproject-inno/credentials.txt"

# Decrypt the credentials
openssl enc -aes-256-cbc -pbkdf2 -d -in $CREDENTIALS_ENC -out $CREDENTIALS -pass file:$ENCRYPTION_KEY

if [ $? -ne 0 ]; then
echo "Decryption failed"
exit 1
fi

echo "Decryption succeeded"
8 changes: 6 additions & 2 deletions deployment.yml → deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ spec:
template:
metadata:
labels:
app: nodeapp
app: nodeapp
spec:
containers:
- name: nodeserver
image: thetips4you/nodeapp:latest
image: us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest
ports:
- containerPort: 3000
imagePullPolicy: Always
strategy:
type: RollingUpdate

38 changes: 0 additions & 38 deletions deploymentservice.yml

This file was deleted.

15 changes: 15 additions & 0 deletions docker-compose-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3.8'

services:
app:
build:
context: .
dockerfile: dockerfile
volumes:
- '/home/mnagaraju/actions-runner/Testproject-inno/credentials.txt:/app/config/credentials.txt'
environment:
- NODE_ENV=test
restart: always
ports:
- "4000:4000"
command: [ "node", "index.js" ]
24 changes: 18 additions & 6 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
FROM node:latest
FROM node:${NODE_VERSION:-14.19.2} AS deps

WORKDIR /usr/src/app
WORKDIR /usr/app

COPY package.json ./
ENV DEBIAN_FRONTEND noninteractive

RUN npm install
RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
RUN sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list
RUN sed -i '/stretch-updates/d' /etc/apt/sources.list

RUN apt update && apt -y dist-upgrade

RUN apt update && apt install musl-dev -y && \
ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1

COPY . .
# RUN yarn install --frozen-lockfile

RUN npm install pm2 -g

RUN mkdir ~/.ssh && \
ssh-keyscan -H github.com >> ~/.ssh/known_hosts

EXPOSE 4000
CMD [ "node", "index.js" ]
CMD ["./index.js"]
32 changes: 32 additions & 0 deletions dockerfile-optimize
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM node:${NODE_VERSION:-14.19.2}-slim AS deps

# Set up working directory and noninteractive mode for apt-get
WORKDIR /usr/app
ENV DEBIAN_FRONTEND=noninteractive

# Update Debian sources, install necessary packages, and clean up in a single layer
RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list && \
sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list && \
sed -i '/stretch-updates/d' /etc/apt/sources.list && \
apt-get update && \
apt-get -y dist-upgrade && \
apt-get install -y --no-install-recommends musl-dev openssh-client && \
ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1 && \
npm install -g pm2 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man /tmp/*

# Copy package files and install dependencies
COPY package.json package-lock.json ./

RUN yarn install --frozen-lockfile

# Copy the remaining application source code
COPY . .

# Configure SSH for GitHub access
RUN mkdir -p ~/.ssh && \
ssh-keyscan -H github.com >> ~/.ssh/known_hosts

# Start the application
CMD ["node", "index.js"]
40 changes: 40 additions & 0 deletions horizon-dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Build project files and generate assets
FROM node:16.17-alpine AS build

# Set CI to true to catch warnings as errors
ENV CI true

# Install system dependencies
RUN apk add --no-cache \
git \
libtool \
util-linux

WORKDIR /usr/app

# Install project package dependencies
COPY package.json package-lock.json ./
RUN npm ci

# Build the project
COPY . .
#RUN npm run build

# Serving static content from build
FROM nginx:1.23.4-alpine

WORKDIR /usr/share/nginx/html

# Update system packages to resolve vulnerabilities
RUN apk update && apk upgrade --available

# Modify default behavior of web server
# to redirect requests to index.html
RUN sed -i \
's|location / {|location / {\n\t try_files $uri $uri/ /index.html;|' \
/etc/nginx/conf.d/default.conf

# Copy assets from build stage
#COPY --from=build /usr/app/build/ /usr/share/nginx/html/

HEALTHCHECK CMD curl --fail "http://localhost" || exit 1
37 changes: 37 additions & 0 deletions horizon-dockerfile-optimize
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Stage 1: Build project files and generate assets
FROM node:16-alpine AS build

# Set CI to true to catch warnings as errors
ENV CI=true

# Install only essential system dependencies
RUN apk add --no-cache git

WORKDIR /usr/app

# Install project package dependencies
COPY package.json package-lock.json ./
RUN npm ci && rm -rf /root/.npm

# Build the project
COPY . ./
#RUN npm run build

# Stage 2: Serve static content with a minimal Nginx image
FROM nginx:alpine

# Set the working directory for Nginx
WORKDIR /usr/share/nginx/html

# Remove default Nginx configuration and add custom one
RUN rm /etc/nginx/conf.d/default.conf

# Copy custom Nginx configuration
#COPY nginx.conf /etc/nginx/conf.d/

# Copy assets from the build stage
# COPY --from=build /usr/app/build/ /usr/share/nginx/html/


# Define a health check (if needed)
HEALTHCHECK CMD curl --fail "http://localhost" || exit 1
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ var express = require('express');
var app = express();

app.get('/', function (req, res) {
res.send('{ "response": "Hello From Thetips4you" }');
res.send('{ "response": "Welcome to Github-action CI/CD via ansible " }');
});

app.get('/will', function (req, res) {
res.send('{ "response": "Hello World" }');
res.send('{ "response": "Welcome" }');
});
app.get('/ready', function (req, res) {
res.send('{ "response": " Great!, It works!" }');
Expand Down
37 changes: 37 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
provider "google" {
project = "goldengate-1"
region = "us-central1"
credentials = file("/home/mnagaraju/gcp-service-account.json")
}

resource "google_compute_network" "custom_network" {
name = "test-network"
auto_create_subnetworks = false
}

resource "google_compute_subnetwork" "custom_subnet" {
name = "test-subnet"
network = google_compute_network.custom_network.id
ip_cidr_range = "10.0.0.0/16"
region = "us-central1"
}

resource "google_compute_instance" "vm_instance" {
name = "vm-terraform-testing"
machine_type = "e2-medium"
zone = "us-central1-a"

boot_disk {
initialize_params {
image = "ubuntu-os-cloud/ubuntu-2204-lts"
}
}

network_interface {
network = google_compute_network.custom_network.id
subnetwork = google_compute_subnetwork.custom_subnet.id
access_config {
# Assigns an ephemeral external IP
}
}
}
Loading