Last active
          November 8, 2018 13:09 
        
      - 
      
- 
        Save Tyranwyn/50f39db8476cf0d8fc6ed59db362cb6f to your computer and use it in GitHub Desktop. 
    Elgg.org Docker and docker compose
  
        
  
    
      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
    
  
  
    
  | [mysqld] | |
| default_authentication_plugin=mysql_native_password | 
  
    
      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
    
  
  
    
  | version: '3.3' | |
| services: | |
| elgg: | |
| container_name: elgg | |
| #build: . | |
| image: tyranwyn/elgg | |
| restart: always | |
| ports: | |
| - "127.0.0.1:6000:80" | |
| networks: | |
| - internal_network | |
| - external_network | |
| db: | |
| container_name: elgg-db | |
| image: mysql:8 | |
| restart: always | |
| networks: | |
| - internal_network | |
| - external_network | |
| ports: | |
| - "127.0.0.1:3306:3306" | |
| environment: | |
| - MYSQL_DATABASE=elgg | |
| - MYSQL_ROOT_PASSWORD=test | |
| volumes: | |
| - ./custom.cnf:/etc/mysql/conf.d/custom.cnf | |
| networks: | |
| external_network: | |
| internal_network: | |
| internal: true | 
  
    
      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:7.2-apache | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| libpng-dev \ | |
| zlib1g-dev \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && a2enmod rewrite \ | |
| && docker-php-source extract \ | |
| && docker-php-ext-install -j$(nproc) mysqli gd zip exif pdo_mysql \ | |
| && docker-php-source delete | |
| RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ | |
| && php -r "if (hash_file('SHA384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \ | |
| && php composer-setup.php --install-dir=/usr/bin --filename=composer \ | |
| && php -r "unlink('composer-setup.php');" | |
| RUN composer self-update \ | |
| && composer global require "fxp/composer-asset-plugin:~1.3" \ | |
| && composer create-project elgg/starter-project:dev-master . \ | |
| && composer install \ | |
| && composer install # 2nd call is currently required | |
| RUN chgrp -R www-data /var/www/html/ \ | |
| && chmod -R g+w /var/www/html/ | |
| RUN mkdir -p /home/elgg/data/ \ | |
| && chgrp -R www-data /home/elgg/data/ \ | |
| && chmod -R g+w /home/elgg/data/ | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment