2.4 KiB
Deploy First App to Capsul
Currently, the official catalogue of Coop-Cloud apps is at App catalogue. There's an experimental version of the catalogue in the works; you can see the link to it in the image.
We'll be deploying Custom HTML by following the instructions in "Basic usage" below.
-
Let's create a minimal HTML5 web page. Launch your WSL Linux system. Create a file called index.html. The example below uses the nano text editor.
-
Assuming you have previously copied basic HTML5 code into the clipboard, you can right-click the top of the Linux command window, slide down to Edit, slide over to Paste and click on it. This is what nano looks like after pasting a minimal HTML5 document into it. Use Ctrl-O to save the file, and Ctrl-X to exit the nano editor.
-
Create the custom html app on your Capsul using Abra. The app is associated with the server named coolstuff.ninja. It will be listening at the domain name coolstuff.ninja, that is, after it is deployed, when you type https://coolstuff.ninja, you will see the minimal html5 page we've just saved in index.html. The --app-name option tells Abra to name the app custom-html-ninj.
abra app new custom-html --server coolstuff.ninja --domain coolstuff.ninja --app-name custom-html-ninj
-
After abra finishes adding the new app, you can check out its configuration:
abra app custom-html-ninj config
This opens custom-html-ninj's configuration in a text editor, and you could update any values which need to be updated. In this case, everything looks good, so we don't make any changes.
-
It's time to deploy the app. It's a very basic app, and so the command line to deploy it is very simple. Type 'y' to confirm the deployment. After a few moments, you should see SUCCESS: Yay! App should be available at domain-name. You need to copy the index.html file into the custom-html-ninj app.
abra app custom-html-ninj cp index.html app:/usr/share/nginx/html
-
Finally, open your website using your browser. https://your-domain-name
You should see "This is the Title" in the page's title, and "This is the page content." on the page.