Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Shortcuts for commonly-used frameworks #3

Open
adambrenecki opened this Issue Aug 27, 2013 · 0 comments

Comments

Projects
None yet
1 participant
Owner

adambrenecki commented Aug 27, 2013

While the ability to run arbitrary shell scripts is the entire point of Poxy, most users are probably only going to want to run one or two kinds of apps, with a few exceptions. To avoid those users having to write many mostly-identical shell scripts, Poxy should provide a way to run common kinds of webapps. This could be done by:

  • Providing a script that generates shell scripts from a set of templates. (ugh!)
  • Providing a script that can be used in the shebang line of an executable YAML file, which execs the right server process with the right arguments and envvars.
#!/usr/bin/env poxy execapp
type: django
path: ~/projects/myapp
settings: myapp.settings
python: ~/.virtualenvs/myapp/bin/python

CLI

  • poxy newapp django mysite.dev - creates Poxyfile, links to ~/.poxy/mysite.dev

API

The execapp framework should be pluggable, with each plugin having two callables:

  • setup() should create a template app specification with sensible defaults auto-discovered using the CWD, environment variables, etc. It returns either an object (which is converted to YAML) or a string (in the case the plugin wants to specify ordering, comments etc).
  • run(spec, port) is passed an app spec in object form, and runs the app on the provided port.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment