Free Web App Hosting Services (PaaS) For Java, Python, PHP And More


Free public cloud app hosting with Google App Engine, Heroku and Red Hat OpenShift Online
How to deploy and host a dynamic web application (Node.js, Java, Ruby, C#/.Net, Python, Go, PHP, Kotlin, Scala, Clojure) on the cloud for free with a PaaS (Platform as a Service) provider such as Google App Engine, Heroku and Red Hat OpenShift Online.

Google App Engine: extra cloud features

If you want to deploy highly scalable applications on a fully managed serverless platform, but don't need continuous integration and delivery tools and third party add-ons, Google App Engine is the right choice.

Out of the box supported languages include: Java, PHP, Node.js, Python, C#, .Net, Ruby and Go.

In addition to hosting your application, you get the following features for free:

  • 5 GB Cloud Storage
  • 1 GB NoSQL storage with Google Cloud Firestore
  • 10 GB of messages per month with Google Cloud Pub/Sub
  • 2 million Google Cloud Functions invocations per month
  • 50 GB of logs with 30 day retention with Google Stackdriver

Quotas and limitations

  • Up to 256 MB of memory for Java 11, Node 8+, Python 3.7+, PHP 7.2+, Ruby 2.5+ and Go 1.11+ (128 MB for other supported technologies: source)
  • 28 free hours per day: shared by all your apps, enough for 1 app (see Tips for more info)
  • 1 GB app size (Code & Static Data Storage)
  • Network Bandwidth: 1 GB / day
  • Request maximum rate: 56 MB / minute

Getting started

You don't need to activate the trial to create an app engine project:

  • Navigate to the App Engine dashboard and login to your google account if necessary.
  • Create your project, then the application
  • Select a region (Available regions & zones)
  • Select your programming language and keep the standard environment selected (the other option is not free)
  • Follow the quickstart guide relative to your programming language to prepare your web app and necessary config files
  • You can deploy using a plugin for your project's build tool when available. You can also deploy your app by executing gcloud app deploy from the Google Cloud SDK Shell within your app's root directory (may require to add a billing method)
  • After deploying the app, you can view the quota limits from the Quotas page

Tips

  • When you deploy your app to Google App Engine, it's automatically associated to one of the following instance types:

    • Frontend Instance: 28 free F1 instance-hours per day
    • Backend Instance: 9 free B1 instance-hours per day

    By default, your app is assumed to be a Frontend Instance with automatic scaling. But if you change the app.yaml in your root directory, and introduce a configuration to enable the Basic or Manual scaling, your app will become assumed to be a Backend Instance. To ensure that your app usage will always be free, you can define the following properties in your app.yaml file

    ...
    instance_class: F1
    automatic_scaling:
      max_instances: 1
    ...
  • Add the --quiet flag to your gcloud command to disable all interactive prompts

  • When deploying using a gcloud command, specify explicitly your app's version to avoid having multiple instances being billed thus reducing your daily free hours allowance. A glcoud deploy command example would be: gcloud --quiet app deploy --version=production

References


Google App Engine - Dashboard
App Engine Dashboard
Google App Engine - Versions Page
Versions Page
Google App Engine - Quotas page
Quotas page
Google App Engine - Create project
Get started by creating your project
Google App Engine - Create application
Create your app
Google App Engine - Select region
Select a region
Google App Engine - Programming language selection
Select your programming language
Google App Engine - Resources and Google Cloud SDK
Skip this resources page
Google App Engine - Quickstart guide page
Follow the tutorial for your language
Google App Engine - Deployment example
Deployment example

Heroku: seamless CI/CD and add-ons

If you need a fully-managed platform that gives you the simplest path to delivering apps quickly, seamless continuous integration and delivery tools, third party add-ons and a developer friendly dashboard, Heroku is the answer.

The officially supported languages are Java, Node.js, Python, PHP, Ruby, Go, Scala and Clojure, but more languages are available via Buildpacks (a set of scripts responsible for transforming your code into a compiled output ready to be executed).

In addition to hosting your application for free, Heroku provides you with:

  • Cloud storage with Heroku Postgres (10k Rows), Heroku Redis (RAM: 25 MB, 20 Concurrent Connections). More data stores can be added via add-ons
  • Add-ons for Monitoring, Logging, Caching, Email/SMS, etc.
  • Continuous integration and delivery (CI/CD) with Heroku CI and Heroku Flow

Quotas and limitations

  • Up to 512 MB RAM
  • 1000 free hours (550 if your account is not verified) per month: shared by all your apps, enough for 1 app
  • 500 MB app size (Slug Size)
  • Network Bandwidth: 2 TB / month
  • Request Length: 30 seconds
  • The app sleeps after 30 minutes of inactivity

Getting started

  • Navigate to the Heroku homepage and click Sign up for free
  • Fill sign up form and press Create free account
  • Click confirmation link to your email, then set your password and click Set password and log in
  • Create a new app
  • Enter your app's name and choose region
  • You can now deploy your app by choosing one of the 3 options:
    • Heroku Git: Requires the Heroku CLI to be installed. You can directly push your local branch to the Heroku remote to trigger a deployment
    • GitHub: You will connect your Github repository to Heroku and select a branch to deploy automatically whenever it is pushed to
    • Container Registry: Requires Docker to be set up locally and the Heroku CLI to be installed.
  • You can follow your deployment logs and roll back to a previous version of your app from the Activity page
  • You can view your app's logs from the Application Logs page
  • The Settings page allow you to change your app's name, configure environment variables, view your slug size, add buildpacks and add custom domains.

References


Heroku Buildpacks: Java, Node.js, Python, PHP, Ruby, Go, Scala and Clojure
Heroku Buildpacks
Heroku Add-ons: Monitoring, Logging, Caching, Email/SMS
Add-on examples available in Heroku
Heroku Pipelines
Heroku Pipelines for continuously delivery
Heroku - Create new app
Get started by creating a new app
Heroku - Enter app name and choose region
Enter the app name and choose a region
Heroku - Deployment methods
Available deployment methods
Heroku - Activity page
Activity page: logs and app versionning
Heroku - Application Logs
Application logs

Red Hat OpenShift Online: Generous resources with Docker & Kubernetes support

OpenShift Online is Red Hat's public cloud application deployment and hosting platform that is based on a containerized infrastructure. It offers a free starter plan to deploy apps for learning, experimenting and development purposes or if you need a testing environment.

You can build and deploy your app using a git repository or you can directly deploy an application from an existing Docker image or Image Stream. Source code builders are available for Java, Node.js, Python, Ruby, .NET Core, PHP, Perl, Scala and Go. It also supports Nginx, Apache HTTP Server (httpd), WildFly.

Quotas and limitations

  • Up to 2 GB RAM
  • 1 project
  • 2 GB persistent storage
  • The project resources sleeps after 30 minutes of inactivity, and must sleep 18 hours in a 72 hour period
  • The project is destroyed automatically after 60 days, but you can redeploy it after this period

Getting started

  1. Sign up a new Red Hat OpenShift account from this page
  2. Fill out your information, then confirm your phone number
  3. After validating the pin code sent to your phone, confirm your subscription
    OpenShift Online - 1- Confirmation
    OpenShift Online - 2- Queued for Provisioning
  4. Wait for your your account provisioning. Once ready, you can open the Web Console
    OpenShift Online - 3- Ready
    OpenShift Online - 4- Web Console
  5. Create your project
    OpenShift Online - 5- Create project
    OpenShift Online - 6- Project initial status

To deploy your app:

  1. Choose your technology stack from the catalog
    OpenShift Online - 7- Browse Catalog
  2. Enter your git repository link, or click Try Sample to auto fill with a suggested starter project
    OpenShift Online - 8- Nodejs example
  3. Wait for the build to complete
    OpenShift Online - 9- Build running
  4. Access your app using the link provided in Routes
    OpenShift Online - 10- App running

You can also deploy using a yaml file. Two formats are available:

References