go-duck-cli 1.1.29 → 1.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators/devops.js +6 -1
- package/package.json +1 -1
package/generators/devops.js
CHANGED
|
@@ -96,6 +96,7 @@ services:
|
|
|
96
96
|
- "${dbPort}:5432"
|
|
97
97
|
volumes:
|
|
98
98
|
- postgres_data:/var/lib/postgresql/data
|
|
99
|
+
- ./postgres-init:/docker-entrypoint-initdb.d
|
|
99
100
|
healthcheck:
|
|
100
101
|
test: ["CMD-SHELL", "pg_isready -U ${config.datasource?.username || 'postgres'} -d ${config.datasource?.database || 'go_duck_master'}"]
|
|
101
102
|
interval: 5s
|
|
@@ -167,7 +168,7 @@ services:
|
|
|
167
168
|
KEYCLOAK_ADMIN: admin
|
|
168
169
|
KEYCLOAK_ADMIN_PASSWORD: admin
|
|
169
170
|
KC_DB: postgres
|
|
170
|
-
KC_DB_URL: jdbc:postgresql://postgres:5432
|
|
171
|
+
KC_DB_URL: jdbc:postgresql://postgres:5432/keycloak
|
|
171
172
|
KC_DB_USERNAME: ${config.datasource?.username || 'postgres'}
|
|
172
173
|
KC_DB_PASSWORD: ${config.datasource?.password || 'password'}
|
|
173
174
|
depends_on:
|
|
@@ -392,6 +393,10 @@ jobs:
|
|
|
392
393
|
await fs.ensureDir(realmConfigDir);
|
|
393
394
|
await fs.writeFile(path.join(realmConfigDir, `${realmName}-realm.json`), realmJson);
|
|
394
395
|
|
|
396
|
+
const postgresInitDir = path.join(devopsDir, 'postgres-init');
|
|
397
|
+
await fs.ensureDir(postgresInitDir);
|
|
398
|
+
await fs.writeFile(path.join(postgresInitDir, 'init.sql'), 'CREATE DATABASE keycloak;\n');
|
|
399
|
+
|
|
395
400
|
await fs.writeFile(path.join(devopsDir, 'Dockerfile'), dockerfile);
|
|
396
401
|
await fs.writeFile(path.join(devopsDir, 'services.yml'), servicesYaml);
|
|
397
402
|
await fs.writeFile(path.join(devopsDir, 'app.yml'), appYaml);
|