start.sh copying and starting fix, deployment
This commit is contained in:
@@ -14,7 +14,7 @@ RUN sed -i 's@deb.debian.org@apt-cache.lan/deb.debian.org@g' /etc/apt/sources.li
|
||||
|
||||
#setup
|
||||
RUN useradd -ms /bin/bash -r almond-cloud && id almond-cloud
|
||||
COPY --chown=almond-cloud:almond-cloud . /opt/almond-cloud/
|
||||
COPY --chown=almond-cloud:almond-cloud start.sh /opt/almond-cloud/
|
||||
WORKDIR /opt/almond-cloud/
|
||||
RUN echo "build_from_source = true" > .npmrc && \
|
||||
echo "sqlite = external" >> .npmrc && \
|
||||
@@ -31,4 +31,4 @@ RUN apt-get remove -y --purge ${DEVPKGS} && \
|
||||
|
||||
USER almond-cloud
|
||||
WORKDIR /home/almond-cloud
|
||||
ENTRYPOINT ["/opt/almond-cloud/docker/start.sh"]
|
||||
ENTRYPOINT ["/opt/almond-cloud/start.sh"]
|
||||
67
apps/web/almond-cloud/deployment.yaml
Normal file
67
apps/web/almond-cloud/deployment.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
---
|
||||
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: almond-cloud
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: almond-cloud
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: almond-cloud
|
||||
spec:
|
||||
containers:
|
||||
- image: cr.lan/almond-cloud
|
||||
name: almond-cloud
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: almond-cloud-data
|
||||
mountPath: /home/almond-cloud
|
||||
volumes:
|
||||
- name: almond-cloud-data
|
||||
persistentVolumeClaim:
|
||||
claimName: almond-cloud-data
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: almond-cloud
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 3000
|
||||
selector:
|
||||
app: almond-cloud
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: almond-cloud
|
||||
spec:
|
||||
rules:
|
||||
- host: almond.lan
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: almond-cloud
|
||||
servicePort: http
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: almond-cloud-data
|
||||
spec:
|
||||
storageClassName: nfs-ssd-ebin01
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 6Gi
|
||||
|
||||
Reference in New Issue
Block a user