Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Install Ruby and Node with setup-devel.sh #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions scripts/setup-common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

if [[ $EUID -eq 0 ]]; then
echo "taiga-scripts doesn't works properly if it used with root user." 1>&2
exit 1
fi

pushd ~
mkdir -p logs
mkdir -p conf
popd

# Bootstrap
# source ./scripts/setup-vars.sh
source ./scripts/setup-config.sh
source ./scripts/setup-apt.sh

# Setup and install services dependencies
source ./scripts/setup-postgresql.sh
#source ./scripts/setup-redis.sh
#source ./scripts/setup-rabbitmq.sh

# Setup and install Python related dependencies
source ./scripts/setup-buildessential.sh
source ./scripts/setup-python.sh

# Setup Taiga backend
source ./scripts/setup-backend.sh
44 changes: 44 additions & 0 deletions scripts/setup-frontend-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

FRONTEND_VERSION="stable"

pushd ~

cat > /tmp/conf.json <<EOF
{
"api": "http://127.0.0.1:8000/api/v1/",
"eventsUrl": null,
"debug": "true",
"publicRegisterEnabled": true,
"feedbackEnabled": false,
"privacyPolicyUrl": null,
"termsOfServiceUrl": null,
"maxUploadFileSize": null,
"gitHubClientId": null,
"contribPlugins": []
}
EOF


if [ ! -e ~/taiga-front ]; then
# Initial clear
git clone https://github.com/taigaio/taiga-front.git taiga-front
pushd ~/taiga-front
git checkout -f $FRONTEND_VERSION
mkdir -p dist/js
mv /tmp/conf.json dist/js/
popd
else
pushd ~/taiga-front
git fetch
git checkout -f $FRONTEND_VERSION
git reset --hard origin/stable
popd
fi

pushd ~/taiga-front
npm install
bower install --config.interactive=false
popd

popd
7 changes: 7 additions & 0 deletions scripts/setup-node.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# https://nodejs.org/en/download/package-manager/
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g gulp bower
sudo rm -rf ~/.npm
6 changes: 6 additions & 0 deletions scripts/setup-ruby.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

sudo apt-get install -y ruby
gem install --user-install sass scss_lint
echo "export PATH=~/.gem/ruby/1.9.1/bin:\$PATH" >> ~/.bashrc
source ~/.bashrc
28 changes: 6 additions & 22 deletions setup-devel.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
#!/bin/bash

source ./scripts/setup-common.sh

pushd ~
mkdir -p logs
mkdir -p conf
popd

# Bootstrap
# source ./scripts/setup-vars.sh
source ./scripts/setup-config.sh
source ./scripts/setup-apt.sh

# Setup and install services dependencies
source ./scripts/setup-postgresql.sh
#source ./scripts/setup-redis.sh
#source ./scripts/setup-rabbitmq.sh

# Setup and install python related dependencies
source ./scripts/setup-buildessential.sh
source ./scripts/setup-python.sh

# Setup Taiga
source ./scripts/setup-frontend.sh
source ./scripts/setup-backend.sh
# Setup tools for building the frontend
source ./scripts/setup-ruby.sh
source ./scripts/setup-node.sh

# Setup Taiga frontend
source ./scripts/setup-frontend-dev.sh
8 changes: 3 additions & 5 deletions setup-server.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#!/bin/bash

if [[ $EUID -eq 0 ]]; then
echo "taiga-scripts doesn't works properly if it used with root user." 1>&2
exit 1
fi
source ./scripts/setup-common.sh

source ./setup-devel.sh
# Setup Taiga frontend
source ./scripts/setup-frontend.sh

# Post Setup Services
source ./scripts/setup-circus.sh
Expand Down