Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature support cloud services #29

Merged
merged 5 commits into from
Jun 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node server.js
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ You will need both [git](https://git-scm.com/downloads) and the latest or LTS ve

After making changes to your configuration file, you will need to run: `yarn build` to rebuild.

#### Deploy to the Cloud

Dashy supports 1-Click deployments on several popular cloud platforms (with more on the way!). To get started, just click a link below:
- [Deploy to Netlify](https://app.netlify.com/start/deploy?repository=https://github.com/lissy93/dashy)
- [Deploy to Heroku](https://heroku.com/deploy?template=https://github.com/Lissy93/dashy)
- [Deploy with PWD](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml)

---

## Configuring 🔧
Expand Down
17 changes: 17 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "Dashy",
"description": "A Dashboard for your Homelab 🚀",
"repository": "https://github.com/lissy93/dashy",
"logo": "https://raw.githubusercontent.com/Lissy93/dashy/master/docs/assets/logo.png",
"keywords": [
"node",
"vue",
"static",
"dashboard",
"self-hosted",
"home-lab",
"lissy93"
],
"image": "heroku/nodejs",
"stack": "heroku-20"
}
Binary file added docs/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 38 additions & 10 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
# Getting Started

- [Deployment](#deployment)
- [1-Click Deploy](#1-click-deploy)
- [Deploy with Docker](#deploy-with-docker)
- [Deploy from Source](#deploy-from-source)
- [Deploy to Cloud Service](#deploy-to-cloud-service)
- [Usage](#usage)
- [Providing Assets](#providing-assets)
- [Basic Commands](#basic-commands)
- [Updating](#updating)
- [Updating Docker Container](#updating-docker-container)
- [Automating Docker Updates](#automating-docker-updates)
- [Updating from Source](#updating-from-source)
- [Automating Docker Updates](#automatic-docker-updates)
- [Updating from Source](#updating-dashy-from-source)

## Deployment

### 1-Click Deploy

If you just want to test Dashy out, then you have several options:
- You can spin up a container with PWD by [clicking here](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml)
- Or on your own system, by running: `docker run -p 8080:80 lissy93/dashy`, then open your browser and visit `http://localhost:8080`
- Or you can check out the live demo, [here](http://dashy-demo-1.as93.net/)

### Deploy with Docker

The quickest way to get started on any system is with Docker, and Dashy is available though [Docker Hub](https://hub.docker.com/r/lissy93/dashy). You will need [Docker](https://docs.docker.com/get-docker/) installed on your system.
Expand Down Expand Up @@ -61,6 +54,41 @@ If you do not want to use Docker, you can run Dashy directly on your host system
4. Build: `yarn build`
5. Run: `yarn start`

### Deploy to Cloud Service

Dashy supports 1-Click deployments on several popular cloud platforms.

#### Netlify
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/lissy93/dashy)

[Netlify](https://www.netlify.com/) offers Git-based serverless cloud hosting for web applications. Their services are free to use for personal use, and they support deployment from both public and private repos, as well as direct file upload.

To deploy Dashy to Netlify, use the following link
```
https://app.netlify.com/start/deploy?repository=https://github.com/lissy93/dashy
```

#### Heroku
[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/Lissy93/dashy)

[Heroku](https://www.heroku.com/) is a fully managed cloud platform as a service. You define app settings in a Procfile and app.json, which specifying how the app should be build and how the server should be started. Heroku is free to use for unlimited, non-commercial, single dyno apps.

To deploy Dashy to Heroku, use the following link
```
https://heroku.com/deploy?template=https://github.com/Lissy93/dashy
```

#### Play-with-Docker
[![Try in PWD](https://raw.githubusercontent.com/play-with-docker/stacks/cff22438/assets/images/button.png)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml)

[Play with Docker](https://labs.play-with-docker.com/) is a community project by Marcos Liljedhal and Jonathan Leibiusky and sponsored by Docker, intended to provide a hands-on learning environment. Their labs let you quickly spin up a Docker container or stack, and test out the image in a temporary, sandboxed environment. There's no need to sign up, and it's completely free.

To run Dashy in PWD, use the following URL:
```
https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml
```


---

## Usage
Expand Down
10 changes: 10 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[build]
command = "yarn build"
publish = "dist"

[template.environment]
STATUSKIT_PAGE_TITLE = "Dashy"
STATUSKIT_COMPANY_LOGO = "https://raw.githubusercontent.com/Lissy93/dashy/master/docs/assets/logo.png"
STATUSKIT_SUPPORT_CONTACT_LINK = "https://dashy.as93.net"
STATUSKIT_RESOURCES_LINK = "https://github.com/Lissy93/dashy/tree/master/docs"

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "panel",
"name": "Dashy",
"version": "0.1.0",
"license": "MIT",
"main": "server",
"scripts": {
"start": "node server",
"dev": "vue-cli-service serve",
Expand Down Expand Up @@ -53,6 +54,9 @@
"gitHooks": {
"pre-commit": "yarn lint"
},
"engines": {
"node": "15.x"
},
"eslintConfig": {
"root": true,
"env": {
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require('./src/utils/ConfigValidator');
const isDocker = !!process.env.IS_DOCKER;

/* Checks env var for port. If undefined, will use Port 80 for Docker, or 4000 for metal */
const port = process.env.PORT || isDocker ? 80 : 4000;
const port = process.env.PORT || (isDocker ? 80 : 4000);

const getLocalIp = () => {
const dnsLookup = util.promisify(dns.lookup);
Expand Down