Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 26 additions & 20 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@
# ============================================
# Demo Mode (optional)
# Set to 'true' to install demo landing page when no application exists
DEMO_MODE=false

DEMO_MODE=true
# Mode debug (optional) 0=inactive 1=acrive
ENABLE_XDEBUG=1
# Health Check Installation (optional)
# Set to 'true' to install health check endpoint
# Automatically enabled when DEMO_MODE=true
HEALTH_CHECK_INSTALL=false
HEALTH_CHECK_INSTALL=true
# ============================================
# Application
# ============================================
APP_NAME=php-api-stack
APP_ENV=production
APP_DEBUG=false
APP_ENV=development
APP_DEBUG=true
APP_PORT=8089
APP_DOMAIN=localhost

Expand All @@ -36,17 +37,23 @@ COMPOSER_VERSION=2.8.12
SYMFONY_CLI_VERSION=5.15.1

# ============================================
# PHP / Extensions
# PECL Extension Versions
# ============================================
PHP_REDIS_VERSION=6.1.0
PHP_APCU_VERSION=5.1.24
PHP_UUID_VERSION=1.2.1
PHP_IMAGICK_VERSION=3.7.0
PHP_AMQP_VERSION=2.1.2
XDEBUG_VERSION=3.4.6

# Core PHP extensions to install (installable only — built-ins are already available)
# Built-ins include: tokenizer, fileinfo, ctype, iconv, session, curl, etc.
# Available installable examples: pdo pdo_mysql pdo_pgsql opcache intl zip bcmath gd mysqli mbstring xml dom simplexml sockets pcntl exif
# ============================================
# PHP / Extensions
# ============================================
# Core PHP extensions (space-separated)
# IMPORTANTE: Use aspas duplas para evitar interpretação como comando
PHP_CORE_EXTENSIONS="pdo pdo_mysql opcache intl zip bcmath gd mbstring xml sockets"

# PECL extensions to install
# Available: redis apcu uuid xdebug imagick amqp swoole
# NOTE: remove xdebug in production builds
# PECL extensions (space-separated)
PHP_PECL_EXTENSIONS="redis apcu uuid"

# ============================================
Expand Down Expand Up @@ -114,11 +121,13 @@ PHP_OPCACHE_JIT_BUFFER_SIZE=128M
# Host / credentials
REDIS_HOST=redis
REDIS_PASSWORD=HmlRedis_3Qy7nFTZgW6M2bK9pX4c
# External Redis example service (compose profile)
REDIS_HOST_PORT=6378

# Database count used by the template
REDIS_DATABASES=16

# Memory policy use lowercase units for Redis (e.g., 256mb)
# Memory policy use lowercase units for Redis (e.g., 256mb)
REDIS_MAXMEMORY=256mb
REDIS_MAXMEMORY_POLICY=allkeys-lru
REDIS_MAXMEMORY_SAMPLES=5
Expand All @@ -128,7 +137,6 @@ REDIS_MAXCLIENTS=10000
REDIS_TIMEOUT=0

# Persistence (AOF/RDB)
# If you keep REDIS_SAVE here, handle it in the entrypoint to expand into multiple "save ..." lines.
REDIS_APPENDONLY=yes
REDIS_APPENDFSYNC=everysec
REDIS_SAVE="900 1 300 10 60 10000"
Expand Down Expand Up @@ -158,17 +166,18 @@ ENABLE_HTTP2=true
# ============================================
# Development (enable only in non-production)
# ============================================
XDEBUG_ENABLE=false
XDEBUG_ENABLE=1
XDEBUG_MODE=develop,debug,coverage
XDEBUG_HOST=host.docker.internal
XDEBUG_PORT=9003
XDEBUG_IDE_KEY=PHPSTORM
XDEBUG_IDE_KEY=VSCODE
XDEBUG_VERSION=3.4.6

# ============================================
# Build / Registry
# ============================================
BUILD_TARGET=production
IMAGE_TAG=latest
IMAGE_TAG=dev
REGISTRY=docker.io
REPOSITORY=kariricode/php-api-stack

Expand Down Expand Up @@ -206,9 +215,6 @@ DB_USERNAME=phpapi_hml
DB_PASSWORD=HmlUser_3kT8zQf
DB_PORT=3307

# External Redis example service (compose profile)
REDIS_HOST_PORT=6378

# Grafana example service (compose profile)
GRAFANA_PORT=3000
GRAFANA_PASSWORD=HmlGrafana_7uV4mRp
Expand Down
23 changes: 12 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,32 @@
!.env.dev

# Application
app/vendor/
app/node_modules/
app/var/
app/.env
app/.env.local
./app/vendor/
./app/node_modules/
./app/var/
./app/.env
./app/.env.local
./app/public/health.php
./app/public/index.php

# Logs
logs/
./logs/
*.log
/var/log/
.//var/log/

# Docker
docker-compose.override.yml
*.tar
*.tar.gz

# SSL certificates
ssl/
./ssl/
*.pem
*.key
*.crt

# IDE
.idea/
.vscode/
*.swp
*.swo
*~
Expand All @@ -40,8 +41,8 @@ ssl/
Thumbs.db

# Build artifacts
build/
dist/
./build/
./dist/

# Test files
test-app/
Expand Down
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www/html": "${workspaceFolder}"
},
"log": true
}
]
}
Loading