Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ninech/deploio-examples


https://github.com/ninech/deploio-examples

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# deploio-examples

This repository hosts example apps for different languages and frameworks that
are being supported by Deploio. Please also check out our [language specific
documentation](https://docs.nine.ch/docs/category/languages) for more details.

## Go

```bash
nctl create application go \
--git-url=https://github.com/ninech/deploio-examples \
--git-sub-path=go
```

## Ruby

This requires the `rails` command to be installed for the `SECRET_KEY_BASE`.
If you don't have it, any long random string will do (127+ chars).

```bash
nctl create application rails \
--git-url=https://github.com/ninech/deploio-examples \
--git-sub-path=ruby/rails-basic \
--env=SECRET_KEY_BASE=$(rails secret)
```

## Node.js

```bash
nctl create application nextjs \
--git-url=https://github.com/ninech/deploio-examples \
--git-sub-path=nodejs/nextjs \
--build-env=NODE_ENV="production" \
--env=NODE_ENV="production"
```

## PHP

```bash
nctl create application symfony \
--git-url=https://github.com/ninech/deploio-examples \
--git-sub-path=php/symfony
```

## Python

The example provides a Django application which shows a random message on every
page reload. It uses a temporary local sqlite database. Please note that the
database will be recreated on every deployment or restart of the application
(all data will be lost), so it really just is useful for demonstration purposes.
For persistent data, please use a postgres or mysql external database. The
Django admin interface can be used to add messages. Just visit `https:///admin` to access it and use the user credentials which you pass via the env
variables below to login.
Please also define the `SECRET_KEY` which is used to secure signed data and
should be kept secret.

```bash
nctl create application django-example \
--git-url=https://github.com/ninech/deploio-examples \
--git-sub-path=python/django \
--env=DJANGO_SU_NAME=admin \
[email protected] \
--env=DJANGO_SU_PASSWORD= \
--env=SECRET_KEY=
```

## Static

For static sites we have two examples:

* just a plain `index.html`

```bash
nctl create application static-html \
--git-url=https://github.com/ninech/deploio-examples \
--git-sub-path=static/html
```

* a frontend react app built with `npm`

```bash
nctl create application static-react \
--git-url=https://github.com/ninech/deploio-examples \
--git-sub-path=static/react
```

## Dockerfile

With Dockerfile builds, Deploio can build any app that can be built using a
Dockerfile. To demonstrate this we have the following sample apps:

* a very basic Rust app:

```bash
nctl create application dockerfile-rust \
--git-url=https://github.com/ninech/deploio-examples \
--git-sub-path=dockerfile/rust \
--dockerfile
```