Skip to content

Commit fdee5ee

Browse files
use postgres:17
1 parent 7505465 commit fdee5ee

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

assets/js/hubsetup.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,10 @@ class ConfigBuilder {
187187
let sql = [];
188188
if (!this.cfg.keycloak.useExternal) {
189189
sql.push(`CREATE USER keycloak WITH ENCRYPTED PASSWORD '${this.cfg.db.keycloakPw}';
190-
CREATE DATABASE keycloak WITH ENCODING 'UTF8';
191-
GRANT ALL PRIVILEGES ON DATABASE keycloak TO keycloak;`)
190+
CREATE DATABASE keycloak WITH ENCODING 'UTF8' OWNER keycloak;`)
192191
}
193192
sql.push(`CREATE USER hub WITH ENCRYPTED PASSWORD '${this.cfg.db.hubPw}';
194-
CREATE DATABASE hub WITH ENCODING 'UTF8';
195-
GRANT ALL PRIVILEGES ON DATABASE hub TO hub;`);
193+
CREATE DATABASE hub WITH ENCODING 'UTF8' OWNER hub;`);
196194
return sql.join('\n');
197195
}
198196

@@ -388,15 +386,16 @@ EOF`;
388386
getPostgresService() {
389387
return {
390388
depends_on: {'init-config': {condition: 'service_completed_successfully'}},
391-
image: 'postgres:14-alpine',
389+
image: 'postgres:17-alpine',
392390
volumes: ['db-init:/docker-entrypoint-initdb.d', 'db-data:/var/lib/postgresql/data'],
393391
deploy: {
394392
resources: {
395-
limits: {cpus: '1.0', memory: '256M'}
393+
limits: {cpus: '1.0', memory: '128M'}
396394
}
397395
},
398396
healthcheck: {
399397
test: ['CMD', 'pg_isready', '-U', 'postgres'],
398+
start_period: '30s',
400399
interval: '10s',
401400
timeout: '3s',
402401
},
@@ -714,10 +713,10 @@ class KubernetesConfigBuilder extends ConfigBuilder {
714713
spec: {
715714
containers: [{
716715
name: 'postgres',
717-
image: 'postgres:14-alpine',
716+
image: 'postgres:17-alpine',
718717
ports: [{containerPort: 5432}],
719718
resources: {
720-
requests: {cpu: '25m', memory: '64Mi'},
719+
requests: {cpu: '25m', memory: '32Mi'},
721720
limits: {cpu: '1000m', memory: '256Mi'},
722721
},
723722
livenessProbe: {

0 commit comments

Comments
 (0)