Skip to content

Commit

Permalink
feat(cloud): add php opcache settings to cloud-screenshot environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
lots0logs committed Mar 1, 2022
1 parent babd9c3 commit e82b563
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 55 deletions.
2 changes: 1 addition & 1 deletion charts/cloud-screenshot/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ maintainers:
- email: dustin@elegantthemes.com
name: Elegant Themes
name: cloud-screenshot
version: 0.9.15
version: 0.9.16
14 changes: 9 additions & 5 deletions charts/cloud-screenshot/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@
fieldRef:
fieldPath: spec.nodeName
- name: CLOUD_SCREENSHOT_PATH
value: '{{ .Values.INSTALL_PATH }}'
value: {{ .Values.INSTALL_PATH | squote }}
- name: VIRTUAL_HOST
value: '{{ .Values.VIRTUAL_HOST }}'
value: {{ .Values.VIRTUAL_HOST | squote }}
- name: CLOUD_SCREENSHOT_REPO_URL
value: '{{ .Values.CLOUD_SCREENSHOT_REPO_URL }}'
value: {{ .Values.CLOUD_SCREENSHOT_REPO_URL | squote }}
- name: IMAGE_VERSION
value: '{{ .Values.CLOUD_SCREENSHOT_VERSION }}'
value: {{ .Values.CLOUD_SCREENSHOT_VERSION | squote }}
- name: CLOUD_SCREENSHOT_WORKER
value: '1'
image: '{{ .Values.CLOUD_SCREENSHOT_IMAGE }}'
- name: PHP_OPCACHE_FILE_CACHE
value: {{ ternary "/var/cache/php" "" (eq "production" .Values.WP_ENV) | squote }}
- name: PHP_OPCACHE_VALIDATE_TIMESTAMPS
value: {{ ternary "false" "true" (eq "production" .Values.WP_ENV) | squote }}
image: {{ .Values.CLOUD_SCREENSHOT_IMAGE | squote }}
resources:
requests:
cpu: 100m
Expand Down
30 changes: 19 additions & 11 deletions charts/cloud-screenshot/templates/cloud-screenshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,22 @@ spec:
fieldRef:
fieldPath: spec.nodeName
- name: CLOUD_SCREENSHOT_PATH
value: '{{ .Values.INSTALL_PATH }}'
value: {{ .Values.INSTALL_PATH | squote }}
- name: VIRTUAL_HOST
value: '{{ .Values.VIRTUAL_HOST }}'
value: {{ .Values.VIRTUAL_HOST | squote }}
- name: CLOUD_SCREENSHOT_REPO_URL
value: '{{ .Values.CLOUD_SCREENSHOT_REPO_URL }}'
value: {{ .Values.CLOUD_SCREENSHOT_REPO_URL | squote }}
- name: IMAGE_VERSION
value: '{{ .Values.CLOUD_SCREENSHOT_VERSION }}'
value: {{ .Values.CLOUD_SCREENSHOT_VERSION | squote }}
- name: CLOUD_SCREENSHOT_INIT
value: '1'
- name: DIVI_VERSION
value: '{{ .Values.DIVI_VERSION }}'
image: '{{ .Values.CLOUD_SCREENSHOT_IMAGE }}'
value: {{ .Values.DIVI_VERSION | squote }}
- name: PHP_OPCACHE_FILE_CACHE
value: {{ ternary "/var/cache/php" "" (eq "production" .Values.WP_ENV) | squote }}
- name: PHP_OPCACHE_VALIDATE_TIMESTAMPS
value: {{ ternary "false" "true" (eq "production" .Values.WP_ENV) | squote }}
image: {{ .Values.CLOUD_SCREENSHOT_IMAGE | squote }}
command: ['/etc/cont-init.d/init']
resources:
requests:
Expand All @@ -90,15 +94,19 @@ spec:
fieldRef:
fieldPath: spec.nodeName
- name: CLOUD_SCREENSHOT_PATH
value: '{{ .Values.INSTALL_PATH }}'
value: {{ .Values.INSTALL_PATH | squote }}
- name: VIRTUAL_HOST
value: '{{ .Values.VIRTUAL_HOST }}'
value: {{ .Values.VIRTUAL_HOST | squote }}
- name: CLOUD_SCREENSHOT_REPO_URL
value: '{{ .Values.CLOUD_SCREENSHOT_REPO_URL }}'
value: {{ .Values.CLOUD_SCREENSHOT_REPO_URL | squote }}
- name: IMAGE_VERSION
value: '{{ .Values.CLOUD_SCREENSHOT_VERSION }}'
value: {{ .Values.CLOUD_SCREENSHOT_VERSION | squote }}
- name: PHP_OPCACHE_FILE_CACHE
value: {{ ternary "/var/cache/php" "" (eq "production" .Values.WP_ENV) | squote }}
- name: PHP_OPCACHE_VALIDATE_TIMESTAMPS
value: {{ ternary "false" "true" (eq "production" .Values.WP_ENV) | squote }}

image: '{{ .Values.CLOUD_SCREENSHOT_IMAGE }}'
image: {{ .Values.CLOUD_SCREENSHOT_IMAGE | squote }}
livenessProbe:
exec:
command:
Expand Down
76 changes: 38 additions & 38 deletions charts/cloud-screenshot/templates/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,44 @@ stringData:
ADMIN_PASSWORD: {{ .Values.ADMIN_PASSWORD }}
ADMIN_EMAIL: {{ .Values.ADMIN_EMAIL }}
GITHUB_TOKEN: {{ .Values.GITHUB_TOKEN }}
UPLOADS_ZIP_URL: '{{ .Values.UPLOADS_ZIP_URL }}'
UPLOADS_ZIP_URL: {{ .Values.UPLOADS_ZIP_URL | squote }}
.env: |
AUTH_KEY='{{ .Values.AUTH_KEY }}'
AUTH_SALT='{{ .Values.AUTH_SALT }}'
CLOUD_SCREENSHOT_PATH='{{ .Values.INSTALL_PATH }}'
CLOUD_SCREENSHOT_REPO_URL='{{ .Values.CLOUD_SCREENSHOT_REPO_URL }}'
DB_HOST_0='{{ .Values.DB_HOST_0 }}'
DB_HOST_1='{{ .Values.DB_HOST_1 }}'
DB_HOST_2='{{ .Values.DB_HOST_2 }}'
DB_NAME='{{ .Values.DB_NAME }}'
DB_PASSWORD='{{ .Values.DB_PASSWORD }}'
DB_PREFIX='{{ .Values.DB_PREFIX }}'
DB_USER='{{ .Values.DB_USER }}'
IMAGE_VERSION='{{ .Values.CLOUD_SCREENSHOT_VERSION }}'
LOGGED_IN_KEY='{{ .Values.LOGGED_IN_KEY }}'
LOGGED_IN_SALT='{{ .Values.LOGGED_IN_SALT }}'
NONCE_KEY='{{ .Values.NONCE_KEY }}'
NONCE_SALT='{{ .Values.NONCE_SALT }}'
S3_BUCKET_CLOUD_ITEMS='{{ .Values.S3_BUCKET_CLOUD_ITEMS }}'
S3_BUCKET_CLOUD_ITEMS_BACKUP_1='{{ .Values.S3_BUCKET_CLOUD_ITEMS_BACKUP_1 }}'
S3_BUCKET_CLOUD_ITEMS_BACKUP_2='{{ .Values.S3_BUCKET_CLOUD_ITEMS_BACKUP_2 }}'
S3_ENDPOINT_CLOUD_ITEMS='{{ .Values.S3_ENDPOINT_CLOUD_ITEMS }}'
S3_ENDPOINT_CLOUD_ITEMS_BACKUP_1='{{ .Values.S3_ENDPOINT_CLOUD_ITEMS_BACKUP_1 }}'
S3_ENDPOINT_CLOUD_ITEMS_BACKUP_2='{{ .Values.S3_ENDPOINT_CLOUD_ITEMS_BACKUP_2 }}'
S3_KEY_CLOUD_ITEMS='{{ .Values.S3_KEY_CLOUD_ITEMS }}'
S3_KEY_CLOUD_ITEMS_BACKUP_1='{{ .Values.S3_KEY_CLOUD_ITEMS_BACKUP_1 }}'
S3_KEY_CLOUD_ITEMS_BACKUP_2='{{ .Values.S3_KEY_CLOUD_ITEMS_BACKUP_2 }}'
S3_REGION_CLOUD_ITEMS='{{ .Values.S3_REGION_CLOUD_ITEMS }}'
S3_REGION_CLOUD_ITEMS_BACKUP_1='{{ .Values.S3_REGION_CLOUD_ITEMS_BACKUP_1 }}'
S3_REGION_CLOUD_ITEMS_BACKUP_2='{{ .Values.S3_REGION_CLOUD_ITEMS_BACKUP_2 }}'
S3_SECRET_CLOUD_ITEMS='{{ .Values.S3_SECRET_CLOUD_ITEMS }}'
S3_SECRET_CLOUD_ITEMS_BACKUP_1='{{ .Values.S3_SECRET_CLOUD_ITEMS_BACKUP_1 }}'
S3_SECRET_CLOUD_ITEMS_BACKUP_2='{{ .Values.S3_SECRET_CLOUD_ITEMS_BACKUP_2 }}'
SECURE_AUTH_KEY='{{ .Values.SECURE_AUTH_KEY }}'
SECURE_AUTH_SALT='{{ .Values.SECURE_AUTH_SALT }}'
VIRTUAL_HOST='{{ .Values.VIRTUAL_HOST }}'
AUTH_KEY={{ .Values.AUTH_KEY | squote }}
AUTH_SALT={{ .Values.AUTH_SALT | squote }}
CLOUD_SCREENSHOT_PATH={{ .Values.INSTALL_PATH | squote }}
CLOUD_SCREENSHOT_REPO_URL={{ .Values.CLOUD_SCREENSHOT_REPO_URL | squote }}
DB_HOST_0={{ .Values.DB_HOST_0 | squote }}
DB_HOST_1={{ .Values.DB_HOST_1 | squote }}
DB_HOST_2={{ .Values.DB_HOST_2 | squote }}
DB_NAME={{ .Values.DB_NAME | squote }}
DB_PASSWORD={{ .Values.DB_PASSWORD | squote }}
DB_PREFIX={{ .Values.DB_PREFIX | squote }}
DB_USER={{ .Values.DB_USER | squote }}
IMAGE_VERSION={{ .Values.CLOUD_SCREENSHOT_VERSION | squote }}
LOGGED_IN_KEY={{ .Values.LOGGED_IN_KEY | squote }}
LOGGED_IN_SALT={{ .Values.LOGGED_IN_SALT | squote }}
NONCE_KEY={{ .Values.NONCE_KEY | squote }}
NONCE_SALT={{ .Values.NONCE_SALT | squote }}
S3_BUCKET_CLOUD_ITEMS={{ .Values.S3_BUCKET_CLOUD_ITEMS | squote }}
S3_BUCKET_CLOUD_ITEMS_BACKUP_1={{ .Values.S3_BUCKET_CLOUD_ITEMS_BACKUP_1 | squote }}
S3_BUCKET_CLOUD_ITEMS_BACKUP_2={{ .Values.S3_BUCKET_CLOUD_ITEMS_BACKUP_2 | squote }}
S3_ENDPOINT_CLOUD_ITEMS={{ .Values.S3_ENDPOINT_CLOUD_ITEMS | squote }}
S3_ENDPOINT_CLOUD_ITEMS_BACKUP_1={{ .Values.S3_ENDPOINT_CLOUD_ITEMS_BACKUP_1 | squote }}
S3_ENDPOINT_CLOUD_ITEMS_BACKUP_2={{ .Values.S3_ENDPOINT_CLOUD_ITEMS_BACKUP_2 | squote }}
S3_KEY_CLOUD_ITEMS={{ .Values.S3_KEY_CLOUD_ITEMS | squote }}
S3_KEY_CLOUD_ITEMS_BACKUP_1={{ .Values.S3_KEY_CLOUD_ITEMS_BACKUP_1 | squote }}
S3_KEY_CLOUD_ITEMS_BACKUP_2={{ .Values.S3_KEY_CLOUD_ITEMS_BACKUP_2 | squote }}
S3_REGION_CLOUD_ITEMS={{ .Values.S3_REGION_CLOUD_ITEMS | squote }}
S3_REGION_CLOUD_ITEMS_BACKUP_1={{ .Values.S3_REGION_CLOUD_ITEMS_BACKUP_1 | squote }}
S3_REGION_CLOUD_ITEMS_BACKUP_2={{ .Values.S3_REGION_CLOUD_ITEMS_BACKUP_2 | squote }}
S3_SECRET_CLOUD_ITEMS={{ .Values.S3_SECRET_CLOUD_ITEMS | squote }}
S3_SECRET_CLOUD_ITEMS_BACKUP_1={{ .Values.S3_SECRET_CLOUD_ITEMS_BACKUP_1 | squote }}
S3_SECRET_CLOUD_ITEMS_BACKUP_2={{ .Values.S3_SECRET_CLOUD_ITEMS_BACKUP_2 | squote }}
SECURE_AUTH_KEY={{ .Values.SECURE_AUTH_KEY | squote }}
SECURE_AUTH_SALT={{ .Values.SECURE_AUTH_SALT | squote }}
VIRTUAL_HOST={{ .Values.VIRTUAL_HOST | squote }}
WP_DEBUG_LOG=true
WP_ENV='{{ .Values.WP_ENV }}'
WP_HOME='{{ .Values.WP_HOME }}'
WP_SITEURL='{{ .Values.WP_SITEURL }}'
WP_ENV={{ .Values.WP_ENV | squote }}
WP_HOME={{ .Values.WP_HOME | squote }}
WP_SITEURL={{ .Values.WP_SITEURL | squote }}

0 comments on commit e82b563

Please sign in to comment.