Verified Commit 42498b72 authored by Dmytro Bogatov's avatar Dmytro Bogatov 💕

Work so far.

parent dc499535
Pipeline #2487 failed with stages
in 6 minutes and 43 seconds
......@@ -26,20 +26,22 @@ do
mkdir -p services/$service
cp sources/service/{service,deployment}.yaml services/$service
if [ "$service" != "database" ]
then
IMAGE="dbogatov/status-site:$service-$TAG"
FILE="deployment"
PORT="80"
else
IMAGE="postgres:9.6.3-alpine"
FILE="deployment-database"
PORT="5432"
fi
sed -i -e "s#__NAME__#$service#g" services/$service/{service,deployment}.yaml
sed -i -e "s#__IMAGE__#$IMAGE#g" services/$service/{service,deployment}.yaml
sed -i -e "s#__PORT__#$PORT#g" services/$service/{service,deployment}.yaml
cp sources/service/{service,$FILE}.yaml services/$service
sed -i -e "s#__NAME__#$service#g" services/$service/{service,$FILE}.yaml
sed -i -e "s#__IMAGE__#$IMAGE#g" services/$service/{service,$FILE}.yaml
sed -i -e "s#__PORT__#$PORT#g" services/$service/{service,$FILE}.yaml
done
......
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: __NAME__
namespace: status-site
labels:
application: __NAME__
spec:
replicas: 1
selector:
matchLabels:
application: __NAME__
template:
metadata:
labels:
application: __NAME__
spec:
containers:
- name: __NAME__
image: __IMAGE__
imagePullPolicy: Always
volumeMounts:
- name: database-persistent-storage
mountPath: /var/lib/postgresql/data
env:
- name: POSTGRES_DB
value: "statussite"
- name: POSTGRES_USER
value: "statususer"
- name: POSTGRES_PASSWORD
value: "relyOn1InternalSwarmNetwork"
volumes:
- name: database-persistent-storage
persistentVolumeClaim:
claimName: database-pv-claim
......@@ -24,12 +24,6 @@ spec:
- name: appsettings
mountPath: "/run/secrets/"
env:
- name: POSTGRES_DB
value: "statussite"
- name: POSTGRES_USER
value: "statususer"
- name: POSTGRES_PASSWORD
value: "relyOn1InternalSwarmNetwork"
- name: ASPNETCORE_ENVIRONMENT
value: "Production"
volumes:
......
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: database-pv-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
---
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment