lavender/commands.txt

57 lines
2 KiB
Text
Raw Normal View History

2025-12-27 01:47:12 +00:00
{{tag>tech commands}}
===== 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
reload elasticsearch:
sudo docker compose exec -it web bash bin/reload_elastic
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
===== 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@example.com", password: "password", password_confirmation: "password")
DEPLOY
$ git add .
$ git commit -m "message"
$ git push -u origin main
$ kamal deploy