Skip to content

Commit f2d50d7

Browse files
DEV: Updated vanilla.template.yml (#817)
* DEV: Updated vanilla.template.yml * updated vanilla.template.yml to make the migration process more straight forward * removed branch pull * implemented suggested changes * added suggested chantes * added before_code hook to set remote fork * updated with suggested changes
1 parent f785548 commit f2d50d7

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

templates/import/vanilla.template.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
# This template installs MariaDB and all dependencies needed for importing from vanilla.
2+
env:
3+
UNICORN_SIDEKIQS: 0
4+
25

36
params:
47
home: /var/www/discourse
58

69
hooks:
710
after_web_config:
8-
- exec:
9-
cd: /etc/service
10-
cmd:
11-
- rm -R unicorn
12-
- rm -R nginx
13-
- rm -R cron
14-
1511
- exec:
1612
cd: /etc/runit/3.d
1713
cmd:
@@ -36,7 +32,7 @@ hooks:
3632
- exec:
3733
cmd:
3834
- mkdir -p /shared/import/mysql/data
39-
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y nano libmariadbclient-dev mariadb-server
35+
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y nano libmariadb-dev mariadb-server
4036
- sed -Ei 's/^log/#&/' /etc/mysql/my.cnf
4137

4238
- file:
@@ -95,22 +91,30 @@ hooks:
9591
sv stop mysql
9692
fi
9793
98-
cd $home
99-
echo "The Vanilla import is starting..."
100-
echo
101-
su discourse -c 'bundle exec ruby script/import_scripts/vanilla.rb'
94+
echo "import_vanilla.sh completed"
10295
10396
- exec:
10497
cd: $home
10598
cmd:
10699
- mkdir -p /shared/import/data
107100
- chown discourse -R /shared/import
101+
102+
before_code:
103+
- exec:
104+
cd: $home
105+
cmd:
106+
# Add your discourse core fork and pull custom code
107+
- su discourse -c 'git remote set-url origin https://github.com/{github_username}/discourse.git'
108108

109109
after_bundle_exec:
110110
- exec:
111111
cd: $home
112112
cmd:
113-
- echo "gem 'mysql2'" >> Gemfile
113+
# Add the gems used in the script
114+
- echo "gem 'mysql2'" >> Gemfile
114115
- echo "gem 'ruby-bbcode-to-md', :github => 'nlalonde/ruby-bbcode-to-md'" >> Gemfile
115116
- su discourse -c 'bundle config unset deployment'
116117
- su discourse -c 'bundle install --no-deployment --path vendor/bundle --jobs 4 --without test development'
118+
- service mariadb start
119+
# imports the DB into mysql
120+
- sh /usr/local/bin/import_flarum_test.sh

0 commit comments

Comments
 (0)