Move to k8s

This commit is contained in:
Cadey Ratio 2019-09-12 20:56:22 +00:00
parent b6beeb3782
commit edfd5d142c
3 changed files with 34 additions and 0 deletions

6
Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM xena/alpine
RUN apk --no-cache add quickserv
ENV PORT 3000
CMD quickserv -port $PORT -dir /book
COPY ./book /book
WORKDIR /book

14
k8s/k8s.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
dyson manifest \
--name=tulpanomicon \
--domain=tulpanomicon.guide \
--dockerImage=xena/tulpanomicon:091220191 \
--containerPort=3000 \
--replicas=1 \
--useProdLE=true > manifest.yml
kubens apps
kubectl apply -f manifest.yml
kubectl apply -f tor.yml
rm manifest.yml

14
k8s/tor.yml Normal file
View File

@ -0,0 +1,14 @@
apiVersion: tor.k8s.io/v1alpha1
kind: OnionService
metadata:
name: tulpanomicon
spec:
version: 2
selector:
app: tulpanomicon
ports:
- targetPort: 3000
publicPort: 80
privateKeySecret:
name: tulpanomicon-tor-key
key: private_key