adnjoo / xtrack

🫠
https://xtrack.ing
0 stars 0 forks source link

spin up droplet #335

Closed adnjoo closed 1 month ago

adnjoo commented 1 month ago

SFO3 1 vCPU 1GB / 25GB Disk ($6/mo)

DO marketplace rails

Software Version License
Ruby 3.2.0 2-clause BSD License
Rails 7.0.4.2 MIT
Puma 6.0.2 Custom
Postgres 12.4 PostgreSQL License
Nginx 1.17.10 Custom
Node.js 12.19.0 Custom
Certbot 0.40.0 Apache 2.0

Notes

Switch user

su - rails
rails@rails:~/apps/xtrack/api$ sudo lsof -i :3000
COMMAND   PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
ruby    12939 rails    7u  IPv4  64072      0t0  TCP *:3000 (LISTEN)
rails@rails:~/apps/xtrack/api$ sudo kill -9 12939
rails@rails:~/apps/xtrack/api$ tmux ls
0: 1 windows (created Thu Oct 17 02:12:05 2024)
rails@rails:~/apps/xtrack/api$ 
tmux attach -t 0

You can detach from the session using Ctrl+B followed by D

adnjoo commented 1 month ago
rails@rails:~/apps/xtrack/api$ rails c
Loading development environment (Rails 7.2.1.1)
3.2.0 :001 > User.all
  User Load (0.3ms)  SELECT "users".* FROM "users" /* loading for pp */ LIMIT $1  [["LIMIT", 11]]
 => [#<User id: 1, email: [FILTERED], created_at: "2024-10-17 02:16:21.099587000 +0000", updated_at: "2024-10-17 02:16:21.099587000 +0000">] 
3.2.0 :002 > 
Started POST "/users/sign_in"
...
Completed 200 OK in 326ms