This commit is contained in:
parent
563f23f760
commit
cef1135cab
@ -1,12 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Collect static files
|
||||
echo "Collect static files"
|
||||
python manage.py collectstatic --noinput
|
||||
|
||||
# Apply database migrations
|
||||
echo "Apply database migrations"
|
||||
python manage.py migrate
|
||||
python manage.py migrate --noinput
|
||||
|
||||
# Start server
|
||||
echo "Starting server"
|
||||
|
57
geogame.yml
57
geogame.yml
@ -42,6 +42,37 @@ spec:
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apache-static
|
||||
namespace: geogame
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: apache-geogame
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: apache-geogame
|
||||
spec:
|
||||
containers:
|
||||
- name: apache-geogame
|
||||
image: apache:2
|
||||
imagePullPolicy: "Always"
|
||||
volumeMounts:
|
||||
- mountPath: /usr/local/apache2/htdocs
|
||||
name: geogame-static-volume
|
||||
ports:
|
||||
- containerPort: 80
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
volumes:
|
||||
- name: geogame-static-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: geogame-static-pv-claim
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: geogame
|
||||
namespace: geogame
|
||||
@ -60,21 +91,16 @@ spec:
|
||||
image: registry.kmlabz.com/tormakris/geogame
|
||||
imagePullPolicy: "Always"
|
||||
volumeMounts:
|
||||
- mountPath: /app/static
|
||||
name: geogame-static-volume
|
||||
- mountPath: /app/media
|
||||
name: geogame-media-volume
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: xwiki-config
|
||||
name: geogame-config
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
volumes:
|
||||
- name: geogame-static-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: geogame-static-pv-claim
|
||||
- name: geogame-media-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: geogame-media-pv-claim
|
||||
@ -94,6 +120,21 @@ spec:
|
||||
selector:
|
||||
app: geogame
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: geogame-static
|
||||
namespace: geogame
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
name: http
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: apache-geogame
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
@ -114,4 +155,8 @@ spec:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: geogame
|
||||
servicePort: http
|
||||
- path: /static
|
||||
backend:
|
||||
serviceName: geogame-static
|
||||
servicePort: http
|
Loading…
Reference in New Issue
Block a user