Skip to content
/ fdsns Public

A fast deploying and simple navigation site. 快速搭建公司/组织内网导航站点。

License

Notifications You must be signed in to change notification settings

zerbobo/fdsns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

A fast deploying and simple navigation site.

It's useful when there are various websites to manage and navigate inside of an organization. This gives you a chance to navigate to all.

All you need to do is just writing a toml config file.

"快速搭建公司/组织内网导航站点"

Based on Flask.

Build, Deploy & Run

Build

Run tools/build.sh to build a development mode setup of normal python project.

Then in project root directory:

source build/py_env/bin/activate
python -m fdsns.server.web_site

To run a default site, default port is 5699. Visit http://localhost:5699

Deploy

Run tools/pack_deb.sh to pack all necessary files into a deb file. And then you can dpkg -i xxx.deb in target machine to install it.

Then run the deployed fdsns:

sudo systemctl enable fdsns.service
sudo systemctl start fdsns.service

Configuration

The default configuration file is located at /opt/fdsns/fdsns.toml , and default content is:

title = "Demo"
port = 5699

[[table]]
    name = "Demo table1"
    [[table.list]]
        name = "Google"
        url = "http://www.google.com"
    [[table.list]]
        name = "Baidu"
        url = "http://www.baidu.com"

[[table]]
    name = "Demo table2"
    [[table.list]]
        name = "GitHub"
        url = "http://www.github.com"
    [[table.list]]
        name = "TestSameServerDifferentPort"
        url = "$localhost:12345"        

The key words are title, port, table, list, name and url.

It is of toml format, and format error will result in the site running with a default config.

Note $localhost is a special representation which is used for navigating to another server with a same server ip address and a different port.