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 my head spin...

Since I already have 1panel installed, I decided to use it for deployment.

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

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

weAA.png

Fill in the other details according to your own needs.

Download Files#

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

In my case, after connecting to the server via SSH, create /opt/pterodactyl and enter it:

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

Once the directory is created, it's time to pull the docker-compose.yml, as shown below:

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 and edit docker-compose.yml to configure the relevant information.

The following is directly copied from the documentation, so 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 on 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 certificates.

VariableDescriptionRequired
APP_URLThe URL (including protocol) to access the panelYes
APP_TIMEZONEThe timezone used by the panelYes
LE_EMAILThe email used to generate letsencrypt certificatesYes
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 secure 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, as 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 configuring, it's time to start the panel:

docker-compose up -d

If everything is normal, 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.