Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
commands [2025/12/27 01:39] – created agnescommands [2026/06/25 08:06] (current) agnes
Line 1: Line 1:
 +{{tag>tech commands otwarchive}}
 +
 +===== Commands =====
 +
 +.
 +
 ===== OTWarchive ===== ===== OTWarchive =====
  
Line 6: Line 12:
  
   sudo docker compose up -d web --force-recreate --remove-orphans   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: reload elasticsearch:
  
   sudo docker compose exec -it web bash bin/reload_elastic    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 client login command:
Line 37: Line 52:
  
     docker compose run web bundle exec rails c     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
 +  
 +===== Fanart gallery =====
  
 +  $ sudo docker run --rm -d -p 8696:8000 -v /home/pj/imageboard:/app/data -t shimmie2