Skip to content

Commit

Permalink
feat: add wing compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
neolectron committed Nov 8, 2024
1 parent f764e4d commit 65c1701
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 4 deletions.
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,31 @@

## How to setup the pterodactyl panel

Open your github secrets and add the following:
Fork this repo.
Open your github repo secrets and add the following:

- `CODINGLABGG_SSH_KEY` : The private key to connect to the server
- `CODINGLABGG_SSH_USER` : The user used to connect to the server (`pterodactyl`)
- `CODINGLABGG_SSH_HOST` : The host/ip of the server (`codinglab.gg`)
- `CODINGLABGG_SSH_HOST` : The host/ip of the serve that run the panel (`codinglab.gg`)
- `CODINGLABGG_SSH_CERT` : The public certificate of the server (`ssh-keyscan codinglab.gg`)

Make sure your server is setup with docker and docker compose plugin, and your user can run docker commands.

Then push to the repository, [the github `panel-deployment.yml` action](./.github/workflows/panel-deployment.yml) will deploy the panel to the server.

Now you should be able to access the panel at your desired domain, under https.

You still have to create your first user (admin) tho.
To do so, go into your github repo > actions > panel-create-user.yml > run workflow > and fill this form :
![image](docs/pterodactyl/panel-create-user-workflow.png)

## How to setup a fresh game server

The panel and the game server are different entities. The panel is the dashboard to manage the game servers. The game servers are the actual servers where the games are running.
First you need to create a Location, then a Node in the panel.

Click on `Nodes` > `Create New` > Fill the form with the server's informations.

Then you need to copy the Node Configuration `config.yml` from the panel.

To setup a fresh game server, you need to run the wings agent on the server. The wings agent is the software that connects the game server to the panel.
To setup a fresh game server, you need to run the wings agent on the server.
The wings agent is the software that connects the game server to the panel.
Binary file added docs/pterodactyl/panel-create-user-workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions pterodactyl/wings/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Docker compose container prefix
COMPOSE_PROJECT_NAME=pterodactyl

# Data directory
DATA_DIR=../data

# Full path to wings volumes data
# NOTE: This path has to match the "Daemon Server File Directory" path you apply when creating a node in the panel!
# The default setting is "/var/lib/pterodactyl/", however this can be changed to something like:
# "/srv/docker/docker-pterodactyl/data/wings/lib/volumes" in order to store everything in one place, just make sure the paths in panel and here match!
SERVERS_DATA_FULL_PATH=/var/lib/pterodactyl/

# Wings domain
WINGS_DOMAIN=game.codinglab.gg
40 changes: 40 additions & 0 deletions pterodactyl/wings/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
services:
wings:
image: ghcr.io/pterodactyl/wings:latest
env_file:
- .env
restart: always
networks:
- pterodactyl
- wings0
ports:
- '2022:2022'
- '443:443'
tty: true
environment:
TZ: 'UTC'
WINGS_UID: 988
WINGS_GID: 988
WINGS_USERNAME: pterodactyl
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- '/var/lib/docker/containers/:/var/lib/docker/containers/'
- '/tmp/pterodactyl/:/tmp/pterodactyl/'
- '/etc/ssl/certs:/etc/ssl/certs:ro'
- '${DATA_DIR}/wings/etc/:/etc/pterodactyl/'
- '${DATA_DIR}/wings/logs:/var/log/pterodactyl/'
- '${SERVERS_DATA_FULL_PATH}:${SERVERS_DATA_FULL_PATH}'
# required if ssl by letsencrypt is enabled
- '/etc/letsencrypt:/etc/letsencrypt'

networks:
pterodactyl:
external: true
wings0:
name: wings0
driver: bridge
ipam:
config:
- subnet: '172.21.0.0/16'
driver_opts:
com.docker.network.bridge.name: wings0

0 comments on commit 65c1701

Please sign in to comment.