mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
Improvements & fixes for vagrant staging
This commit is contained in:
parent
e6d2e4d29b
commit
b36a062eb4
7 changed files with 17 additions and 11 deletions
|
@ -18,7 +18,7 @@ vagrant up --provision
|
||||||
```
|
```
|
||||||
vagrant ssh
|
vagrant ssh
|
||||||
cd /vagrant
|
cd /vagrant
|
||||||
bundle exec rackup
|
bundle exec rackup -o 0.0.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Now you can access the running site from your browser: http://127.0.0.1:9292
|
Now you can access the running site from your browser: http://127.0.0.1:9292
|
||||||
|
|
|
@ -84,6 +84,7 @@ post '/create' do
|
||||||
return {result: 'error'}.to_json
|
return {result: 'error'}.to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@site.email_confirmed = true if self.class.development?
|
||||||
@site.save
|
@site.save
|
||||||
|
|
||||||
session[:captcha_valid] = nil
|
session[:captcha_valid] = nil
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
development:
|
development:
|
||||||
database: 'postgres://neocities@localhost/neocities'
|
database: 'postgres://localhost/neocities'
|
||||||
database_pool: 1
|
database_pool: 1
|
||||||
session_secret: "SECRET GOES HERE"
|
session_secret: "SECRET GOES HERE"
|
||||||
recaptcha_public_key: "ENTER PUBLIC KEY HERE"
|
recaptcha_public_key: "6LdSMScTAAAAAADhP4IDb5s_EN1qMmvNmrUXReE-"
|
||||||
recaptcha_private_key: "ENTER PRIVATE KEY HERE"
|
recaptcha_private_key: "6LdSMScTAAAAAIZAvP_W9d8fMsVT3iBX5wCwGvqV"
|
||||||
sidekiq_user: "ENTER USER HERE"
|
sidekiq_user: "ENTER USER HERE"
|
||||||
sidekiq_pass: "ENTER PASS HERE"
|
sidekiq_pass: "ENTER PASS HERE"
|
||||||
stripe_publishable_key: "ENTER KEY HERE"
|
stripe_publishable_key: "ENTER KEY HERE"
|
||||||
|
@ -18,7 +18,7 @@ development:
|
||||||
letsencrypt_key: ./tests/files/letsencrypt.key
|
letsencrypt_key: ./tests/files/letsencrypt.key
|
||||||
letsencrypt_endpoint: https://acme-staging.api.letsencrypt.org/
|
letsencrypt_endpoint: https://acme-staging.api.letsencrypt.org/
|
||||||
test:
|
test:
|
||||||
database: 'postgres://neocities@localhost/neocities_test'
|
database: 'postgres://localhost/neocities_test'
|
||||||
database_pool: 1
|
database_pool: 1
|
||||||
session_secret: "SECRET GOES HERE"
|
session_secret: "SECRET GOES HERE"
|
||||||
recaptcha_public_key: "ENTER PUBLIC KEY HERE"
|
recaptcha_public_key: "ENTER PUBLIC KEY HERE"
|
||||||
|
|
|
@ -78,7 +78,6 @@ class Site < Sequel::Model
|
||||||
EMPTY_FILE_HASH = Digest::SHA1.hexdigest ''
|
EMPTY_FILE_HASH = Digest::SHA1.hexdigest ''
|
||||||
|
|
||||||
PHISHING_FORM_REGEX = /www.formbuddy.com\/cgi-bin\/form.pl/i
|
PHISHING_FORM_REGEX = /www.formbuddy.com\/cgi-bin\/form.pl/i
|
||||||
SPAM_MATCH_REGEX = ENV['RACK_ENV'] == 'test' ? /pillz/ : /#{$config['spam_smart_filter'].join('|')}/i
|
|
||||||
EMAIL_SANITY_REGEX = /.+@.+\..+/i
|
EMAIL_SANITY_REGEX = /.+@.+\..+/i
|
||||||
EDITABLE_FILE_EXT = /#{VALID_EDITABLE_EXTENSIONS.join('|')}/i
|
EDITABLE_FILE_EXT = /#{VALID_EDITABLE_EXTENSIONS.join('|')}/i
|
||||||
BANNED_TIME = 2592000 # 30 days in seconds
|
BANNED_TIME = 2592000 # 30 days in seconds
|
||||||
|
|
|
@ -11,3 +11,9 @@ ufw allow 9292
|
||||||
sudo su postgres -c "createuser -d vagrant"
|
sudo su postgres -c "createuser -d vagrant"
|
||||||
sudo su vagrant -c "createdb neocities"
|
sudo su vagrant -c "createdb neocities"
|
||||||
sudo su vagrant -c "createdb neocities_test"
|
sudo su vagrant -c "createdb neocities_test"
|
||||||
|
|
||||||
|
sudo sh -c 'echo "local all postgres trust" > /etc/postgresql/9.3/main/pg_hba.conf'
|
||||||
|
sudo sh -c 'echo "local all all trust" >> /etc/postgresql/9.3/main/pg_hba.conf'
|
||||||
|
sudo sh -c 'echo "host all all 127.0.0.1/32 trust" >> /etc/postgresql/9.3/main/pg_hba.conf'
|
||||||
|
sudo sh -c 'echo "host all all ::1/128 trust" >> /etc/postgresql/9.3/main/pg_hba.conf'
|
||||||
|
sudo service postgresql restart
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
apt-get -y install python-software-properties
|
apt-get -y install python-software-properties
|
||||||
apt-add-repository -y ppa:brightbox/ruby-ng
|
apt-add-repository -y ppa:brightbox/ruby-ng
|
||||||
apt-get -y update
|
apt-get -y update
|
||||||
apt-get -y install ruby2.2 ruby2.2-dev
|
apt-get -y install ruby2.3 ruby2.3-dev
|
||||||
gem install bundler --no-rdoc --no-ri
|
gem install bundler --no-rdoc --no-ri
|
Loading…
Add table
Reference in a new issue