Skip to content

Latest commit

 

History

History

mojolicious

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

mojolicious -> Google App Engine

This is a simple guide to running mojolicious on Google App Engine.

  1. Create a new mojolicious app

  2. Create an app.yaml in the root of your application with the following contents:

    runtime: custom
    vm: true
    api_version: 1
  3. Create a Dockerfile in the root of your application with the following contents:

    FROM perl:latest
    RUN curl -L https://cpanmin.us | perl - -M https://cpan.metacpan.org -n Mojolicious
    ENV MOJO_LISTEN http://*:8080
    ADD . /app
    EXPOSE 8080
    WORKDIR /app
    RUN chmod +x main.pl
    CMD ["./main.pl", "daemon"]
  4. Create a project in the Google Developers Console.

  5. Make sure you have the Google Cloud SDK installed.

    $ curl https://sdk.cloud.google.com | bash 
    $ gcloud init
    $ gcloud components update app
  6. Deploy your app:

    gcloud preview app deploy app.yaml --set-default --project [your-project-id]

You are now running perl on App Engine. How cool is that? Check it out at https://mojolicious-demo.appspot.com/.