Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
communication-install-scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fabrizio bianchi
communication-install-scripts
Commits
4386a8eb
Commit
4386a8eb
authored
4 years ago
by
Ruben Rodriguez
Browse files
Options
Downloads
Patches
Plain Diff
Corrections to canvas install script
parent
6f2b10a1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Canvas.sh
+20
-17
20 additions, 17 deletions
Canvas.sh
with
20 additions
and
17 deletions
Canvas.sh
+
20
−
17
View file @
4386a8eb
...
...
@@ -40,27 +40,30 @@ sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger bio
# Update lists and install dependencies
apt-get update
apt-get dist-upgrade
apt-get
install
nodejs ruby2.4 ruby2.4-dev zlib1g-dev libxml2-dev
\
libsqlite3-dev postgresql libpq-dev
\
libxmlsec1-dev curl make g++
yarn
=
1.10.1-1 postgresql-10
\
passenger libapache2-mod-passenger apache2 python3-certbot-apache
libsqlite3-dev postgresql libpq-dev libxmlsec1-dev
\
curl make g++
yarn
=
1.10.1-1 postgresql-10 passenger
\
libapache2-mod-passenger apache2 python3-certbot-apache
\
language-pack-en redis-server
update-locale
LANG
=
en_US.UTF-8
# Configure database
cd
/
DBPASS
=
$(
pwgen 20
-n1
)
su postgres
-c
"psql -c
\"
CREATE USER canvas WITH PASSWORD '
$DBPASS
';
\"
"
su postgres
-c
'createdb canvas_development --owner=canvas'
su postgres
-c
'createdb canvas_production --owner=canvas'
su postgres
-c
'createdb canvas_test --owner=canvas'
su postgres
-l
-c
"psql -c
\"
CREATE USER canvas WITH PASSWORD '
$DBPASS
';
\"
"
su postgres
-l
-c
'createdb canvas_development --owner=canvas'
su postgres
-l
-c
'createdb canvas_production --owner=canvas'
su postgres
-l
-c
'createdb canvas_test --owner=canvas'
# Install canvas from git
adduser canvas
--system
--home
/srv/canvas
--shell
/bin/bash
cd
/srv/canvas
su canvas
-c
'git clone https://github.com/instructure/canvas-lms.git /srv/canvas'
su canvas
-c
'git -C /srv/canvas checkout stable'
su canvas
-l
-c
'git clone https://github.com/instructure/canvas-lms.git /srv/canvas'
su canvas
-l
-c
'git -C /srv/canvas checkout stable'
for
config
in
amazon_s3 dynamic_settings database
\
delayed_jobs domain file_store outgoing_mail security external_migration
;
\
...
...
@@ -70,13 +73,12 @@ su canvas -c "sed 's/your_password/$DBPASS/' -i /srv/canvas/config/database.yml"
su canvas
-c
"sed 's/12345/
$(
pwgen 50
-n1
)
/' -i /srv/canvas/config/security.yml"
gem
install
bundler
-v
1.13.6
su
-l
canvas
-c
'bundle install --path vendor/bundle'
su
-l
canvas
-c
'yarn install --pure-lockfile && yarn install --pure-lockfile'
npm
install
-g
coffee-script@1.6.2
su
-l
canvas
-c
'bundle exec rails db:initial_setup'
su
-l
canvas
-c
'bundle exec rails canvas:compile_assets'
su canvas
-l
-c
'RAILS_ENV=production bundle install --path vendor/bundle'
su canvas
-l
-c
'yarn install --pure-lockfile && yarn install --pure-lockfile'
su canvas
-l
-c
'RAILS_ENV=production bundle exec rails canvas:compile_assets'
su canvas
-l
-c
'RAILS_ENV=production bundle exec rails db:initial_setup'
# You can run this for testing
# su -l canvas -c 'bundle exec rails server'
...
...
@@ -136,7 +138,6 @@ cat << EOF > /etc/apache2/sites-enabled/canvas.conf
CustomLog /var/log/apache2/canvas_ssl_access.log combined
SSLEngine on
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
# the following ssl certificate files are generated for you from the ssl-cert package.
SSLCertificateFile /etc/letsencrypt/live/
$HOSTNAME
/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/
$HOSTNAME
/privkey.pem
SetEnv RAILS_ENV production
...
...
@@ -148,4 +149,6 @@ cat << EOF > /etc/apache2/sites-enabled/canvas.conf
</VirtualHost>
EOF
# Configure your email output by editing /srv/canvas/config/outgoing_mail.yml
service apache2 restart
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment