bye phar
All checks were successful
Build, Push, Publish / Build & Release (push) Successful in 16m52s

This commit is contained in:
2025-12-09 22:41:15 -03:00
parent e9856e6bbb
commit 1c946f5b16
6 changed files with 89 additions and 105 deletions

View File

@@ -1,45 +0,0 @@
name: Update AWS SDK PHAR
on:
workflow_dispatch:
schedule:
- cron: '34 3 * * *' # 03:34 UTC == 00:34 BRT
permissions:
contents: write
jobs:
download-aws-sdk:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
permissions:
contents: write
actions: write # needed to dispatch another workflow
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download AWS SDK PHAR
run: |
mkdir -p vendor
wget https://github.com/aws/aws-sdk-php/releases/latest/download/aws.phar -O vendor/aws.phar
- name: Commit and push changes
id: commit_step
run: |
git config --global --add safe.directory '*'
git config user.name "Gitea Actions"
git config user.email "actions@git.icc.gg"
git add vendor/aws.phar
# If there are changes, commit & push; set output flag accordingly
if git diff --quiet && git diff --staged --quiet; then
echo "No changes to commit"
echo "changes_committed=false" >> $GITHUB_OUTPUT
else
git commit -m "Update AWS SDK PHAR [▶️]"
git push origin HEAD:main
echo "changes_committed=true" >> $GITHUB_OUTPUT
fi

View File

@@ -1,11 +1,21 @@
FROM php:8.4-fpm-alpine FROM php:8.4-fpm-alpine
# Install Nginx and MariaDB client; install PHP extensions (mysqli) and clean up # Install Nginx and MariaDB client; install PHP extensions (mysqli) and clean up
RUN apk add --no-cache --update nginx \ RUN apk add --no-cache --update nginx git unzip \
&& docker-php-ext-install mysqli \ && docker-php-ext-install mysqli \
&& rm -rf /var/cache/apk/* /tmp/* && rm -rf /var/cache/apk/* /tmp/*
# Copy your application code # Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Copy only composer files first to leverage Docker cache
COPY composer.json /var/www/html/
# Increase timeout and install dependencies
ENV COMPOSER_PROCESS_TIMEOUT=2000
RUN composer install --no-dev --optimize-autoloader
# Copy the rest of the application code
COPY . /var/www/html/ COPY . /var/www/html/
# Create nginx.conf directly in the Docker build # Create nginx.conf directly in the Docker build

5
composer.json Normal file
View File

@@ -0,0 +1,5 @@
{
"require": {
"aws/aws-sdk-php": "^3.0"
}
}

View File

@@ -6,7 +6,7 @@ if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) {
} }
include '../dbconfig.php'; include '../dbconfig.php';
require '../vendor/aws.phar'; require '../vendor/autoload.php';
use Aws\Route53\Route53Client; use Aws\Route53\Route53Client;
use Aws\Exception\AwsException; use Aws\Exception\AwsException;
@@ -284,6 +284,7 @@ if ($result = $link->query($sql)) {
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -295,25 +296,30 @@ if ($result = $link->query($sql)) {
cursor: pointer; cursor: pointer;
position: relative; position: relative;
} }
th.sortable:hover { th.sortable:hover {
background-color: #f0f0f0; background-color: #f0f0f0;
} }
th.sortable::after { th.sortable::after {
content: '↕'; content: '↕';
position: absolute; position: absolute;
right: 8px; right: 8px;
opacity: 0.3; opacity: 0.3;
} }
th.sortable.asc::after { th.sortable.asc::after {
content: '↑'; content: '↑';
opacity: 1; opacity: 1;
} }
th.sortable.desc::after { th.sortable.desc::after {
content: '↓'; content: '↓';
opacity: 1; opacity: 1;
} }
</style> </style>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<h1>Manage DDNS Entries</h1> <h1>Manage DDNS Entries</h1>
@@ -329,7 +335,8 @@ if ($result = $link->query($sql)) {
<h2>Add New DDNS Entry</h2> <h2>Add New DDNS Entry</h2>
<form method="post"> <form method="post">
<label>DDNS FQDN:</label> <label>DDNS FQDN:</label>
<input type="text" name="ddns_fqdn" required placeholder="subdomain.<?php echo htmlspecialchars($approved_fqdn); ?>"> <input type="text" name="ddns_fqdn" required
placeholder="subdomain.<?php echo htmlspecialchars($approved_fqdn); ?>">
<label>DDNS Password:</label> <label>DDNS Password:</label>
<input type="password" name="ddns_password" required> <input type="password" name="ddns_password" required>
@@ -372,17 +379,23 @@ if ($result = $link->query($sql)) {
<form method="post" style="display:inline; max-width: none;"> <form method="post" style="display:inline; max-width: none;">
<input type="hidden" name="ddns_id" value="<?php echo $entry['id']; ?>"> <input type="hidden" name="ddns_id" value="<?php echo $entry['id']; ?>">
<div class="flex gap-2"> <div class="flex gap-2">
<input type="text" name="new_ip" placeholder="New IP" required style="width: 120px;"> <input type="text" name="new_ip" placeholder="New IP" required
<input type="number" name="new_ttl" placeholder="TTL" min="1" required style="width: 80px;"> style="width: 120px;">
<input type="number" name="new_ttl" placeholder="TTL" min="1" required
style="width: 80px;">
<input type="submit" name="update_ip" value="Update" style="padding: 0.5rem;"> <input type="submit" name="update_ip" value="Update" style="padding: 0.5rem;">
</div> </div>
</form> </form>
</td> </td>
<td> <td>
<a href="view_logs.php?ddns_id=<?php echo $entry['id']; ?>" class="btn" style="padding: 0.25rem 0.5rem; font-size: 0.875rem;">Logs</a> <a href="view_logs.php?ddns_id=<?php echo $entry['id']; ?>" class="btn"
style="padding: 0.25rem 0.5rem; font-size: 0.875rem;">Logs</a>
</td> </td>
<td> <td>
<a href="manage_ddns.php?delete=<?php echo $entry['id']; ?>" onclick="return confirm('Are you sure you want to delete this DDNS entry?');" class="btn btn-danger" style="padding: 0.25rem 0.5rem; font-size: 0.875rem;">Delete</a> <a href="manage_ddns.php?delete=<?php echo $entry['id']; ?>"
onclick="return confirm('Are you sure you want to delete this DDNS entry?');"
class="btn btn-danger"
style="padding: 0.25rem 0.5rem; font-size: 0.875rem;">Delete</a>
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
@@ -394,4 +407,5 @@ if ($result = $link->query($sql)) {
<p><a href="dashboard.php">Back to Dashboard</a></p> <p><a href="dashboard.php">Back to Dashboard</a></p>
</div> </div>
</body> </body>
</html> </html>

View File

@@ -1,6 +1,6 @@
<?php <?php
include '../dbconfig.php'; include '../dbconfig.php';
require '../vendor/aws.phar'; require '../vendor/autoload.php';
use Aws\Route53\Route53Client; use Aws\Route53\Route53Client;
use Aws\Exception\AwsException; use Aws\Exception\AwsException;

BIN
vendor/aws.phar vendored

Binary file not shown.