-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
executable file
·44 lines (43 loc) · 1.39 KB
/
docker-compose.dev.yml
File metadata and controls
executable file
·44 lines (43 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: '3.8'
services:
imap-client:
image: php:8.2-apache
ports:
- "8000:80"
environment:
- IMAP_SERVER=${IMAP_SERVER:-mail.undominio.org}
- IMAP_PORT=${IMAP_PORT:-993}
- IMAP_SSL=${IMAP_SSL:-true}
- SMTP_SERVER=${SMTP_SERVER:-mail.undominio.org}
- SMTP_PORT=${SMTP_PORT:-587}
- SMTP_SECURE=${SMTP_SECURE:-tls}
# Variables de desarrollo
- PHP_DISPLAY_ERRORS=On
- PHP_ERROR_REPORTING=E_ALL
volumes:
- .:/var/www/html
# Montar directorio de logs para debugging
- ./logs:/var/log/apache2
working_dir: /var/www/html
# Instalar extensiones al inicio (solo la primera vez)
command: >
bash -c "
if [ ! -f /usr/local/lib/php/extensions/*/imap.so ]; then
echo '📦 Instalando extensiones PHP...'
apt-get update &&
apt-get install -y libc-client-dev libkrb5-dev libssl-dev &&
docker-php-ext-configure imap --with-kerberos --with-imap-ssl &&
docker-php-ext-install imap
fi &&
echo '⚙️ Configurando Apache...' &&
a2enmod rewrite &&
chown -R www-data:www-data /var/www/html &&
chmod -R 755 /var/www/html &&
echo '🚀 Iniciando servidor Apache...' &&
apache2-foreground
"
restart: unless-stopped
# Configuración de desarrollo con hot reload
labels:
- "dev.mode=true"
- "dev.hot-reload=enabled"