banner
MisakaAkio

御坂秋生の小站

不努力就只能听到别人的好消息
email
bilibili
x_id
youtube
facebook
github
gitlab

【Building a Wingpanel EP2】Installation of the Frontend

EP2: Pterodactyl Frontend#

Many of the services on my Hong Kong machine are running inside Docker. At first, I didn't think it would work, but after reading the documentation carefully, it turns out it can. However, it made me dizzy...

Since I have already installed 1panel, I just borrowed it to deploy.

For the installation of 1panel, please refer to EP1.

First, create a new site in 1panel, choose the runtime environment, and then choose reverse proxy or static website, as shown below:

weAA.png

Fill in the other information according to your own needs.

Download Files#

Find a suitable directory that you think is easy to remember or short enough, whatever you think is appropriate.

Take me as an example, after SSH connecting to the server, create /opt/pterodactyl and enter it.

mkdir -p /opt/pterodactyl
cd /opt/pterodactyl

After creating the directory, it's time to pull docker-compose.yml, as follows:

curl -Lo docker-compose.yml https://raw.githubusercontent.com/pterodactyl-china/panel/1.0-develop/docker-compose.example.yml
# Apply executable permissions to the yml file
chmod +x docker-compose.yml

Next, go to the website directory in 1panel, edit docker-compose.yml, and configure the relevant information.

The following is a direct copy from the documentation, you can skip it if you don't need it.

::: info {docker-compose.yml Configuration Instructions}

Environment Variables#

When you don't provide your own .env file, there are multiple environment variables that can be configured for the panel. For detailed information about each available option, please refer to the table below.

Note: If your APP_URL starts with https://, you also need to provide LE_EMAIL to generate the certificate.

VariableDescriptionRequired
APP_URLThe URL (including protocol) to access the panelYes
APP_TIMEZONEThe timezone used by the panelYes
LE_EMAILThe email used to generate the letsencrypt certificateYes
DB_HOSTThe MySQL hostYes
DB_PORTThe MySQL portYes
DB_DATABASEThe MySQL database nameYes
DB_USERNAMEThe MySQL usernameYes
DB_PASSWORDThe MySQL password for the specified userYes
CACHE_DRIVERThe cache driver (see Cache Drivers for details)Yes
SESSION_DRIVERYes
QUEUE_DRIVERYes
REDIS_HOSTThe hostname or IP address of the Redis databaseYes
REDIS_PASSWORDThe password used to protect the Redis databaseOptional
REDIS_PORTThe Redis database portOptional
MAIL_DRIVERThe mail driver (see Mail Drivers for details)Yes
MAIL_FROMThe sender's email addressYes
MAIL_HOSTThe mail driver hostOptional
MAIL_PORTThe mail driver portOptional
MAIL_USERNAMEThe mail driver usernameOptional
MAIL_PASSWORDThe mail driver passwordOptional

Cache Drivers#

You can choose different cache drivers according to your preferences. We recommend using redis when using docker because it can be easily started in a container.

DriverDescriptionRequired Variables
redisThe host where redis is runningREDIS_HOST
redisThe port where redis is runningREDIS_PORT
redisThe password for the redis databaseREDIS_PASSWORD

Mail Drivers#

You can choose different mail drivers according to your needs. Each driver requires setting MAIL_FROM.

DriverDescriptionRequired Variables
mailUse the installed PHP mail
mandrillMandrillMAIL_USERNAME
postmarkPostmarkMAIL_USERNAME
mailgunMailgunMAIL_USERNAME, MAIL_HOST
smtpAny SMTP server can be configuredMAIL_USERNAME, MAIL_HOST, MAIL_PASSWORD, MAIL_PORT
:::

After setting up, we can start the panel.

docker-compose up -d

If everything goes well, you should see a container named `` in the 1panel container interface.

Next, we will add the first user, which is the administrator user.

docker-compose exec panel php artisan p:user:make

The password for the account should meet the following criteria: 8 characters, a mix of uppercase and lowercase letters, and at least one number.

Next, we will reverse proxy the frontend and connect to the backend.

This article is synchronized and updated to xLog by Mix Space.
The original link is https://www.akio.top/posts/course/pterodactyl-ep2


Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.