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

update of the merging #196

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
bf699ee
my commit
austinokari Aug 30, 2022
2d8cb83
updated version
austinokari Aug 30, 2022
dd9b70a
updated version
austinokari Aug 30, 2022
60af16e
updated
austinokari Sep 1, 2022
73e3fbb
modified
austinokari Sep 1, 2022
0988611
modified
austinokari Sep 1, 2022
01cf1f7
modified
austinokari Sep 1, 2022
e4142ca
modified
austinokari Sep 1, 2022
3cf9779
modified
austinokari Sep 1, 2022
7b604d3
modified
austinokari Sep 1, 2022
64ed119
modified
austinokari Sep 1, 2022
38993e4
modified
austinokari Sep 1, 2022
2cc1c29
modified
austinokari Sep 1, 2022
597ac53
modified
austinokari Sep 1, 2022
2e80f53
this is the repo
austinokari Sep 2, 2022
4a6f3a4
modified
austinokari Sep 2, 2022
0df8e41
my updates
austinokari Sep 2, 2022
0aeee5d
my updates
austinokari Sep 2, 2022
238b9b6
final screenshots
austinokari Sep 2, 2022
094549c
project review
austinokari Sep 3, 2022
7a95b21
Delete .travis.yml
austinokari1998 Sep 3, 2022
dc5f3d6
project review
austinokari Sep 3, 2022
161c77c
project review
austinokari Sep 3, 2022
df1bd6f
project review
austinokari Sep 3, 2022
04b3491
project review
austinokari Sep 3, 2022
9423ab4
project review
austinokari Sep 3, 2022
c08004c
project review
austinokari Sep 3, 2022
b73f5ec
project review
austinokari Sep 3, 2022
05ec091
updated project
austinokari Sep 3, 2022
bb44856
new updates
austinokari Sep 3, 2022
c11c643
new updates
austinokari Sep 3, 2022
9de6748
new updates
austinokari Sep 3, 2022
fd9c66b
Merge branch 'udacity:main' into main
austinokari1998 Sep 8, 2023
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ venv/
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
set_env.sh

29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
language: node_js
node_js:
- 13

services:
- docker

# Pre-testing installs
install:
- echo "nothing needs to be installed"

# Scripts to be run such as tests
before_script:
- echo "no tests"

script:
- docker --version # print the version for logging
- docker-compose -f docker-compose-build.yaml build --parallel
- docker tag reverseproxy:v1 austinokari/reverseproxy:v1
- docker tag udagram-frontend:v1 austinokari/udagram-frontend:v1
- docker tag udagram-api-user:v1 austinokari/udagram-api-user:v1
- docker tag udagram-api-feed:v1 austinokari/udagram-api-feed:v1

after_success:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push austinokari/reverseproxy:v1
- docker push austinokari/udagram-frontend:v1
- docker push austinokari/udagram-api-user:v1
- docker push austinokari/udagram-api-feed:v1
6 changes: 6 additions & 0 deletions deployment/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Specifies intentionally untracked files to ignore when using Git
# http://git-scm.com/docs/gitignore

aws-secret.yaml
env-configmap.yaml
env-secret.yaml
82 changes: 82 additions & 0 deletions deployment/backend-feed-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
service: backend-feed
name: backend-feed
spec:
replicas: 1
selector:
matchLabels:
service: backend-feed
template:
metadata:
labels:
service: backend-feed
spec:
containers:
- image: docker.io/austinokari/udagram-api-feed:v1
name: backend-feed
imagePullPolicy: Always
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "1024Mi"
cpu: "500m"
env:
- name: URL
valueFrom:
configMapKeyRef:
name: env-config
key: URL
- name: AWS_BUCKET
valueFrom:
configMapKeyRef:
name: env-config
key: AWS_BUCKET
- name: AWS_PROFILE
valueFrom:
configMapKeyRef:
name: env-config
key: AWS_PROFILE
- name: AWS_REGION
valueFrom:
configMapKeyRef:
name: env-config
key: AWS_REGION
- name: JWT_SECRET
valueFrom:
configMapKeyRef:
name: env-config
key: JWT_SECRET
- name: POSTGRESS_DB
valueFrom:
configMapKeyRef:
name: env-config
key: POSTGRESS_DB
- name: POSTGRESS_HOST
valueFrom:
configMapKeyRef:
name: env-config
key: POSTGRESS_HOST
- name: POSTGRESS_PASSWORD
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRESS_PASSWORD
- name: POSTGRESS_USERNAME
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRESS_USERNAME
volumeMounts:
- name: aws-secret
mountPath: "/root/.aws/"
readOnly: true
restartPolicy: Always
volumes:
- name: aws-secret
secret:
secretName: aws-secret
13 changes: 13 additions & 0 deletions deployment/backend-feed-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
labels:
service: backend-feed
name: backend-feed
spec:
ports:
- name: "8080"
port: 8080
targetPort: 8080
selector:
service: backend-feed
61 changes: 61 additions & 0 deletions deployment/backend-user-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
service: backend-user
name: backend-user
spec:
replicas: 1
selector:
matchLabels:
service: backend-user

template:
metadata:
labels:
service: backend-user
spec:
containers:
- image: docker.io/austinokari/udagram-api-user:v1
name: backend-user
imagePullPolicy: Always
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "1024Mi"
cpu: "500m"
env:
- name: URL
valueFrom:
configMapKeyRef:
name: env-config
key: URL
- name: JWT_SECRET
valueFrom:
configMapKeyRef:
name: env-config
key: JWT_SECRET
- name: POSTGRESS_DB
valueFrom:
configMapKeyRef:
name: env-config
key: POSTGRESS_DB
- name: POSTGRESS_HOST
valueFrom:
configMapKeyRef:
name: env-config
key: POSTGRESS_HOST
- name: POSTGRESS_PASSWORD
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRESS_PASSWORD
- name: POSTGRESS_USERNAME
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRESS_USERNAME
restartPolicy: Always

13 changes: 13 additions & 0 deletions deployment/backend-user-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
labels:
service: backend-user
name: backend-user
spec:
ports:
- name: "8080"
port: 8080
targetPort: 8080
selector:
service: backend-user
24 changes: 24 additions & 0 deletions deployment/frontend-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
spec:
selector:
matchLabels:
run: frontend
replicas: 2
template:
metadata:
labels:
run: frontend
spec:
containers:
- name: frontend
image: docker.io/austinokari/udagram-frontend:v1
ports:
- containerPort: 80
resources:
limits:
cpu: 500m
requests:
cpu: 200m
12 changes: 12 additions & 0 deletions deployment/frontend-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: frontend
labels:
run: frontend
spec:
ports:
- port: 80
protocol: TCP
selector:
run: frontend
24 changes: 24 additions & 0 deletions deployment/reverseproxy-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: reverseproxy
spec:
selector:
matchLabels:
run: reverseproxy
replicas: 2
template:
metadata:
labels:
run: reverseproxy
spec:
containers:
- name: reverseproxy
image: docker.io/austinokari/reverseproxy:v1
ports:
- containerPort: 80
resources:
limits:
cpu: 500m
requests:
cpu: 200m
13 changes: 13 additions & 0 deletions deployment/reverseproxy-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
labels:
service: reverseproxy
name: reverseproxy
spec:
ports:
- name: "8080"
port: 8080
targetPort: 8080
selector:
service: reverseproxy
18 changes: 18 additions & 0 deletions docker-compose-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: "3"
services:
reverseproxy:
build:
context: ./udagram-reverseproxy
image: reverseproxy:v1
backend_user:
build:
context: ./udagram-api-user
image: udagram-api-user:v1
backend_feed:
build:
context: ./udagram-api-feed
image: udagram-api-feed:v1
frontend:
build:
context: ./udagram-frontend
image: udagram-frontend:v1
40 changes: 40 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: "3"
services:
backend-user:
image: austinokari/udagram-api-user:v1
environment:
POSTGRES_USERNAME: $POSTGRES_USERNAME
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: $POSTGRES_DB
POSTGRES_HOST: $POSTGRES_HOST
AWS_REGION: $AWS_REGION
AWS_PROFILE: $AWS_PROFILE
AWS_BUCKET: $AWS_BUCKET
JWT_SECRET: $JWT_SECRET
URL: "http://localhost:8100"
backend-feed:
image: austinokari/udagram-api-feed:v1
volumes:
- $HOME/.aws:/root/.aws
environment:
POSTGRES_USERNAME: $POSTGRES_USERNAME
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: $POSTGRES_DB
POSTGRES_HOST: $POSTGRES_HOST
AWS_REGION: $AWS_REGION
AWS_PROFILE: $AWS_PROFILE
AWS_BUCKET: $AWS_BUCKET
JWT_SECRET: $JWT_SECRET
URL: "http://localhost:8100"
frontend:
image: austinokari/udagram-frontend:v1
ports:
- "8100:80"
reverseproxy:
image: austinokari/reverseproxy:v1
ports:
- 8080:8080
restart: always
depends_on:
- backend-user
- backend-feed
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 0 additions & 11 deletions set_env.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions udagram-api-feed/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Use NodeJS base image
FROM node:13
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies

COPY package*.json ./
RUN npm ci
# Bundle app source
COPY . .
EXPOSE 8080
CMD [ "npm", "run", "prod" ]
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading