Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
814878f
Roost Commit
ishanrai13 Mar 1, 2023
0a52e62
Roost Update Commit
ishanrai13 Mar 1, 2023
eba2610
Merge branch 'roost-io:ingress' into ingress
ishanrai13 Mar 1, 2023
6c8c4a8
Roost Update Commit
ishanrai13 Mar 1, 2023
46f76a2
Roost Update Commit
ishanrai13 Mar 1, 2023
8fdce20
Roost Update Commit
ishanrai13 Mar 1, 2023
0de9be4
Roost Update Commit
ishanrai13 Mar 2, 2023
f678f26
Roost Update Commit
ishanrai13 Mar 2, 2023
ebb01aa
Roost Update Commit
ishanrai13 Mar 2, 2023
6f9ace3
Roost Update Commit
ishanrai13 Mar 2, 2023
be1e4a7
Merge branch 'roost-io:ingress' into ingress
ishanrai13 Mar 8, 2023
2200f4b
voter-nextjs initial commit
ishanrai13 Mar 8, 2023
dc03a66
voter-nextjs initial commit
ishanrai13 Mar 8, 2023
9d8e45d
Adding api endpoints
Divyeshzb Mar 8, 2023
f43a5e2
Adding deployment files for next s
Divyeshzb Mar 8, 2023
a26506a
voter-nextjs UI fixes
ishanrai13 Mar 9, 2023
b4c3e9b
Fixing result page api
Divyeshzb Mar 9, 2023
fdf9ccd
Fixing merge conflict
Divyeshzb Mar 9, 2023
364155c
Changing name to voter
Divyeshzb Mar 9, 2023
f583661
Pushing changes for http
Divyeshzb Mar 9, 2023
7505aef
Adding changes for protocol
Divyeshzb Mar 9, 2023
47c4576
voter-nextjs UI fixes
ishanrai13 Mar 9, 2023
abaff3b
Fixing get and post call
Divyeshzb Mar 9, 2023
4450ee2
Minor fixes in code
Divyeshzb Mar 9, 2023
2e78269
voter-nextjs UI fixes
ishanrai13 Mar 10, 2023
89caada
Merge branch 'voter-nextjs' of https://github.com/ishanrai13/voting_a…
ishanrai13 Mar 10, 2023
0bbef0c
gitignore change
ishanrai13 Mar 10, 2023
b49cf03
ZBIO-4196 voting_app results list bug
ishanrai13 Mar 15, 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
generated-files
generated-files
node_modules
16 changes: 16 additions & 0 deletions .roost/roost.test-netlify.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
build:
type: text
content: |-
#/bin/sh
docker build -f ballot/Dockerfile -t ballot:$GIT_COMMIT_ID ballot
docker tag ballot:$GIT_COMMIT_ID ballot:$ROOST_NAMESPACE
deploy:
type: text
content: '{"access_token":"f02912c77fdeb457a77681bb49f622d303721bca2f1e9ebe0a01002ec4363d5347d6e33a930410f9c2b0e136eeb3fb1629e31c891287ec1178c9422e04925800","site":{"key":"8051c7b9-9f6a-4bd6-ab4d-7acaeec80df6","title":"dmtestzbio","meta":{"id":"8051c7b9-9f6a-4bd6-ab4d-7acaeec80df6","site_id":"8051c7b9-9f6a-4bd6-ab4d-7acaeec80df6","plan":"nf_team_pro","ssl_plan":null,"premium":false,"domain_suffix_branch":null,"domain_suffix_deploy_preview":null,"claimed":true,"name":"dmtestzbio","custom_domain":null,"branch_deploy_custom_domain":null,"deploy_preview_custom_domain":null,"domain_aliases":[],"password":null,"password_hash":null,"sso_login":false,"sso_login_context":"all","notification_email":null,"url":"http://dmtestzbio.netlify.app","admin_url":"https://app.netlify.com/sites/dmtestzbio","deploy_id":"63ff3a25df59be06b3a27796","build_id":"","deploy_url":"http://main--dmtestzbio.netlify.app","state":"current","screenshot_url":"https://d33wubrfki0l68.cloudfront.net/63ff3a25df59be06b3a27796/screenshot_2023-03-01-11-43-08-0000.png","created_at":"2023-03-01T11:42:29.072Z","updated_at":"2023-03-01T13:42:07.771Z","user_id":"6392b097bdce33531d3730a1","error_message":null,"ssl":false,"ssl_url":"https://dmtestzbio.netlify.app","force_ssl":null,"ssl_status":null,"max_domain_aliases":100,"build_settings":{"cmd":"npm run build","dir":"build","env":{},"created_at":"2023-03-01T11:42:29.238Z","updated_at":"2023-03-01T11:42:29.238Z","private_logs":null,"allowed_branches":["main"],"functions_dir":null,"installation_id":null,"skip_prs":null,"untrusted_flow":"review","base_rel_dir":true,"stop_builds":false,"public_repo":false,"skip_automatic_builds":null,"provider":"bitbucket","repo_type":"git","repo_url":"https://bitbucket.org/divyeshm7/newvoter","repo_branch":"main","repo_path":"divyeshm7/newvoter","repo_owner_type":null,"base":"voter","deploy_key_id":"63ff3a233b30d8080c62ce73"},"processing_settings":{"css":{"bundle":true,"minify":true},"js":{"bundle":true,"minify":true},"images":{"optimize":true},"html":{"pretty_urls":true},"skip":true,"ignore_html_forms":false},"prerender":null,"prerender_headers":null,"deploy_hook":"https://api.netlify.com/hooks/bitbucket","published_deploy":{"id":"63ff3a25df59be06b3a27796","site_id":"8051c7b9-9f6a-4bd6-ab4d-7acaeec80df6","build_id":"63ff3a25df59be06b3a27794","state":"ready","name":"dmtestzbio","url":"http://dmtestzbio.netlify.app","ssl_url":"https://dmtestzbio.netlify.app","admin_url":"https://app.netlify.com/sites/dmtestzbio","deploy_url":"http://main--dmtestzbio.netlify.app","deploy_ssl_url":"https://main--dmtestzbio.netlify.app","created_at":"2023-03-01T11:42:29.266Z","updated_at":"2023-03-01T11:43:12.534Z","user_id":"6392b097bdce33531d3730a1","error_message":null,"required":[],"required_functions":[],"commit_ref":null,"review_id":null,"branch":"main","commit_url":null,"skipped":null,"locked":null,"log_access_attributes":{"type":"firebase","url":"https://netlify-builds7.firebaseio.com/builds/63ff3a25df59be06b3a27794/log","database":"netlify-builds7","endpoint":"https://netlify-builds7.firebaseio.com","path":"/builds/63ff3a25df59be06b3a27794/log","token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2IjowLCJpYXQiOjE2Nzc2Nzg1NjksImQiOnsidWlkIjoiIn19.SkiRLYM83-JJUnUz2OrDMm2Wa6Y826NVNzuLJ8zioRo"},"title":null,"review_url":null,"published_at":"2023-03-01T11:43:08.148Z","context":"production","deploy_time":37,"available_functions":[],"screenshot_url":"https://d33wubrfki0l68.cloudfront.net/63ff3a25df59be06b3a27796/screenshot_2023-03-01-11-43-08-0000.png","site_capabilities":{"title":"Netlify Team Plus","asset_acceleration":true,"form_processing":true,"cdn_propagation":"partial","domain_aliases":true,"secure_site":true,"sso_secure_site":false,"secure_site_context":false,"prerendering":true,"proxying":true,"ssl":"custom","rate_cents":0,"yearly_rate_cents":0,"ipv6_domain":"cdn.makerloop.com","branch_deploy":true,"managed_dns":true,"geo_ip":true,"split_testing":true,"id":"nf_team_pro","cdn_tier":"reg"},"committer":null,"skipped_log":null,"manual_deploy":false,"file_tracking_optimization":true,"plugin_state":"none","lighthouse_plugin_scores":null,"links":{"permalink":"https://63ff3a25df59be06b3a27796--dmtestzbio.netlify.app","alias":"https://dmtestzbio.netlify.app","branch":null},"framework":"create-react-app","entry_path":null,"views_count":null,"function_schedules":[],"public_repo":false,"pending_review_reason":null,"lighthouse":null},"managed_dns":true,"jwt_secret":null,"jwt_roles_path":"app_metadata.authorization.roles","account_slug":"sudhirjangir","account_name":"zbio","account_type":"Pro","capabilities":{"title":"Netlify Team Plus","asset_acceleration":true,"form_processing":true,"cdn_propagation":"partial","domain_aliases":true,"secure_site":true,"sso_secure_site":false,"secure_site_context":false,"prerendering":true,"proxying":true,"ssl":"custom","rate_cents":0,"yearly_rate_cents":0,"ipv6_domain":"cdn.makerloop.com","branch_deploy":true,"managed_dns":true,"geo_ip":true,"split_testing":true,"id":"nf_team_pro","cdn_tier":"reg"},"dns_zone_id":null,"identity_instance_id":null,"use_functions":null,"use_edge_handlers":null,"parent_user_id":null,"automatic_tls_provisioning":null,"disabled":null,"lifecycle_state":"active","id_domain":"8051c7b9-9f6a-4bd6-ab4d-7acaeec80df6.netlify.app","use_lm":null,"build_image":"focal","automatic_tls_provisioning_expired":false,"analytics_instance_id":null,"functions_region":null,"functions_config":{"site_created_at":"2023-03-01T11:42:29.072Z"},"plugins":[],"account_subdomain":null,"functions_env":{},"cdp_enabled_contexts":["deploy-preview"],"authlify_token_id":null,"build_timelimit":null,"use_custom_domain_in_all_contexts":false,"uses_new_env_var":true,"password_context":"all","deploy_retention_in_days":90,"use_envelope":true,"default_domain":"dmtestzbio.netlify.app","site_env":[{"key":"test","value":"123","proxyPort":false},{"key":"test123","value":"","proxyPort":true,"port":"30040"}],"roost_site_name":"$ROOST_NAMESPACE","roost_custom_domain":"","netlify_account_id":"63fc4c942f15a41cbf376f0a"}}}'
test: []
uninstall:
type: text
content: ''
dockerCompose: docker-compose.yaml
lastUpdatedBy: Ishan Rai
lastUpdatedOn: 2023-03-02T06:08:38.913Z
49 changes: 0 additions & 49 deletions helm-vote/templates/kubernetes-manifests/ingress.yaml

This file was deleted.

20 changes: 8 additions & 12 deletions helm-vote/templates/kubernetes-manifests/voter.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

apiVersion: v1
kind: Service
metadata:
Expand All @@ -13,7 +14,8 @@ spec:
ports:
- name: http
port: {{ .Values.httpServicePort}}
targetPort: 80
targetPort: 3000
type: LoadBalancer

---
apiVersion: apps/v1
Expand All @@ -22,12 +24,6 @@ metadata:
name: voter
namespace: {{ .Values.namespace }}
labels:
roost.ai/fitness.git-type: github
roost.ai/fitness.git-repo-name: voting_app
roost.ai/fitness.git-org: roost-io
roost.ai/fitness.git-branch: roost-eaas
roost.ai/fitness.git-test-path: service-test-suite.voter
roost.ai/fitness.test-type: cypress
spec:
replicas: 1
selector:
Expand All @@ -46,17 +42,17 @@ spec:
stdin: true
tty: true
env:
- name: REACT_APP_BALLOT_ENDPOINT
- name: BALLOT_ENDPOINT
{{- if eq .Values.ballot_endpoint "" }}
value: "{{ .Values.namespace }}.{{ .Values.services.ballot.serviceName }}.{{ .Values.clusterIP }}.{{ .Values.clusterDomain }}"
value: "http://{{ .Values.services.ballot.serviceName }}.{{ .Values.namespace }}.svc.cluster.local"
{{- else }}
value: "{{ .Values.ballot_endpoint }}"
{{- end }}
- name: REACT_APP_EC_SERVER_ENDPOINT
- name: EC_SERVER_ENDPOINT
{{- if eq .Values.ecserver_endpoint "" }}
value: "{{ .Values.namespace }}.{{ .Values.services.ecserver.serviceName }}.{{ .Values.clusterIP }}.{{ .Values.clusterDomain }}"
value: "http://{{ .Values.services.ecserver.serviceName }}.{{ .Values.namespace }}.svc.cluster.local"
{{- else }}
value: "{{ .Values.ecserver_endpoint }}"
{{- end }}
ports:
- containerPort: 80
- containerPort: 3000
3 changes: 2 additions & 1 deletion helm-vote/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ ecserver_name: "{{name}}"
ecserver_image_url: "{{image_url}}"
ballot_endpoint: ""
ecserver_endpoint: ""
voterImageName: &defaultVoterImageName voter


services:
voter:
imageName: voter # without registry-host and tag
imageName: *defaultVoterImageName # without registry-host and tag
imageTag: *defaultTag
serviceName: voter
servicePort: *defaultServicePort
Expand Down
5 changes: 0 additions & 5 deletions voter/.dockerignore

This file was deleted.

1 change: 1 addition & 0 deletions voter/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/build

# misc
.next
.DS_Store
.env.local
.env.development.local
Expand Down
39 changes: 26 additions & 13 deletions voter/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
# build environment
FROM node:14.21.1-alpine3.16 as build
WORKDIR /app
COPY package*.json ./
RUN npm install
FROM node:18-alpine as dependencies
WORKDIR /my-project
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

FROM node:18-alpine as builder
WORKDIR /my-project
COPY . .
RUN npm run build

# production environment
FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html/
COPY ./default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/env.template.js > /usr/share/nginx/html/env.js && exec nginx -g 'daemon off;'"]
COPY --from=dependencies /my-project/node_modules ./node_modules
RUN yarn build

FROM node:18-alpine as runner
WORKDIR /my-project
ENV NODE_ENV production
# If you are using a custom next.config.js file, uncomment this line.
COPY --from=builder /my-project/next.config.js ./
# COPY --from=builder /my-project/public ./public
COPY --from=builder /my-project/.next/ ./.next/



COPY --from=builder /my-project/node_modules/ ./node_modules/
COPY --from=builder /my-project/package.json ./package.json
COPY --from=builder /my-project/yarn.lock ./yarn.lock

EXPOSE 3000
CMD ["yarn", "start"]
68 changes: 0 additions & 68 deletions voter/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions voter/default.conf

This file was deleted.

19 changes: 0 additions & 19 deletions voter/ingress.yaml

This file was deleted.

8 changes: 8 additions & 0 deletions voter/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',

}

module.exports = nextConfig

Loading