mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 19:23:49 -05:00
Generate Secret keys properly and start services on boot
This commit is contained in:
parent
94ce0d37b9
commit
c2ebfcc23e
3 changed files with 5 additions and 4 deletions
|
@ -415,9 +415,9 @@ module.exports = (grunt) ->
|
||||||
|
|
||||||
after_install_script = """
|
after_install_script = """
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Create random secret keys
|
# Create random secret keys (twice, once for http auth pass, once for cookie secret).
|
||||||
sed -i "s/CRYPTO_RANDOM/$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 64 | head -n 1)/" /etc/sharelatex/settings.coffee
|
sed -i "0,/CRYPTO_RANDOM/s/CRYPTO_RANDOM/$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 64 | head -n 1)/" /etc/sharelatex/settings.coffee
|
||||||
sed -i "s/CRYPTO_RANDOM/$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 64 | head -n 1)/" /etc/sharelatex/settings.coffee
|
sed -i "0,/CRYPTO_RANDOM/s/CRYPTO_RANDOM/$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 64 | head -n 1)/" /etc/sharelatex/settings.coffee
|
||||||
|
|
||||||
sudo adduser --system --group --home /var/www/sharelatex --no-create-home sharelatex
|
sudo adduser --system --group --home /var/www/sharelatex --no-create-home sharelatex
|
||||||
|
|
||||||
|
|
1
Vagrantfile
vendored
1
Vagrantfile
vendored
|
@ -9,6 +9,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
|
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
|
||||||
|
|
||||||
config.vm.network :forwarded_port, guest: 3000, host: 3000
|
config.vm.network :forwarded_port, guest: 3000, host: 3000
|
||||||
|
config.vm.network :forwarded_port, guest: 80, host: 8080
|
||||||
|
|
||||||
config.ssh.forward_agent = true
|
config.ssh.forward_agent = true
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
description "sharelatex-web"
|
description "sharelatex-web"
|
||||||
author "ShareLaTeX <team@sharelatex.com>"
|
author "ShareLaTeX <team@sharelatex.com>"
|
||||||
|
|
||||||
start on started mountall
|
start on (local-filesystems and net-device-up IFACE!=lo)
|
||||||
stop on shutdown
|
stop on shutdown
|
||||||
|
|
||||||
respawn
|
respawn
|
||||||
|
|
Loading…
Reference in a new issue