-
Notifications
You must be signed in to change notification settings - Fork 10
/
manifest.jps
73 lines (61 loc) · 2.33 KB
/
manifest.jps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
version: '1.5'
appVersion: latest
type: install
id: ghost
name: Ghost
baseUrl: https://raw.githubusercontent.com/jelastic-jps/ghost/master
logo: /images/ghost-white.png
homepage: https://ghost.org/
mixins:
- configs/vers.yaml
categories:
- apps/content-management
description:
text: /texts/description.md
short: The professional publishing platform
success: /texts/success.md
globals:
configPath: /home/jelastic/ROOT/core/shared/config
defaultConfig: ${globals.configPath}/defaults.json
configDevelopment: ${globals.configPath}/env/config.development.json
configProduction: ${globals.configPath}/env/config.production.json
nodes:
- cloudlets: 18
nodeType: nodejs16-forever
env:
NODE_ENV: production
PACKAGE_MANAGER: yarn
- cloudlets: 8
nodeType: mysql
onInstall:
- deployArchive
- createDb
- deployHomeDir
- restartNodes:
nodeGroup: [cp]
- migration_lock_remove
- restartNodes:
nodeGroup: [cp]
actions:
deployArchive:
deploy:
name: Ghost-latest
context: ROOT
archive: https://github.com/TryGhost/Ghost/releases/download/v${globals.version_ghost}/Ghost-${globals.version_ghost}.zip
deployHomeDir:
cmd[cp]:
sed -i 's|"url":\ "http:\/\/localhost:2368",|"url":"http:\/\/${env.domain}",|g' ${globals.defaultConfig};
sed -i 's|"host":\ "127.0.0.1",|"host":"${nodes.cp.master.intIP}",|g' ${globals.defaultConfig};
sed -i 's|2368|8080|g' ${globals.defaultConfig};
sed -i 's|"url":\ "http:\/\/localhost:2368",|"url":\ "http:\/\/${env.domain}",|g' ${globals.configDevelopment};
sed -i 's|"client":\ "sqlite3",|"client":\ "mysql",|g' ${globals.configDevelopment};
sed -i 's|"filename":\ "content\/data\/ghost-dev.db"|"host":\ "${nodes.sqldb.master.intIP}",\n"user":\ "root",\n"password":\ "${nodes.mysql.password}",\n"database":\ "ghost"|g' ${globals.configDevelopment};
sed -i 's|127.0.0.1|${nodes.sqldb.master.intIP}|g' ${globals.configProduction};
sed -i 's|"password"\ :\ ""|"password"\ :\ "${nodes.mysql.password}"|g' ${globals.configProduction};
cd $HOME/ROOT;
createDb:
cmd[sqldb]:
mysql -uroot -p${nodes.mysql.password} -e "create database ghost" 2>&1 1>/dev/null
migration_lock_remove:
cmd[sqldb]:
mysql -uroot -p${nodes.mysql.password} -e "use ghost;UPDATE migrations_lock set locked=0 where lock_key='km01';"