diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ca7b223 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM alpine + +ADD config.toml /config.toml +#ADD https://github.com/teeratpitakrat/hora/releases/download/v0.0.1/hora /hora +ADD hora /hora +RUN chmod 700 /hora + +EXPOSE 8080 +CMD ["/hora"] diff --git a/k8s-hora.yaml b/k8s-hora.yaml new file mode 100644 index 0000000..023648b --- /dev/null +++ b/k8s-hora.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +kind: Service +metadata: + name: hora + labels: + name: hora +spec: + type: NodePort + ports: + - port: 8080 + name: http + nodePort: 31100 + selector: + name: hora +--- +apiVersion: v1 +kind: ReplicationController +metadata: + name: hora + labels: + name: hora +spec: + replicas: 1 + selector: + name: hora + template: + metadata: + labels: + name: hora + spec: + containers: + - name: hora + image: teeratpitakrat/hora:0.0.1 + imagePullPolicy: Always + ports: + - containerPort: 8080