Skip to content

Commit

Permalink
Use 3.3-ubi9 as default. Add initialConter to rail-postgresql.json
Browse files Browse the repository at this point in the history
Signed-off-by: Petr "Stone" Hracek <[email protected]>
  • Loading branch information
phracek committed Sep 24, 2024
1 parent ba8bd3b commit e08ff79
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 5 deletions.
4 changes: 2 additions & 2 deletions openshift/templates/rails-postgresql-persistent.json
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,9 @@
{
"name": "RUBY_VERSION",
"displayName": "Ruby Version",
"description": "Version of Ruby image to be used (3.0-ubi8 by default).",
"description": "Version of Ruby image to be used (3.3-ubi9 by default).",
"required": true,
"value": "3.0-ubi8"
"value": "3.3-ubi9"
},
{
"name": "POSTGRESQL_VERSION",
Expand Down
86 changes: 83 additions & 3 deletions openshift/templates/rails-postgresql.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"annotations": {
"description": "Defines how to deploy the application server",
"template.alpha.openshift.io/wait-for-ready": "true",
"image.openshift.io/triggers": "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"${NAME}:latest\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"}]"
"image.openshift.io/triggers": "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"${NAME}:latest\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"},{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"${NAME}:latest\"},\"fieldPath\": \"spec.template.spec.initContainers[0].image\"}]"
}
},
"spec": {
Expand Down Expand Up @@ -179,6 +179,86 @@
}
},
"spec": {
"initContainers": [
{
"name": "ruby-init-container",
"image": " ",
"command": [
"./migrate-database.sh"
],
"env": [
{
"name": "DATABASE_SERVICE_NAME",
"value": "${DATABASE_SERVICE_NAME}"
},
{
"name": "POSTGRESQL_USER",
"valueFrom": {
"secretKeyRef": {
"name": "${NAME}",
"key": "database-user"
}
}
},
{
"name": "POSTGRESQL_PASSWORD",
"valueFrom": {
"secretKeyRef": {
"name": "${NAME}",
"key": "database-password"
}
}
},
{
"name": "SECRET_KEY_BASE",
"valueFrom": {
"secretKeyRef": {
"name": "${NAME}",
"key": "keybase"
}
}
},
{
"name": "POSTGRESQL_DATABASE",
"value": "${DATABASE_NAME}"
},
{
"name": "POSTGRESQL_MAX_CONNECTIONS",
"value": "${POSTGRESQL_MAX_CONNECTIONS}"
},
{
"name": "POSTGRESQL_SHARED_BUFFERS",
"value": "${POSTGRESQL_SHARED_BUFFERS}"
},
{
"name": "APPLICATION_DOMAIN",
"value": "${APPLICATION_DOMAIN}"
},
{
"name": "APPLICATION_USER",
"valueFrom": {
"secretKeyRef": {
"name": "${NAME}",
"key": "application-user"
}
}
},
{
"name": "APPLICATION_PASSWORD",
"valueFrom": {
"secretKeyRef": {
"name": "${NAME}",
"key": "application-password"
}
}
},
{
"name": "RAILS_ENV",
"value": "${RAILS_ENV}"
}
]
}
],
"containers": [
{
"name": "${NAME}",
Expand Down Expand Up @@ -434,9 +514,9 @@
{
"name": "RUBY_VERSION",
"displayName": "Ruby Version",
"description": "Version of Ruby image to be used (3.0-ubi8 by default).",
"description": "Version of Ruby image to be used (3.3-ubi9 by default).",
"required": true,
"value": "3.0-ubi8"
"value": "3.3-ubi9"
},
{
"name": "MEMORY_LIMIT",
Expand Down

0 comments on commit e08ff79

Please sign in to comment.