Add anki build script
This commit is contained in:
commit
2e4e857b37
6
.gitlab-ci.yaml
Normal file
6
.gitlab-ci.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
include:
|
||||
- project: 'gitlab.palk.me/templates'
|
||||
file: '/gitlab-ci/Paltiverse.gitlab-ci.yml'
|
||||
|
||||
variables:
|
||||
PAL_BUILD_STRATEGY: 'docker'
|
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM rust:1
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y protobuf-compiler
|
||||
|
||||
RUN cargo install --git https://github.com/ankitects/anki.git anki-sync-server
|
||||
|
||||
CMD [ "anki-sync-server" ]
|
74
k8s/deployment.yaml
Normal file
74
k8s/deployment.yaml
Normal file
@ -0,0 +1,74 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: anki-storage
|
||||
namespace: default
|
||||
spec:
|
||||
storageClassName: local-path
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: anki-deployment
|
||||
namespace: default
|
||||
labels:
|
||||
app: anki
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: anki
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: anki
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: paltiverse-docker
|
||||
containers:
|
||||
- name: anki
|
||||
image: gitlab.palk.me:5050/paltiverse/palanki:$CI_COMMIT_SHA
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
requests:
|
||||
cpu: 200m
|
||||
env:
|
||||
- name: SYNC_PORT
|
||||
value: "8080"
|
||||
- name: SYNC_BASE
|
||||
value: "/data/sync"
|
||||
- name: SYNC_USER1
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: user1
|
||||
name: anki-users
|
||||
volumeMounts:
|
||||
- mountPath: "/data/sync"
|
||||
name: anki-sync-base
|
||||
volumes:
|
||||
- name: anki-sync-base
|
||||
persistentVolumeClaim:
|
||||
claimName: anki-storage
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: anki-svc
|
||||
namespace: default
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- targetPort: 8080
|
||||
port: 8081
|
||||
selector:
|
||||
app: anki
|
||||
|
Loading…
x
Reference in New Issue
Block a user