====== 2022-02-03 ====== * Did some minimal research on containerizing a rails app * Research / Experiment on ram usage for rails app. Thrifty shopper ~120mb ram. Just node command ~40mb * Logged in to VPS using duckdns.org url and got caught up in an ECDSA host key issue. Turned out to be just removing the single line key did allow me to both log in using keys through IP as well as URL * What is my goal here with dockerizing my rails app? * Work well with SWAG container for security's sake * Learn more about docker, docker-compose, and it's benefits * Learn how to automate the 'deploy' step of this * Looks like using the base ruby:3.1-alpine docker container should be helpful to get started. I'm trying to figure out what the best way to keep it modular is. So I can just start it with an ENV variable for port and since it won't ever be exposed to the outside world I should be able to just set it up in the docker-compose file * Successfully got the database to come up as well as the basic Dockerfile I made. However the database wasn't seeded, which would be convenient. I suppose you wouldn't want that for your production server * So the current limitations of this are: * Dockerfile must be contained in Rails folder, but so far docker-compose has been in the same folder * No way to change port of rails server so we can have several running at once * Maybe have to build new docker image for each project? ===== Heap: ===== * [[https://serverfault.com/questions/538045/offending-key-warning-when-connecting-by-ssh-to-my-vps|Server Fault: ECDSA Host Key question]] * [[https://semaphoreci.com/community/tutorials/dockerizing-a-ruby-on-rails-application|Dockerizing a ruby on rails application]] * [[https://www.youtube.com/watch?v=J7hUHnQtFNo|Docker Basics Rails Video]]