Hyperlocal art and events
On Ubuntu
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0
echo ". $HOME/.asdf/asdf.sh" >> ~/.bashrc
source ~/.bashrc
sudo apt-get install libpq-dev
asdf plugin add nodejs
asdf plugin add ruby
asdf plugin add yarn
asdf install
rails db:create db:migrate
bin/dev
Ubuntu 24.04 install dependencies as root
sudo apt-get install locate postgresql nginx build-essential checkinstall libvips zlib1g-dev libssl-dev libffi-dev libtool libyaml-dev libcurl4-openssl-dev libpq-dev dirmngr gnupg npm dirmngr gnupg apt-transport-https ca-certificates curl gnupg apt-transport-https redis-server
- Follow https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install/oss/noble.html
- Follow https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-22-04
sudo apt-get remove nodejs libnode-dev
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
npm install --global yarn
curl -sSL https://get.rvm.io | bash -s stable --ruby
echo 'source /usr/local/rvm/scripts/rvm' >> ~/.bashrc
exec bash
rvm install "ruby-3.3.4"
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --nginx
sudo -u postgres -s
psql
CREATE DATABASE wilhall_production
CREATE USER wilhall PASSWORD '...';
GRANT ALL PRIVILEGES ON DATABASE wilhall_production TO wilhall;
exit
exit
cp sidekiq.service /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable sidekiq
sudo systemctl start sidekiq
server {
listen 80;
server_name wilhall.com;
passenger_enabled on;
passenger_app_env production;
passenger_app_root /var/www/wilhall.com;
root /var/www/wilhall.com/public;
}
For debugging:
sudo less /var/log/nginx/error.log
git pull
bin/deploy