-
Notifications
You must be signed in to change notification settings - Fork 1
Contributing a new tool
This wiki explains how to deploy a new tool on the Materials Cloud dokku platform.
For policies around new tools, see Materials Cloud.
As part of the contribution form, you have sent us a public SSH key, which will allow you to deploy & inspect your app.
Let's call the key pair id_rsa and id_rsa.pub, and your app myapp.
Add the following to your ~/.ssh/config file:
Host matcloud.xyz materialscloud.io
Hostname %h
IdentityFile ~/.ssh/id_rsa
matcloud.xyz is the development platform and materialscloud.io is the production platform.
After this, you should be able to query the version of the dokku platform:
$ ssh -t dokku@matcloud.xyz version
dokku version 0.21.1
In the git repository that contains your application, run:
git remote add dev-dokku dokku@matcloud.xyz:myappgit push dev-dokku
That's it! Read the logs for instructions on how to access your app.
Note: dokku assumes that your container will serve the app on its internal port 5000.
If your app is served on a different port, e.g. 8000, specify the port mapping using:
ssh -t dokku@matcloud.xyz proxy:ports-set myapp http:80:8000 https:443:8000
(set the mapping for both http and https)
- View container logs:
ssh -t dokku@matcloud.xyz logs myapp - Enter container:
ssh -t dokku@matcloud.xyz enter myapp - Check port mapping of your app:
ssh -t dokku@matcloud.xyz proxy:report myapp - Restart the app:
ssh -t dokku@matcloud.xyz ps:restart myapp - Set environment variable:
ssh -t dokku@matcloud.xyz config:set myapp ENV=prod COMPILE_ASSETS=1
Replace dokku@matcloud.xyz with dokku@materialscloud.io to check the production version of the app.