# OTWARCHIVE basic maintenance of Sunset and Symphony so I have them all in one easily copy-pastable space. recreate site for updates to show up `sudo docker compose up -d web --force-recreate --remove-orphans` chown elastic-data to docker before reloading ES so it works `sudo chown 1000:1000 /home/otwarchive/elastic-data` reload elasticsearch: `sudo docker compose exec -it web bash bin/reload_elastic` rsync files `sudo rsync -avz /home/foldername [email protected]:/home` mysql client login command: `mysql -P 3306 --protocol tcp -u root -p` insert tags: `insert into tags (name, canonical, created_at, updated_at, type, sortable_name) values('Anime & Manga', 1, NOW(), NOW(), 'Media', 'Anime and Manga');` add roles (for initial deployments if i ever decide to make a third site (unlikely)): `insert into roles (id, name, authorizable_type, authorizable_id, created_at, updated_at) values("int(16) auto_increment", "tag_wrangler", null, null, NOW(), NOW());` `insert into roles (id, name, authorizable_type, authorizable_id, created_at, updated_at) values("int(16) auto_increment", "translator", null, null, NOW(), NOW());` `insert into roles (id, name, authorizable_type, authorizable_id, created_at, updated_at) values("int(16) auto_increment", "translator_admin", null, null, NOW(), NOW());` `insert into roles (id, name, authorizable_type, authorizable_id, created_at, updated_at) values("int(16) auto_increment", "archivist", null, null, NOW(), NOW());` `insert into roles (id, name, authorizable_type, authorizable_id, created_at, updated_at) values("int(16) auto_increment", "opendoors", null, null, NOW(), NOW());` rails console docker compose run web bundle exec rails c add invite reason form to database `alter table invite_requests add note text null;` backup to restic `restic -r s3:https://s3.us-east-005.backblazeb2.com/redacted420 backup /home/otwarchive --exclude log --exclude .git` # DEVELOPMENT WITH RAILS 8 This is a page that outlines all the commands I need for basic maintenance of and updates to my applications built on Ruby on Rails so I have them all in one easily copy-pastable space. CREATE USER `$ RAILS_ENV=production rails console` `User.create!(email_address: "[email protected]", password: "password", password_confirmation: "password")` DEPLOY `$ git add .` `$ git commit -m "message"` `$ git push -u origin main` `$ kamal deploy` # GALLERY `$ sudo docker run --rm -d -p 8696:8000 -v /home/pj/imageboard:/app/data -t shimmie2` # NEOCITIES `sudo docker compose exec worker bundle exec ruby -e '` `require "./environment"` `require "sidekiq/api"` `q = Sidekiq::Queue.new("emails")` `puts "emails queue: #{q.size}"` `q.each do |job|` `puts "class: #{job.klass}"` `puts "jid: #{job.jid}"` `puts "args: #{job.args.inspect}"` `end` `'` sql to give supporter `psql -U neocities` `UPDATE sites SET plan_type = 'supporter';`