Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ninech/deploio-examples
https://github.com/ninech/deploio-examples
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ninech/deploio-examples
- Owner: ninech
- License: apache-2.0
- Created: 2023-06-20T08:03:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-23T15:15:28.000Z (5 months ago)
- Last Synced: 2024-07-24T07:43:14.115Z (5 months ago)
- Language: Ruby
- Size: 404 KB
- Stars: 3
- Watchers: 8
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```