Deploy Sinatra project - ruby

I have just started learning ruby. So now I have setup a basic Sinatra project, just wondering where I can deploy it for free without credit card details? As Heroku has no free tier anymore. Also, I would like to know with the seeds.rb I generate random data, would those data be able to used after deploy.
I have tried couple other platforms(render, railway, AWS…), but they either are not free or hard for deploying

Currently Fly.io and Digital Ocean are popular replacement for Heroku.
Yes, you can seed the database used in the deployment.
Then you can either
Run rake db:seed on the deployed application or
Connect to the database from you development machine and run rake db:seed

Related

Migrating From Digital Ocean to Heroku

I have an app that uses Flash, MariaDB, and Python which I currently host on Digital Ocean. I am planning to move to Heroku for scalability purposes, but I am unable to find any resources online talking about the process of migrating data from Digital Ocean to Heroku. Can anyone explain the process? Thanks
Heroku provides Dynos (application runtime) and Add-Ons (databases and other tools).
First create a Dyno (it can also be free) and deploy your Python application (you can push the code from Git or create a Docker image for the Heroku Docker Registry).
Then enable the MariaDB add-on to setup your storage (there is a free plan here too, check if this is suitable in your case).
You need to provide the MariaDB connection string as environment variable, this is explained here
Finally it is a good idea to use Config Vars for all environment variables that your application might need (ie tokens, secrets).

Best practise/way to deploy Laravel + Vue SPA application to AWS

I have 2 repositories residing in Bitbucket - Backend (Laravel app as the API and entry point) and Frontend (Main application front-end - VueJs app). My goal is to set up continuous deployment so whenever something is pushed in either of the repos in master (or other branch selected by me) branch it triggers something so that the whole app builds and reaches the AWS EC2 server.
I have considered/tried the following:
AWS CodePipeline and/or CodeDeploy. This looked like a great option
since the servers are in AWS as well. However, there is no support
for Bitbucket out of the box, so it would have to go to Bitbucket
Pipeline -> AWS Lambda -> AWS S3 -> AWS CodePipeline/CodeDeploy ->
AWS EC2. This seems like a very lengthy journey and I am not sure if
that's a good practice whatsoever.
Using Laravel Forge to deploy the Laravel app, and add additional steps to build the VueJS app. This seemed like a very basic solution,
however, the build process seems to fail there as it just takes long
time and crashes with no errors (whereas I can run exact same process
on my local machine or a different server hosted elsewhere). I am not
sure if this is issue with the way server is provisioned, the way
Forge runs deployment script or the server is too weak to handle it.
The main question of mine would be what are the best pracises for deploying the app of such components? I have read many tutorials/articles about deploying a NodeJS app, or a Laravel app, but haven't gotten good information about a scenario like this.
Would it be better to build the front-end app locally and version control the built JS file? Or should I create a Pipeline in Bitbucket that would build the app and then deploy it? Or is it the best to just version control and deploy the source files and leave the whole build process as the last step in the deployment process that will be done by the server that is hosting the app itself? There are also some articles suggesting hosting the whole front-end app in S3 bucket - would that be bad practise as well?
Appreciate any help and resources that would help!
From the sounds of things it sounds like you have two types of deployments you might want to run.
Laravel API: If you're using Laravel Forge already then this is a great way to go about deploying your Laravel App, takes care of most of the process and easy server management.
Vue.js App: Few things you can do here, I personally prefer using a provider like Vercel or Netlify who let you deploy your static sites/frontends for free-low costs. You can write custom build steps but they have great presets that should work out the box.
If you really want to keep everything on AWS then look into how to host static sites on AWS

Where are my application files after deploy to google compute engine?

I'm following the tutorial to deploy a ruby app to google compute engine. Everything works, however I now want to ssh into the app to run migrations etc. After some searching i was able to find my files under a docker instance here /var/lib/docker/aufs/diff/e2972171505a931749490e13d21e4f8c0bb076245ef4b592aff6667c45b2dd13/app
Is there a simpler way to access my files? perhaps a symlinked folder?
Ruby apps on Google AppEngine run via Docker. Because AppEngine is a PaaS provider, it's discouraged (though possible) to run commands on production machines. If you'd like to run database migrations, please run them locally and point your configuration at your production database.

Deploy go app to docker in vagrant

Now i'm working on RESTfull API on go, using Windows and goclipse.
Testing environemnt consists of few VMs managed by Vagrant. These machines contain nginx, PostgreSQL etc. The app should be deployed into Docker on the separated VM.
There is no problem to deploy app on first time using guide like here: https://blog.golang.org/docker. I've read a lot of information and guides but still totally confused how to automate deploying process and update go app in docker after some changes in code done. On the current stage changes in code done very often, so deploying should be fast.
Could you please advise me with correct way to setup some kind of local CI for such case? What approach will be better?
Thanks a lot.

Heroku with Play Framework AND Rake

I have a Play Framework app happily running on Heroku. I would like to run some rake tasks to backup the DB (OR, run anything for that matter to back up the db through a cron job on Heroku if there are other suggestions for java apps...).
So far i am striking out getting rake and Play Framework running together in the same app. As soon as I have a Gemfile there, Heroku things i am deploying a Ruby app and doesn't compile/deploy my play app. Appreciate any insights!
The Cron addon is no longer recommended on Heroku. The scheduler add on is recommended instead.
The way the documentation says to use the scheduler add on (if you are not building your apps in Rails) is to use Ruby by calling it from a script file in a bin directory. Check out the documentation here - https://devcenter.heroku.com/articles/scheduler

Resources