Application of intranet penetration - open source table tool APITable local deployment combined with intranet penetration to achieve public network access

Preface

As a new generation of data productivity platform, vika is an API-oriented intelligent multi-dimensional table. It combines complex visual databases, spreadsheets, real-time online collaboration, and low-code development technology into one. Even ordinary employees who do not understand a line of code can easily gain IT capabilities, thus greatly reducing the cost of digitalization for enterprises. If you are looking for a fast and customizable business system, a safe and reliable visual database, and an efficient and collaborative office tool, then vika can satisfy your rich imagination.

Combined with cpolar intranet penetration , you can have your own multi-dimensional table platform with one click, and provide real-time remote access to the public network. You can privatize deployment, code modification, independently control data, and flexibly customize what you need.

The ultimate open-source alternative to Airtable, surpassing all others -  APITable

1. Deploy APITable

Installation Environment:

  • Install docker and docker-compose v2

  • Recommended 4-core CPU/8GB RAM or more

  • A bash shell to install basic utilities such as curl

  • Native arm64 (mac chip) container images are not yet ready and may cause poor performance.

To install apitable using docker compose, open a terminal and run the following command:

curl https://apitable.github.io/install.sh | bash

c075197a3bfa9fc8e5de11948ec48f8

Depending on your environment, you may need to wait a few minutes for all services to start.

image-20231101132129379

Then open http://localhost:80 in your browser to access it.

An all-in-one pm2 based image is also provided for demonstration or testing purposes (not recommended for enterprise or production use):

sudo docker run -d -v ${PWD}/.data:/apitable -p 80:80 --name apitable apitable/all-in-one:lates

After the installation is completed, enter it in the browser localhost:80and open the web page. It will show that you have successfully entered the APITable login interface. Enter your account and password to log in.

image-20231101132620325

2. Installation and registration of cpolar

After completing the deployment of APITable, you can install cpolar . To install cpolar on an ubuntu system, you can install it using a simple one-click installation script. As long as you enter the following command on the command line interface of Ubuntu, you can automatically execute the installation program (it should be noted that some Ubuntu versions may not have the curl tool installed, so it is best to execute the command "sudo aptinstall curl" to install the curl tool first).

curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash

image-20231101135326088

After the Cpolar installation is completed, you can enter the command "systemctl start cpolar" to start cpolar.

systemctl start cpolar

1dea9c95be75fa5bbf9401eabc1b741

Of course, we can also enter "cpolar version" instead of using the systemctl level command.

cpolar version

Query the version number of local cpolar. As long as the version information can be displayed, the cpolar installation is complete.

cced0680cde4be99c23458b0b445d75

In order to ensure that cpolar can run on the Ubuntu system for a long time and ensure the stable existence of the data tunnel, it is best to add cpolar to the Ubuntu boot auto-start list. As long as you enter the command "sudo systemctl status cpolar" in the Ubuntu command line interface, you can add cpolar to the self-starting list.

sudo systemctl status cpolar

91dfd2231f70c9f12e373ce21b2682a

In order to ensure the data security of each user and create a separate data tunnel for each customer, cpolar uses user password and token code for user verification, so we need to register the user before using cpolar. The registration process is very simple. Just click "User Registration" in the upper right corner of the cpolar homepage and fill in the necessary information on the registration page to complete the registration.

After completing the cpolar user registration, we can use each user's unique token code to activate the cpolar client. As long as you log in to the cpolar official website, you can find the user's unique token code on the "Verification" page (or the "Connect Your Account" window).

Copy and paste this token code into the Ubuntu command line interface, and the cpolar client will write the token code into the local cpolar.yml file (token code activation only needs to be done once) as a way to identify the user data tunnel. information. The specific command format is "cpolar authtoken user's unique token code".

cpolar authtoken tokeb码

image-20231101140759655

After cpolar is successfully installed, access port 9200 on an external browser, enter localhost:9200 in the browser address bar , and log in with your cpolar account. After logging in, you will see the cpolar web configuration interface, and you can configure it on the web management interface.

image-20231101141520453

3. Configure APITable public network access address

Click Tunnel Management - Create Tunnel on the left dashboard to create a public network address tunnel for APITable!

  • Tunnel name: You can customize the name. Be careful not to duplicate the existing tunnel name.
  • Protocol: Select http
  • Local address: 80
  • Domain name type: Choose a random domain name for free
  • Region: Select China Top

Click创建

image-20231101142057150

After the tunnel is successfully created, click Status on the left - Online Tunnel List to view the generated public network access address. There are two access methods, one is http and https

image-20231101142348479

Use the cpolar https public network address above and access it from the browser of any device. You can successfully see the APITable login interface. In this way, a public network address that can be accessed remotely is created. Using the public network domain name of cpolar, no need If you purchase a cloud server yourself, you can publish it to the public network for remote access! (Access from a new address may require you to log in again)

image-20231101142550350

4. Fixed APITable public network address

Since the tunnel created using cpolar above uses a random public network address, it will change randomly within 24 hours, which is not conducive to long-term remote access. Therefore, we can configure a second-level subdomain name for it. This address is a fixed address and will not change randomly [ps: cpolar.cn has been filed]

Note that you need to upgrade the cpolar package to a basic package or above, and the bandwidth corresponding to each package is different. [cpolar.cn has been registered]

Log in to the cpolar official website , click Reserve on the left, select to reserve the second-level subdomain name, set a second-level subdomain name, click Reserve, and copy the reserved second-level subdomain name after the reservation is successful.

image-20231101143257945

After the reservation is successful, copy the name of the second-level subdomain name that was successfully reserved.

image-20231101143317186

Return to the cpolar web UI management interface, click Tunnel Management - Tunnel List on the left dashboard, find the tunnel you want to configure, and click Edit on the right

image-20231101143021765

Modify the tunnel information and configure the successfully reserved second-level subdomain name into the tunnel.

  • Domain name type: Select a second-level subdomain name
  • Sub Domain: Fill in the successfully reserved second-level subdomain name

Click 更新(note, click once to update, no need to submit again)

image-20231101143416746

After the update is completed, open the online tunnel list. At this time, you can see that the public network address has changed and the address name has become a domain name with a fixed second-level subdomain name.

image-20231101143607814

Finally, we use a fixed public network address to access, and we can see that the access is successful. In this way, a fixed and permanent public network address is set, and APITable open source multi-dimensional tables and database analysis can be remotely accessed from the public network anytime and anywhere!

image-20231101144418868

Guess you like

Origin blog.csdn.net/weixin_42878111/article/details/135269711