Praxis is a reimagination of Rack that more completely abstracts away the computer.
Run racks in the cloud or locally with full functionality.
The API is the same for both.
Configure it all in a single convox.yml file.
Follow these steps to run a rack locally and then run an app in it.
-
Start a local rack.
go get github.com/convox/praxis/cmd/cx cx rack start
-
Add a convox.yml to the root directory of your app.
Template
balancers: <balancer-name>: <exposed-port>/<protocol>: <protocol>://<service-name>:<service-port> services: <service-name>: build: <build-context> environment: - <VAR-NAME>=<value> - <VAR-NAME>=<value> <service-name>: image: <image-name>[:<tag>]
Example
balancers: app: 80/http: http://rails:3000 database: 5432/tcp: tcp://postgres:5432 services: rails: build: . environment: - DATABASE_URL=postgresql://postgres:[email protected]:5432/app - RAILS_ENV postgres: image: convox/postgres
-
Create an app in the rack.
cx apps create <app-name>
-
Start the app.
cx start