Fix settings to use global directories

This commit is contained in:
James Allen 2014-03-31 09:40:07 +01:00
parent 38380b1a5f
commit 5b6eaf546b
3 changed files with 20 additions and 12 deletions

View file

@ -65,7 +65,7 @@ action :start do
end
end
#notifies :restart, "service[#{r.name}]"
notifies :restart, "service[#{r.name}]"
end
file "/etc/init/#{r.name}.conf" do
@ -88,6 +88,13 @@ action :start do
EOS
end
directory "/etc/sharelatex"
template "/etc/sharelatex/settings.coffee" do
mode 0400
user "www-data"
notifies :restart, "service[#{r.name}]"
end
service "#{r.name}" do
provider Chef::Provider::Service::Upstart
action :start

View file

@ -5,11 +5,11 @@
# Copyright 2014, ShareLaTeX
#
directory "/etc/sharelatex"
template "/etc/sharelatex/settings.coffee" do
mode 0400
for dir in ["compiles", "clsi-cache", "user_files"] do
directory "/var/lib/sharelatex/#{dir}" do
user "www-data"
recursive true
end
end
sharelatex_app "web-sharelatex" do
@ -36,3 +36,4 @@ sharelatex_app "clsi-sharelatex" do
repository "https://github.com/sharelatex/clsi-sharelatex.git"
revision "master"
end

View file

@ -36,7 +36,7 @@ module.exports =
#
# For local filesystem this is the directory to store the files in.
# This path must exist, not be tmpfs and be writable to by the user sharelatex is run as.
user_files: Path.resolve(__dirname + "/../user_files")
user_files: "/var/lib/sharelatex/user_files"
# Uncomment if you need to configure your S3 credentials
# s3:
# # if you are using S3, then fill in your S3 details below
@ -65,7 +65,7 @@ module.exports =
username: "clsi"
password: ""
dialect: "sqlite"
storage: Path.resolve(__dirname + "/../db.sqlite")
storage: "/var/lib/sharelatex/clsi.sqlite"
# Service locations
# -----------------
@ -236,9 +236,9 @@ module.exports =
# them to disk here).
dumpFolder: Path.resolve "data/dumpFolder"
# Where to write the project to disk before running LaTeX on it
compilesDir: Path.resolve(__dirname + "/../compiles")
compilesDir: "/var/lib/sharelatex/compiles"
# Where to cache downloaded URLs for the CLSI
clsiCacheDir: Path.resolve(__dirname + "/../cache")
clsiCacheDir: "/var/lib/sharelatex/clsi-cache"
# Automatic Snapshots
# -------------------