Skip to content

Commit 3210b2f

Browse files
pteroca-comksroga
andauthored
[v0.5.4] Version release (#54)
* [task-177] Subusers init * Added edit permissions modal * [task-177] Crud finished * [task-177] Improvements * [task-177] Permissions enum * [task-177] Server Permissions Collection * [task-177] Permissions behavior part 1 * [task-177] Permissions behavior part 2 * [task-177] Permissions behavior part 3 * [task-177] Checking permissions on backend * [task-177] Added pterodactyl logs to activity logs * [task-177] Fixed bug with show details button * [task-177] Added pterodactyl logs in activity * [task-177] Restoring backup functionality * [task-177] Requests to api depends on permissions * [task-177] Migrations, entity and repository for subuser table * [task-177] Saving subusers in database * [task-177] Show servers with subusers * [task-117] Translations * [task-177] Saved de_CH translations * [task-263] Cron listing * [task-263] Adding schedules functionality * [task-263] Editing schedules part 1 * [task-263] Show tasks in edit modal * [task-263] Adding & editing schedule tasks * [task-263] Deleting schedules & tasks * [task-263] Added missing translations * [task-263] Edit schedule fix * [task-263] Schedule settings in product * [task-263] Added missing translations * [task-177] Improvements * [task-177] Improvements * [task-177] New setting * [task-218] Added threads pinning support * [task-267] Remove hint when adding new user * [task-267] Admin User Crud improvements * [task-268] Added missing translations * [task-210] Updated server management page conditions * [0.5.4] Improvements * Add Docker configuration with automatic database setup and migrations - Add docker-compose.yml (dev) and docker-compose.prod.yml (prod) environments - Add Dockerfile with PHP 8.2-FPM, Nginx, and Supervisor configuration - Add docker-init.sh script for automated environment setup - Add automatic database migration execution on container start - Add automatic APP_SECRET generation for security - Add proper file permissions for var/ and public/uploads/ - Add development PHPMyAdmin and production security settings - Add comprehensive installation instructions and web wizard info - Update .env.SAMPLE with Docker-compatible DATABASE_URL * Generate random strong password for prod environment * Check if docker is installed first * Added PteroCA jobs to container cron * Logging errors * Added logging & missing translations * Updated allowed post size limit in containers * PHPStan fixes * Code & docker environment improvements * Error logging * Added translations * Updated version * Updated README.md --------- Co-authored-by: Konrad Sroga <[email protected]>
1 parent 95a0aee commit 3210b2f

File tree

112 files changed

+8443
-416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+8443
-416
lines changed

.dockerignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.git
2+
.gitignore
3+
.idea
4+
.phpunit.result.cache
5+
var/cache/*
6+
var/log/*
7+
vendor/
8+
node_modules/
9+
.env.local
10+
.env.*.local
11+
README.md
12+
CHANGELOG.md
13+
phpunit.xml.dist
14+
phpstan.dist.neon
15+
junit.xml

.env.SAMPLE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ APP_SECRET=
2626
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
2727
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=8.0.32&charset=utf8mb4"
2828
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
29-
DATABASE_URL=
29+
DATABASE_URL=mysql://user:password@db:3306/pteroca?serverVersion=8.0.32&charset=utf8mb4
3030
###< doctrine/doctrine-bundle ###
3131

3232
###> symfony/messenger ###

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
---
44

5+
## [0.5.4] - 2025-07-13
6+
7+
### Added
8+
- Added support for server subusers with permission management.
9+
- Added server schedule management, including per-product/server schedule limits.
10+
- Added CPU pinning support for both products and servers.
11+
- Added missing translations across the panel.
12+
- Added docker-compose.yml for both development and production environments to enable quick setup via a single command.
13+
14+
### Changed
15+
- Improved the admin user management CRUD interface.
16+
- Improved logging of certain user actions.
17+
- Various minor performance and optimization improvements.
18+
19+
---
20+
521
## [0.5.3] - 2025-06-02
622

723
### Added

Dockerfile

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
FROM php:8.2-fpm
2+
3+
# Install required PHP extensions
4+
RUN apt-get update && apt-get install -y \
5+
git \
6+
zip \
7+
unzip \
8+
libzip-dev \
9+
libicu-dev \
10+
libonig-dev \
11+
default-mysql-client \
12+
nginx \
13+
supervisor \
14+
cron \
15+
ca-certificates \
16+
&& docker-php-ext-install \
17+
pdo \
18+
pdo_mysql \
19+
zip \
20+
intl \
21+
mbstring \
22+
opcache \
23+
&& apt-get clean \
24+
&& rm -rf /var/lib/apt/lists/* \
25+
&& update-ca-certificates
26+
27+
# Install Composer
28+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
29+
30+
# Set working directory
31+
WORKDIR /app
32+
33+
# Copy application files first
34+
COPY . .
35+
36+
# Install dependencies
37+
ARG APP_ENV=prod
38+
RUN if [ "$APP_ENV" = "dev" ]; then \
39+
composer install --optimize-autoloader --no-interaction --no-scripts; \
40+
else \
41+
composer install --no-dev --optimize-autoloader --no-interaction --no-scripts; \
42+
fi
43+
44+
# Configure Nginx
45+
COPY docker/nginx/default.conf /etc/nginx/sites-available/default
46+
RUN ln -sf /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
47+
48+
# Configure Supervisor
49+
COPY docker/supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
50+
51+
# Configure PHP-FPM
52+
COPY docker/php/php.ini /usr/local/etc/php/php.ini
53+
COPY docker/php/www.conf /usr/local/etc/php-fpm.d/www.conf
54+
55+
# Setup PteroCA cron job
56+
RUN echo "* * * * * www-data php /app/bin/console app:cron-job-schedule >> /dev/null 2>&1" > /etc/cron.d/pteroca-cron \
57+
&& chmod 0644 /etc/cron.d/pteroca-cron \
58+
&& crontab -u www-data /etc/cron.d/pteroca-cron
59+
60+
# Set permissions
61+
RUN chown -R www-data:www-data /app \
62+
&& chmod -R 755 /app \
63+
&& chmod -R 777 var/ \
64+
&& mkdir -p public/uploads \
65+
&& chown -R www-data:www-data public/uploads \
66+
&& chmod -R 775 public/uploads
67+
68+
# Expose port
69+
EXPOSE 80
70+
71+
# Default command
72+
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Your star helps us reach more developers and improve the project faster.
3535
### 🚀 Getting Started
3636

3737
#### Installation
38-
You can install PteroCA in minutes using our [Automatic Installer](https://docs.pteroca.com/getting-started/installation/automatic-installation), or follow the [manual installation guide](https://docs.pteroca.com/getting-started/installation/manual-installation) for detailed setup instructions.
38+
You can install PteroCA in minutes using our [Automatic Installer](https://docs.pteroca.com/getting-started/installation/automatic-installation), quickly set up with [Docker Compose](https://docs.pteroca.com/getting-started/installation/installation-via-docker), or follow the [manual installation guide](https://docs.pteroca.com/getting-started/installation/manual-installation) for detailed setup instructions.
3939

4040
#### Requirements
4141
To run PteroCA, make sure your server meets the following requirements:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pteroca/panel",
33
"description": "PteroCA.com is a free, open-source client area and management panel designed specifically for Pterodactyl server users and hosting providers. The platform simplifies and automates server management with a user-friendly interface and robust billing features.",
4-
"version": "0.5.3",
4+
"version": "0.5.4",
55
"type": "project",
66
"license": "MIT",
77
"minimum-stability": "stable",

docker-compose.prod.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
services:
2+
db:
3+
image: mysql:8.0
4+
container_name: pteroca_mysql_prod
5+
restart: always
6+
environment:
7+
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root}
8+
MYSQL_DATABASE: pteroca
9+
MYSQL_USER: user
10+
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-password}
11+
ports:
12+
- "3306:3306"
13+
volumes:
14+
- db_data_prod:/var/lib/mysql
15+
healthcheck:
16+
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
17+
timeout: 20s
18+
retries: 10
19+
env_file:
20+
- .env
21+
22+
web:
23+
build:
24+
context: .
25+
args:
26+
APP_ENV: prod
27+
container_name: pteroca_web_prod
28+
ports:
29+
- "80:80"
30+
environment:
31+
DATABASE_URL: ${DATABASE_URL:-mysql://user:password@db:3306/pteroca?serverVersion=8.0}
32+
APP_ENV: prod
33+
CURL_CA_BUNDLE: /etc/ssl/certs/ca-certificates.crt
34+
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
35+
depends_on:
36+
db:
37+
condition: service_healthy
38+
volumes:
39+
- .:/app
40+
- /etc/timezone:/etc/timezone:ro
41+
- /etc/localtime:/etc/localtime:ro
42+
working_dir: /app
43+
command: >
44+
sh -c "
45+
echo 'Waiting for database to be ready...'
46+
until php bin/console doctrine:query:sql 'SELECT 1' > /dev/null 2>&1; do
47+
echo 'Database not ready yet, waiting...'
48+
sleep 2
49+
done
50+
echo 'Database is ready, running migrations...'
51+
php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
52+
echo 'Migrations completed successfully!'
53+
echo 'Starting production server...'
54+
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
55+
"
56+
restart: unless-stopped
57+
env_file:
58+
- .env
59+
60+
volumes:
61+
db_data_prod:

docker-compose.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
services:
2+
db:
3+
image: mysql:8.0
4+
container_name: pteroca_mysql_dev
5+
restart: always
6+
environment:
7+
MYSQL_ROOT_PASSWORD: root
8+
MYSQL_DATABASE: pteroca
9+
MYSQL_USER: user
10+
MYSQL_PASSWORD: password
11+
ports:
12+
- "3306:3306"
13+
volumes:
14+
- db_data_dev:/var/lib/mysql
15+
healthcheck:
16+
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
17+
timeout: 20s
18+
retries: 10
19+
20+
phpmyadmin:
21+
image: phpmyadmin/phpmyadmin
22+
container_name: pteroca_phpmyadmin_dev
23+
restart: always
24+
ports:
25+
- "8080:80"
26+
environment:
27+
PMA_HOST: db
28+
PMA_USER: root
29+
PMA_PASSWORD: root
30+
# Increase upload limits for database imports
31+
UPLOAD_LIMIT: 128M
32+
MAX_EXECUTION_TIME: 300
33+
MEMORY_LIMIT: 512M
34+
depends_on:
35+
- db
36+
37+
web:
38+
build:
39+
context: .
40+
args:
41+
APP_ENV: dev
42+
container_name: pteroca_web_dev
43+
ports:
44+
- "8000:8000"
45+
environment:
46+
DATABASE_URL: "mysql://user:password@db:3306/pteroca?serverVersion=8.0"
47+
APP_ENV: dev
48+
CURL_CA_BUNDLE: /etc/ssl/certs/ca-certificates.crt
49+
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
50+
depends_on:
51+
db:
52+
condition: service_healthy
53+
volumes:
54+
- .:/app
55+
- /etc/timezone:/etc/timezone:ro
56+
- /etc/localtime:/etc/localtime:ro
57+
working_dir: /app
58+
command: >
59+
sh -c "
60+
echo 'Waiting for database to be ready...'
61+
until php bin/console doctrine:query:sql 'SELECT 1' > /dev/null 2>&1; do
62+
echo 'Database not ready yet, waiting...'
63+
sleep 2
64+
done
65+
echo 'Database is ready, running migrations...'
66+
php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
67+
echo 'Migrations completed successfully!'
68+
echo 'Starting PHP development server...'
69+
php -S 0.0.0.0:8000 -t public/
70+
"
71+
restart: unless-stopped
72+
env_file:
73+
- .env
74+
75+
volumes:
76+
db_data_dev:

0 commit comments

Comments
 (0)