Skip to content

Commit e46f9be

Browse files
authored
Merge pull request #285 from hackthedev/Ptero-Update
Ptero update
2 parents 6b1bff4 + 3eb0020 commit e46f9be

7 files changed

Lines changed: 162 additions & 16 deletions

File tree

.github/workflows/docker.yml

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,30 +61,58 @@ jobs:
6161
push: true
6262
tags: ${{ steps.meta-branch.outputs.tags || steps.meta-release.outputs.tags }}
6363

64-
- name: Set image tags ptero (branch)
64+
- name: Set image tags ptero-dcts (branch)
6565
if: github.event_name == 'push'
66-
id: ptero-branch
66+
id: ptero-dcts-branch
6767
run: |
68-
TAGS="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-ptero"
68+
TAGS="${{ env.REGISTRY }}/${{ github.repository_owner }}/ptero-dcts:${{ github.ref_name }}"
6969
if [ "${{ github.ref_name }}" = "main" ]; then
70-
TAGS="$TAGS,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-ptero"
70+
TAGS="$TAGS,${{ env.REGISTRY }}/${{ github.repository_owner }}/ptero-dcts:latest"
7171
fi
7272
echo "tags=$TAGS" >> $GITHUB_OUTPUT
7373
74-
- name: Set image tags ptero (release)
74+
- name: Set image tags ptero-dcts (release)
7575
if: github.event_name == 'release'
76-
id: ptero-release
76+
id: ptero-dcts-release
7777
run: |
7878
VERSION="${GITHUB_REF_NAME}"
7979
VERSION="${VERSION#v}"
80-
TAGS="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${VERSION}-ptero,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-ptero"
80+
TAGS="${{ env.REGISTRY }}/${{ github.repository_owner }}/ptero-dcts:${VERSION},${{ env.REGISTRY }}/${{ github.repository_owner }}/ptero-dcts:latest"
8181
echo "tags=$TAGS" >> $GITHUB_OUTPUT
8282
83-
- name: Build and push ptero image
83+
- name: Build and push ptero-dcts image
8484
uses: docker/build-push-action@v5
8585
with:
8686
platforms: linux/amd64,linux/arm64
8787
context: .
88-
file: ./Dockerfile.ptero
88+
file: ./ptero/Dockerfile.dcts
8989
push: true
90-
tags: ${{ steps.ptero-branch.outputs.tags || steps.ptero-release.outputs.tags }}
90+
tags: ${{ steps.ptero-dcts-branch.outputs.tags || steps.ptero-dcts-release.outputs.tags }}
91+
92+
- name: Set image tags ptero-livekit (branch)
93+
if: github.event_name == 'push'
94+
id: ptero-livekit-branch
95+
run: |
96+
TAGS="${{ env.REGISTRY }}/${{ github.repository_owner }}/ptero-livekit:${{ github.ref_name }}"
97+
if [ "${{ github.ref_name }}" = "main" ]; then
98+
TAGS="$TAGS,${{ env.REGISTRY }}/${{ github.repository_owner }}/ptero-livekit:latest"
99+
fi
100+
echo "tags=$TAGS" >> $GITHUB_OUTPUT
101+
102+
- name: Set image tags ptero-livekit (release)
103+
if: github.event_name == 'release'
104+
id: ptero-livekit-release
105+
run: |
106+
VERSION="${GITHUB_REF_NAME}"
107+
VERSION="${VERSION#v}"
108+
TAGS="${{ env.REGISTRY }}/${{ github.repository_owner }}/ptero-livekit:${VERSION},${{ env.REGISTRY }}/${{ github.repository_owner }}/ptero-livekit:latest"
109+
echo "tags=$TAGS" >> $GITHUB_OUTPUT
110+
111+
- name: Build and push ptero-livekit image
112+
uses: docker/build-push-action@v5
113+
with:
114+
platforms: linux/amd64,linux/arm64
115+
context: .
116+
file: ./ptero/Dockerfile.livekit
117+
push: true
118+
tags: ${{ steps.ptero-livekit-branch.outputs.tags || steps.ptero-livekit-release.outputs.tags }}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
"exported_at": "2026-03-16T12:52:53+00:00",
88
"name": "DCTS_OLD",
99
"author": "marcel@dcts.community",
10-
"description": "DCTS - self-hosted Discord\/TeamSpeak-style chat platform with E2E encrypted DMs and decentralized server discovery.",
10+
"description": "DCTS - self-hosted Discord/TeamSpeak-style chat platform with E2E encrypted DMs and decentralized server discovery.",
1111
"features": [],
1212
"docker_images": {
13-
"DCTS Beta": "ghcr.io\/hackthedev\/dcts-shipping:beta-ptero"
13+
"DCTS Beta": "ghcr.io/hackthedev/ptero-dcts:beta"
1414
},
1515
"file_denylist": [],
1616
"startup": "PORT={{SERVER_PORT}} bun . --ptero",
@@ -22,8 +22,8 @@
2222
},
2323
"scripts": {
2424
"installation": {
25-
"script": "#!\/bin\/bash\r\n# DCTS\r\n#\r\n# Server Files: \/mnt\/server\r\n# All required packages are installed in the used install image \r\n\r\nexport HOME=\/mnt\/server\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\ngit config --global --add safe.directory \/mnt\/server\r\n\r\nif [ ! -d \".git\" ]; then\r\n echo \"Cloning from github...\"\r\n git clone -b beta https:\/\/github.com\/hackthedev\/dcts-shipping.git .\r\nelse\r\n echo \"Updating existing installation...\"\r\n git fetch origin beta\r\n git reset --hard origin\/beta\r\nfi\r\n\r\necho -e \"Preparing directories and fixing permissions...\"\r\n\r\nmkdir -p sv configs public\/uploads public\/emojis plugins themes\r\n\r\necho -e \"Installation completed.\\nDependencies will be installed on first start.\"",
26-
"container": "ghcr.io\/pterodactyl\/installers:debian",
25+
"script": "#!/bin/bash\r\n# DCTS\r\n#\r\n# Server Files: /mnt/server\r\n# All required packages are installed in the used install image \r\n\r\nexport HOME=/mnt/server\r\nmkdir -p /mnt/server\r\ncd /mnt/server\r\n\r\ngit config --global --add safe.directory /mnt/server\r\n\r\nif [ ! -d \".git\" ]; then\r\n echo \"Cloning from github...\"\r\n git clone -b beta https://github.com/hackthedev/dcts-shipping.git .\r\nelse\r\n echo \"Updating existing installation...\"\r\n git fetch origin beta\r\n git reset --hard origin/beta\r\nfi\r\n\r\necho -e \"Preparing directories and fixing permissions...\"\r\n\r\nmkdir -p sv configs public/uploads public/emojis plugins themes\r\n\r\necho -e \"Installation completed.\\nDependencies will be installed on first start.\"",
26+
"container": "ghcr.io/pterodactyl/installers:debian",
2727
"entrypoint": "bash"
2828
}
2929
},
@@ -110,7 +110,7 @@
110110
},
111111
{
112112
"name": "LiveKit URL",
113-
"description": "URL of the shared LiveKit server. Leave empty to disable voice\/video.",
113+
"description": "URL of the shared LiveKit server. Leave empty to disable voice/video.",
114114
"env_variable": "LIVEKIT_URL",
115115
"default_value": "",
116116
"user_viewable": true,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ENV USER=container HOME=/home/container
1616
WORKDIR /home/container
1717

1818
# Copy entrypoint
19-
COPY --chown=container:container ./ptero/entrypoint.sh /entrypoint.sh
19+
COPY --chown=container:container ./ptero/DCTS/entrypoint.sh /entrypoint.sh
2020
RUN chmod +x /entrypoint.sh
2121

2222
CMD ["/bin/bash", "/entrypoint.sh"]

ptero/Dockerfile.livekit

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ---------------------------
2+
# Pterodactyl Dockerfile
3+
# Environment: LiveKit Server
4+
# ---------------------------
5+
FROM ubuntu:latest
6+
7+
# Install dependencies and create container user
8+
RUN apt-get update && apt-get install -y curl ca-certificates openssl git tar bash sqlite3 fontconfig tzdata iproute2 jq bc \
9+
&& curl -sL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq \
10+
&& chmod +x /usr/local/bin/yq \
11+
&& useradd -d /home/container -s /bin/bash -m container
12+
13+
# Set environment
14+
USER container
15+
ENV USER=container HOME=/home/container
16+
WORKDIR /home/container
17+
18+
# Copy entrypoint
19+
COPY --chown=container:container ./ptero/Livekit/entrypoint.sh /entrypoint.sh
20+
RUN chmod +x /entrypoint.sh
21+
22+
CMD ["/bin/bash", "/entrypoint.sh"]

ptero/Livekit/egg-livekit.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
3+
"meta": {
4+
"version": "PTDL_v2",
5+
"update_url": null
6+
},
7+
"exported_at": "2026-03-16T12:52:53+00:00",
8+
"name": "DCTS LiveKit",
9+
"author": "marcel@dcts.community",
10+
"description": "LiveKit Server for DCTS voice and video chat.",
11+
"features": [],
12+
"docker_images": {
13+
"LiveKit Beta": "ghcr.io/hackthedev/ptero-livekit:beta"
14+
},
15+
"file_denylist": [],
16+
"startup": "./livekit-server --config {{LIVEKIT_YAML_PATH}}",
17+
"config": {
18+
"files": "{}",
19+
"startup": "{\r\n \"done\": \"Welcome to DCTS\"\r\n}",
20+
"logs": "{}",
21+
"stop": "^C"
22+
},
23+
"scripts": {
24+
"installation": {
25+
"script": "#!/bin/bash\nexport HOME=/mnt/server\nmkdir -p /mnt/server\ncd /mnt/server\n\necho \"Fetching latest LiveKit release...\"\nLATEST_VERSION=$(curl -s https://api.github.com/repos/livekit/livekit/releases/latest | grep '\"tag_name\":' | head -n 1 | sed -E 's/.*\"v([^\"]+)\".*/\\1/')\necho \"Installing LiveKit v${LATEST_VERSION}...\"\nwget \"https://github.com/livekit/livekit/releases/latest/download/livekit-server_${LATEST_VERSION}_linux_amd64.tar.gz\"\ntar -xzf livekit-server_${LATEST_VERSION}_linux_amd64.tar.gz livekit-server\nrm livekit-server_${LATEST_VERSION}_linux_amd64.tar.gz\nchmod +x livekit-server\necho \"LiveKit installation complete.\"\n",
26+
"container": "ghcr.io/pterodactyl/installers:debian",
27+
"entrypoint": "bash"
28+
}
29+
},
30+
"variables": [
31+
{
32+
"name": "Server Port",
33+
"description": "Main HTTP port for the LiveKit API (Default 7880).",
34+
"env_variable": "SERVER_PORT",
35+
"default_value": "7880",
36+
"user_viewable": true,
37+
"user_editable": false,
38+
"rules": "required|integer|between:1024,65535",
39+
"field_type": "text"
40+
},
41+
{
42+
"name": "LiveKit YAML Path",
43+
"description": "Path to the livekit.yaml configuration file.",
44+
"env_variable": "LIVEKIT_YAML_PATH",
45+
"default_value": "livekit.yaml",
46+
"user_viewable": true,
47+
"user_editable": true,
48+
"rules": "required|string",
49+
"field_type": "text"
50+
}
51+
]
52+
}

ptero/Livekit/entrypoint.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
set -e
3+
4+
cd /home/container
5+
6+
export LIVEKIT_YAML_PATH="${LIVEKIT_YAML_PATH:-livekit.yaml}"
7+
8+
if [ ! -f "livekit-server" ]; then
9+
echo "ERROR: livekit-server binary not found! Please reinstall the server or check the installation script."
10+
exit 1
11+
fi
12+
13+
if ! grep -q "^keys:" "${LIVEKIT_YAML_PATH}" 2>/dev/null; then
14+
echo "Generating LiveKit keys..."
15+
16+
OUTPUT=$(./livekit-server generate-keys)
17+
18+
API_KEY=$(echo "$OUTPUT" | awk '/API Key:/ {print $3}')
19+
API_SECRET=$(echo "$OUTPUT" | awk '/API Secret:/ {print $3}')
20+
21+
if [ -z "$API_KEY" ] || [ -z "$API_SECRET" ]; then
22+
echo "Key generation failed!"
23+
exit 1
24+
fi
25+
26+
touch "${LIVEKIT_YAML_PATH}"
27+
28+
/usr/local/bin/yq -i '
29+
.keys = {} |
30+
.keys["'"$API_KEY"'"] = "'"$API_SECRET"'"
31+
' "${LIVEKIT_YAML_PATH}"
32+
33+
echo "Keys written. Your API Key is: ${API_KEY}"
34+
else
35+
echo "Keys already exist."
36+
fi
37+
38+
# Replace any variables if we need to
39+
if [ -n "$SERVER_PORT" ]; then
40+
/usr/local/bin/yq -i '.port = '"$SERVER_PORT" "${LIVEKIT_YAML_PATH}"
41+
fi
42+
43+
# Start livekit
44+
exec ./livekit-server --config "${LIVEKIT_YAML_PATH}"

0 commit comments

Comments
 (0)