-
Notifications
You must be signed in to change notification settings - Fork 6
/
manifest.jps
78 lines (66 loc) · 2.67 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
74
75
76
77
78
version: 1.7
type: install
id: redmine
name: Redmine
homepage: http://www.redmine.org/
logo: images/redmine_logo.png
description: Redmine is a flexible project management web application written using Ruby on Rails framework
globals:
DB_ADMIN_PASS: "${fn.password(10)}"
ADMIN_PASS: "${user.appPassword}"
baseUrl: https://raw.githubusercontent.com/jelastic-jps/redmine/master/
mixins:
- configs/vers.yaml
categories:
- apps/project-management
nodes:
- cloudlets: 8
nodeType: nginx-ruby
- cloudlets: 8
nodeType: mysql8
engine: ruby3.2
onInstall:
- deploy:
archive: https://www.redmine.org/releases/redmine-${globals.version_redmine}.zip
name: Redmine-${globals.version_redmine}.zip
context: production
- cmd[sqldb]: |-
MYSQL_PWD=${nodes.mysql8.password} mysql -uroot -e "CREATE DATABASE redmine;"
MYSQL_PWD=${nodes.mysql8.password} mysql -uroot -e "CREATE USER 'redmine'@'%' IDENTIFIED BY '${globals.DB_ADMIN_PASS}';"
MYSQL_PWD=${nodes.mysql8.password} mysql -uroot -e "GRANT ALL PRIVILEGES ON redmine.* To 'redmine'@'%' WITH GRANT OPTION;"
- cmd [cp]: cp /var/www/webroot/ROOT/config/database.yml.example /var/www/webroot/ROOT/config/database.yml
- replaceInFile:
nodeType: nginx-ruby
path: /var/www/webroot/ROOT/config/database.yml
replacements:
- pattern: "host: localhost"
replacement: "host: ${nodes.sqldb.address}"
- pattern: "username: root"
replacement: "username: redmine"
- pattern: "password: \"\""
replacement: "password: ${globals.DB_ADMIN_PASS}"
- restartNodes:
nodeGroup: cp
- cmd [cp]:
- echo $RUBY_VERSION >/var/www/webroot/ROOT/.ruby-version
- cd /var/www/webroot/ROOT/
- rm -rf .bundle
- bundle config set without 'development test'
- bundle config unset deployment
- echo "gem 'blankslate'" >Gemfile.local
- bundle install
- bundle exec rake generate_secret_token
- RAILS_ENV=production bundle exec rake db:migrate
- RAILS_ENV=production REDMINE_LANG=en bundle exec rake redmine:load_default_data
- mkdir -p tmp tmp/pdf public/plugin_assets
- chmod -R 755 files log tmp public/plugin_assets
- curl -fsSL "https://raw.githubusercontent.com/jelastic-jps/redmine/master/scripts/setPassword.sh" -o /tmp/setPassword.sh
- /bin/bash -x /tmp/setPassword.sh ${globals.ADMIN_PASS}
- restartNodes:
nodeGroup: cp
success: |
Below you will find your admin panel link, username and password.
Admin panel URL: [${env.protocol}://${env.domain}/](${env.protocol}://${env.domain}/)
Username: admin
Password: ${user.appPassword}
To add custom domain name for your Redmine installation follow the steps described in our [documentation](http://jelastic.com/docs/custom-domains)