-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprovision.sh
More file actions
32 lines (26 loc) · 787 Bytes
/
provision.sh
File metadata and controls
32 lines (26 loc) · 787 Bytes
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
#!/bin/bash
set -e
gem install bundler
sudo apt-get install libmysqlclient-dev
sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev
INSTANCE_NAME="$1"
TARGET_BRANCH="$2"
cd /var/www
git clone https://github.com/tipitnet/chiliproject $INSTANCE_NAME
cd $INSTANCE_NAME
git checkout $TARGET_BRANCH
git submodule init
git submodule update
mkdir files
mkdir log
mkdir -p tmp public/plugin_assets
touch log/received_emails.log
sudo chown -R nginx:app_writers files log tmp public/plugin_assets
sudo chmod -R 775 files log tmp public/plugin_assets
# get the config file -env
source ./.env
bundle install --without development
bundle exec rake generate_session_store
bundle exec rake db:migrate
bundle exec rake redmine:load_default_data
bundle exec rake db:migrate:plugins