mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-24 17:04:43 +00:00
Updated passenger pools for test deploy and moved workers to statefulsets in production
This commit is contained in:
@@ -4,8 +4,8 @@ RAM_KB=$(grep MemTotal /proc/meminfo | awk '{print $2}')
|
||||
RAM_MB=$(expr $RAM_KB / 1024)
|
||||
RAM_GB=$(expr $RAM_MB / 1024)
|
||||
RAM_WITHOUT_OTHER_SERVICES=$(expr $RAM_MB - 1024) # other services use ~1024MB of RAM
|
||||
PASSENGER_POOL_FACTOR=$(expr $RAM_WITHOUT_OTHER_SERVICES / 256) # 2 pool workers use ~256MB of RAM
|
||||
export PASSENGER_POOL_SIZE=$(expr $PASSENGER_POOL_FACTOR '*' 2)
|
||||
PASSENGER_POOL_FACTOR=$(expr $RAM_WITHOUT_OTHER_SERVICES / 256) # 1 pool worker uses ~256MB of RAM
|
||||
export PASSENGER_POOL_SIZE=$(expr $PASSENGER_POOL_FACTOR '*' 1)
|
||||
|
||||
#docker build -t wrestlingdev:test -f ${project_dir}/deploy/rails-prod-Dockerfile ${project_dir}
|
||||
docker-compose -f ${project_dir}/deploy/docker-compose-test.yml kill
|
||||
|
||||
@@ -134,9 +134,9 @@ spec:
|
||||
# targetAverageValue: 100Mi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: wrestlingdev-worker-deployment
|
||||
name: wrestlingdev-worker
|
||||
labels:
|
||||
app: wrestlingdev
|
||||
spec:
|
||||
@@ -144,6 +144,7 @@ spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: wrestlingdev
|
||||
serviceName: wrestlingdev-worker
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
@@ -188,11 +189,6 @@ spec:
|
||||
secretKeyRef:
|
||||
name: wrestlingdev-secrets
|
||||
key: railssecretkey
|
||||
- name: WRESTLINGDEV_SECRET_KEY_BASE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: wrestlingdev-secrets
|
||||
key: railssecretkey
|
||||
- name: WRESTLINGDEV_EMAIL_PWD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
||||
Reference in New Issue
Block a user