Commit ea9f177f authored by Administrator's avatar Administrator

Update 7 files via Son of Anton

parent 992e5541
.git
.gitignore
.env.example
docker/
Dockerfile
captain-definition
*.md
.idea/
.vscode/
storage/logs/*
storage/cache/*
storage/sessions/*
storage/uploads/*
!storage/uploads/.gitkeep
!storage/logs/.gitkeep
\ No newline at end of file
APP_URL=http://localhost/the-club-erp/public APP_URL=http://localhost
APP_DEBUG=true APP_DEBUG=true
APP_ENV=local APP_ENV=local
......
FROM php:8.2-apache
# ── System dependencies ──
RUN apt-get update && apt-get install -y \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libicu-dev \
libzip-dev \
zip \
unzip \
default-mysql-client \
&& rm -rf /var/lib/apt/lists/*
# ── PHP extensions ──
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \
pdo_mysql \
bcmath \
mbstring \
gd \
intl \
zip \
opcache \
fileinfo
# ── Apache modules ──
RUN a2enmod rewrite headers
# ── PHP configuration ──
COPY docker/php.ini /usr/local/etc/php/conf.d/99-club-erp.ini
# ── Apache vhost ──
COPY docker/000-default.conf /etc/apache2/sites-available/000-default.conf
# ── Copy application ──
COPY . /var/www/html/
# ── Create storage directories ──
RUN mkdir -p \
/var/www/html/storage/logs \
/var/www/html/storage/uploads/documents \
/var/www/html/storage/uploads/photos \
/var/www/html/storage/uploads/forms \
/var/www/html/storage/cache \
/var/www/html/storage/sessions
# ── Permissions ──
RUN chown -R www-data:www-data /var/www/html/storage \
&& chmod -R 775 /var/www/html/storage \
&& chown -R www-data:www-data /var/www/html/public \
&& chmod -R 755 /var/www/html/public
# ── Default environment (overridable via CapRover env vars) ──
ENV APP_URL=http://localhost
ENV APP_DEBUG=true
ENV APP_ENV=local
ENV DB_HOST=srv-captain--mysql-db
ENV DB_PORT=3306
ENV DB_NAME=the_club_erp
ENV DB_USER=root
ENV DB_PASS=Alarcade123#
ENV SMS_PROVIDER=
ENV SMS_API_KEY=
ENV SMS_SENDER_ID=
# ── Entrypoint ──
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
\ No newline at end of file
{
"schemaVersion": 2,
"dockerfilePath": "./Dockerfile"
}
\ No newline at end of file
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/public
<Directory /var/www/html/public>
AllowOverride All
Require all granted
Options -Indexes +FollowSymLinks
# Fallback to index.php for all non-file requests
FallbackResource /index.php
</Directory>
# Block access to sensitive directories
<DirectoryMatch "^/var/www/html/(app|config|database|storage|cron|docker)">
Require all denied
</DirectoryMatch>
# Block .env and .git access
<FilesMatch "^\.">
Require all denied
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
\ No newline at end of file
This diff is collapsed.
; ── THE CLUB ERP — PHP Configuration ──
upload_max_filesize = 20M
post_max_size = 25M
memory_limit = 256M
max_execution_time = 120
max_input_time = 60
max_input_vars = 5000
date.timezone = Africa/Cairo
; Session
session.gc_maxlifetime = 1800
session.cookie_httponly = 1
session.use_strict_mode = 1
; Error handling
display_errors = Off
log_errors = On
error_log = /var/www/html/storage/logs/php_errors.log
; OPcache
opcache.enable = 1
opcache.memory_consumption = 128
opcache.max_accelerated_files = 10000
opcache.validate_timestamps = 1
opcache.revalidate_freq = 2
; mbstring
mbstring.internal_encoding = UTF-8
mbstring.http_output = UTF-8
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment