Last active
June 19, 2025 21:53
-
-
Save j4viermora/6a69c1feaa7d144becf0e47d4c0b5cea to your computer and use it in GitHub Desktop.
Docker compose and dockerfile to run perfext crm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:8.1-apache | |
# Instala dependencias necesarias | |
RUN apt-get update && apt-get install -y \ | |
libpng-dev \ | |
libjpeg-dev \ | |
libfreetype6-dev \ | |
libzip-dev \ | |
libicu-dev \ | |
libonig-dev \ | |
libxml2-dev \ | |
libssl-dev \ | |
libcurl4-openssl-dev \ | |
libc-client-dev \ | |
libkrb5-dev | |
# Instala extensiones PHP requeridas | |
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \ | |
&& docker-php-ext-install mysqli pdo pdo_mysql gd zip | |
# IMAP requiere configuración especial | |
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ | |
&& docker-php-ext-install imap | |
# Habilita mod_rewrite de Apache | |
RUN a2enmod rewrite | |
# Limpia cache de apt | |
RUN apt-get clean && rm -rf /var/lib/apt/lists/* | |
EXPOSE 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
perfect-crm: | |
build: . | |
container_name: perfect-crm-app | |
ports: | |
- "8080:80" | |
volumes: | |
- .:/var/www/html # Cambiar esta línea | |
- ./apache-config:/etc/apache2/sites-available | |
environment: | |
- APACHE_DOCUMENT_ROOT=/var/www/html/public | |
depends_on: | |
- mysql | |
networks: | |
- perfect-crm-network | |
restart: unless-stopped | |
mysql: | |
image: mysql:8.1 | |
container_name: perfect-crm-db | |
environment: | |
MYSQL_ROOT_PASSWORD: rootpassword | |
MYSQL_DATABASE: perfect_crm | |
MYSQL_USER: perfect_user | |
MYSQL_PASSWORD: perfect_password | |
ports: | |
- "3306:3306" | |
volumes: | |
- mysql_data:/var/lib/mysql | |
- ./mysql-init:/docker-entrypoint-initdb.d | |
networks: | |
- perfect-crm-network | |
restart: unless-stopped | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
container_name: perfect-crm-phpmyadmin | |
environment: | |
PMA_HOST: mysql | |
PMA_PORT: 3306 | |
PMA_USER: perfect_user | |
PMA_PASSWORD: perfect_password | |
ports: | |
- "8081:80" | |
depends_on: | |
- mysql | |
networks: | |
- perfect-crm-network | |
restart: unless-stopped | |
volumes: | |
mysql_data: | |
networks: | |
perfect-crm-network: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just run docker compose up
and navigate to https://localhost:8080/ and follow install instructions