Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1001 Bytes

README.md

File metadata and controls

32 lines (21 loc) · 1001 Bytes

opsworks-web2py

Recipes to deploy web2py apps on OpsWorks (EC2).

Requirements:

  1. The git repository with your app must contain all web2py source code.

  2. Because OpsWorks doesn't have web2py application type the application you want to deploy must contain "web2py" in name

  3. Add these recipes in "Custom Chef Recipes" of your layer:

Stage Recipies
Setup nginx, uwsgi
Deploy deploy::web2py

Setting admin password (optional)

  1. Set environment variable ADMIN_PASSWORD with password in OpsWorks admin interface

  2. Create file before_symlink.rb in the deploy directory of your project with this content:

if new_resource.environment["ADMIN_PASSWORD"]
    execute "Save web2py admin password" do
        cwd release_path
        command "sudo -u #{new_resource.user} python -c \"from gluon.main import save_password; save_password('#{new_resource.environment["ADMIN_PASSWORD"]}',443)\""
    end
end