This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:buster | |
ENV DEBIAN_FRONTEND noninteractive | |
LABEL JaniKibichi <[email protected]> | |
#ENSURE SYSTEM IS UP-TO-DATE: | |
RUN echo '\n\nENSURE SYSTEM IS UP-TO-DATE =======================================\n\n' | |
RUN apt-get update && apt-get upgrade | |
#INSTALL OPENJDK-11-JDK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: ussd-deployment | |
labels: | |
app: ussd | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
# build the container image | |
- name: "gcr.io/cloud-builders/docker" | |
args: ["build", "-t", "gcr.io/smart-surf-285319/ussdapi", "."] | |
# push container image | |
- name: "gcr.io/cloud-builders/docker" | |
args: ["push", "gcr.io/smart-surf-285319/ussdapi"] | |
# deploy container image to GKE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1beta1 | |
kind: Ingress | |
metadata: | |
name: ussd-ingress | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
cert-manager.io/cluster-issuer: letsencrypt-prod | |
spec: | |
tls: | |
- hosts: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1beta1 | |
kind: Ingress | |
metadata: | |
name: ussd-ingress | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
spec: | |
rules: | |
- host: "utility.ussd.janikibichi.com" | |
http: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: cert-manager.io/v1 | |
kind: ClusterIssuer | |
metadata: | |
name: letsencrypt-prod | |
spec: | |
acme: | |
# Email address used for ACME registration | |
email: [email protected] | |
server: https://acme-v02.api.letsencrypt.org/directory | |
privateKeySecretRef: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: autoscaling/v2beta2 | |
kind: HorizontalPodAutoscaler | |
metadata: | |
name: ussd-horizontal-pod-autoscaler | |
spec: | |
scaleTargetRef: | |
apiVersion: apps/v1 | |
kind: Deployment | |
name: ussd-deployment | |
minReplicas: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: ussd-service | |
spec: | |
type: ClusterIP | |
ports: | |
- port: 80 | |
targetPort: 7500 | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openjdk:8 as stage0 | |
LABEL snp-multi-stage="intermediate" | |
LABEL snp-multi-stage-id="52ff43b3-42bb-43db-a05f-231396a6736c" | |
WORKDIR /opt/docker | |
COPY 1/opt /1/opt | |
COPY 2/opt /2/opt | |
USER root | |
RUN ["chmod", "-R", "u=rX,g=rX", "/1/opt/docker"] | |
RUN ["chmod", "-R", "u=rX,g=rX", "/2/opt/docker"] | |
RUN ["chmod", "u+x,g+x", "/1/opt/docker/bin/utility-ussd"] |
NewerOlder