Coder Social home page Coder Social logo

bagasstrongman / flame Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pawelmalak/flame

0.0 1.0 0.0 3.5 MB

Flame is self-hosted startpage for your server. Easily manage your apps and bookmarks with built-in editors.

License: MIT License

Shell 0.20% JavaScript 22.01% Python 1.52% TypeScript 70.37% CSS 5.13% HTML 0.59% Dockerfile 0.17%

flame's Introduction

Flame

Homescreen screenshot

Description

Flame is self-hosted startpage for your server. Its design is inspired (heavily) by SUI. Flame is very easy to setup and use. With built-in editors, it allows you to setup your very own application hub in no time - no file editing necessary.

Functionality

  • ๐Ÿ“ Create, update, delete your applications and bookmarks directly from the app using built-in GUI editors
  • ๐Ÿ“Œ Pin your favourite items to the homescreen for quick and easy access
  • ๐Ÿ” Integrated search bar with local filtering, 11 web search providers and ability to add your own
  • ๐Ÿ”‘ Authentication system to protect your settings, apps and bookmarks
  • ๐Ÿ”จ Dozens of options to customize Flame interface to your needs, including support for custom CSS, 15 built-in color themes and custom theme builder
  • โ˜€๏ธ Weather widget with current temperature, cloud coverage and animated weather status
  • ๐Ÿณ Docker integration to automatically pick and add apps based on their labels

Installation

With Docker (recommended)

Docker Hub link

docker pull pawelmalak/flame

# for ARM architecture (e.g. RaspberryPi)
docker pull pawelmalak/flame:multiarch

# installing specific version
docker pull pawelmalak/flame:2.0.0

Deployment

# run container
docker run -p 5005:5005 -v /path/to/data:/app/data -e PASSWORD=flame_password pawelmalak/flame

Building images

# build image for amd64 only
docker build -t flame -f .docker/Dockerfile .

# build multiarch image for amd64, armv7 and arm64
# building failed multiple times with 2GB memory usage limit so you might want to increase it
docker buildx build \
  --platform linux/arm/v7,linux/arm64,linux/amd64 \
  -f .docker/Dockerfile.multiarch \
  -t flame:multiarch .

Docker-Compose

version: '3.6'

services:
  flame:
    image: pawelmalak/flame
    container_name: flame
    volumes:
      - /path/to/host/data:/app/data
      - /var/run/docker.sock:/var/run/docker.sock # optional but required for Docker integration
    ports:
      - 5005:5005
    secrets:
      - password # optional but required for (1)
    environment:
      - PASSWORD=flame_password
      - PASSWORD_FILE=/run/secrets/password # optional but required for (1)
    restart: unless-stopped

# optional but required for Docker secrets (1)
secrets:
  password:
    file: /path/to/secrets/password
Docker Secrets

All environment variables can be overwritten by appending _FILE to the variable value. For example, you can use PASSWORD_FILE to pass through a docker secret instead of PASSWORD. If both PASSWORD and PASSWORD_FILE are set, the docker secret will take precedent.

# ./secrets/flame_password
my_custom_secret_password_123

# ./docker-compose.yml
secrets:
  password:
    file: ./secrets/flame_password

Skaffold

# use skaffold
skaffold dev

Without Docker

Follow instructions from wiki: Installation without Docker

Development

Technology

  • Backend
    • Node.js + Express
    • Sequelize ORM + SQLite
  • Frontend
    • React
    • Redux
    • TypeScript
  • Deployment
    • Docker
    • Kubernetes

Creating dev environment

# clone repository
git clone https://github.com/pawelmalak/flame
cd flame

# run only once
npm run dev-init

# start backend and frontend development servers
npm run dev

Screenshots

Apps screenshot

Bookmarks screenshot

Settings screenshot

Themes screenshot

Usage

Authentication

Visit project wiki to read more about authentication

Search bar

Searching

The default search setting is to search through all your apps and bookmarks. If you want to search using specific search engine, you need to type your search query with selected prefix. For example, to search for "what is docker" using google search you would type: /g what is docker.

For list of supported search engines, shortcuts and more about searching functionality visit project wiki.

Setting up weather module

  1. Obtain API Key from Weather API.

    Free plan allows for 1M calls per month. Flame is making less then 3K API calls per month.

  2. Get lat/long for your location. You can get them from latlong.net.
  3. Enter and save data. Weather widget will now update and should be visible on Home page.

Docker integration

In order to use the Docker integration, each container must have the following labels:

labels:
  - flame.type=application # "app" works too
  - flame.name=My container
  - flame.url=https://example.com
  - flame.icon=icon-name # optional, default is "docker"
# - flame.icon=custom to make changes in app. ie: custom icon upload

"Use Docker API" option must be enabled for this to work. You can find it in Settings > Docker

You can also set up different apps in the same label adding ; between each one.

labels:
  - flame.type=application
  - flame.name=First App;Second App
  - flame.url=https://example1.com;https://example2.com
  - flame.icon=icon-name1;icon-name2

If you want to use a remote docker host follow this instructions in the host:

  • Open the file /lib/systemd/system/docker.service, search for ExecStart and edit the value
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:${PORT} -H unix:///var/run/docker.sock

The above command will bind the docker engine server to the Unix socket as well as TCP port of your choice. โ€œ0.0.0.0โ€ means docker-engine accepts connections from all IP addresses.

  • Restart the daemon and Docker service
sudo systemctl daemon-reload
sudo service docker restart
  • Test if it is working
curl http://${IP}:${PORT}/version

Kubernetes integration

In order to use the Kubernetes integration, each ingress must have the following annotations:

metadata:
  annotations:
  - flame.pawelmalak/type=application # "app" works too
  - flame.pawelmalak/name=My container
  - flame.pawelmalak/url=https://example.com
  - flame.pawelmalak/icon=icon-name # optional, default is "kubernetes"

"Use Kubernetes Ingress API" option must be enabled for this to work. You can find it in Settings > Docker

Import HTML Bookmarks (Experimental)

  • Requirements
    • python3
    • pip packages: Pillow, beautifulsoup4
  • Backup your db.sqlite before running script!
  • Known Issues:
    • generated icons are sometimes incorrect
pip3 install Pillow, beautifulsoup4

cd flame/.dev
python3 bookmarks_importer.py --bookmarks <path to bookmarks.html> --data <path to flame data folder>

Custom CSS and themes

See project wiki for Custom CSS and Custom theme with CSS.

flame's People

Contributors

pawelmalak avatar pruizlezcano avatar idevjoe avatar pa-sowa avatar soulteary avatar ekremparlak avatar itsbhanusharma avatar grahamhelton avatar luckyf avatar strig avatar petemidge avatar rgriffogoes avatar samuel-martineau avatar dependabot[bot] avatar oregonpillow avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.