mirror of
https://github.com/neocities/neocities.git
synced 2025-07-22 18:46:07 +02:00
Vagrantfile and provision scripts for development
This commit is contained in:
parent
46883b2bdd
commit
9038141e28
16 changed files with 128 additions and 50 deletions
23
vagrant/common.sh
Normal file
23
vagrant/common.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Quiets the TTY error message
|
||||
#sed -i 's/^mesg n$/tty -s \&\& mesg n/g' /root/.profile
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get -y update
|
||||
apt-get -y upgrade
|
||||
apt-get install -y openntpd htop autossh sshfs vim
|
||||
|
||||
echo 'UTC' | tee /etc/timezone
|
||||
dpkg-reconfigure -f noninteractive tzdata
|
||||
|
||||
update-alternatives --set editor /usr/bin/vim.basic
|
||||
|
||||
ufw allow ssh
|
||||
ufw --force enable
|
||||
ufw logging off
|
||||
|
||||
sed -i 's|[#]*PasswordAuthentication yes|PasswordAuthentication no|g' /etc/ssh/sshd_config
|
||||
sed -i 's|UsePAM yes|UsePAM no|g' /etc/ssh/sshd_config
|
||||
#sed -i 's|[#]*PermitRootLogin yes|PermitRootLogin no|g' /etc/ssh/sshd_config
|
||||
|
||||
service ssh restart
|
5
vagrant/database.sh
Normal file
5
vagrant/database.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get -y install postgresql postgresql-contrib libpq-dev
|
13
vagrant/development.sh
Normal file
13
vagrant/development.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive
|
||||
. /vagrant/vagrant/common.sh
|
||||
. /vagrant/vagrant/database.sh
|
||||
. /vagrant/vagrant/ruby.sh
|
||||
. /vagrant/vagrant/webapp.sh
|
||||
|
||||
ufw allow 9292
|
||||
|
||||
sudo su postgres -c "createuser -d vagrant"
|
||||
sudo su vagrant -c "createdb neocities"
|
||||
sudo su vagrant -c "createdb neocities_test"
|
7
vagrant/phantomjs.sh
Normal file
7
vagrant/phantomjs.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
|
||||
bzip2 -dc phantomjs-1.9.8-linux-x86_64.tar.bz2 | tar xf -
|
||||
cp phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/local/bin/
|
6
vagrant/redis.sh
Normal file
6
vagrant/redis.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
apt-get install -y redis-server
|
||||
|
||||
#sed -i 's|[#]*appendfsync everysec|appendfsync always|g' /etc/redis/redis.conf
|
||||
sed -i 's|[#]*appendonly no|appendonly yes|g' /etc/redis/redis.conf
|
||||
|
||||
service redis-server restart
|
7
vagrant/ruby.sh
Normal file
7
vagrant/ruby.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
apt-get -y install python-software-properties
|
||||
apt-add-repository -y ppa:brightbox/ruby-ng
|
||||
apt-get -y update
|
||||
apt-get -y install ruby2.2 ruby2.2-dev
|
||||
gem install bundler --no-rdoc --no-ri
|
19
vagrant/webapp.sh
Normal file
19
vagrant/webapp.sh
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
. /vagrant/vagrant/phantomjs.sh
|
||||
. /vagrant/vagrant/redis.sh
|
||||
|
||||
apt-get install -y git curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev libpq-dev libmagickwand-dev imagemagick libmagickwand-dev libmagic-dev file clamav-daemon
|
||||
|
||||
sed -i 's|[#]*DetectPUA false|DetectPUA true|g' /etc/clamav/clamd.conf
|
||||
|
||||
freshclam
|
||||
service clamav-freshclam start
|
||||
service clamav-daemon start
|
||||
|
||||
usermod -G vagrant clamav
|
||||
|
||||
cd /vagrant
|
||||
bundle install
|
Loading…
Add table
Add a link
Reference in a new issue