Created
September 11, 2017 15:00
-
-
Save citizenrich/c5f315be6c75a21e52637ba9b916b3d0 to your computer and use it in GitHub Desktop.
iHRIS docker (WIP)
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
| localhost:8081 | |
| gzip | |
| tls self_signed | |
| fastcgi / 127.0.0.1:9000 |
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' | |
| services: | |
| ihris: | |
| build: . | |
| ports: | |
| - "9000:9000" | |
| links: | |
| - mysql:mysql | |
| mysql: | |
| image: mysql | |
| container_name: mysql | |
| ports: | |
| - 3306:3306 | |
| environment: | |
| MYSQL_ROOT_PASSWORD: "manage" | |
| MYSQL_DATABASE: "manage" | |
| MYSQL_USER: "manage" | |
| MYSQL_PASSWORD: "manage" | |
| web: | |
| image: abiosoft/caddy | |
| volumes: | |
| - "./Caddyfile:/etc/Caddyfile" | |
| - "$HOME/.caddy:/root/.caddy" | |
| links: | |
| - ihris:ihris | |
| ports: | |
| - "8081:8081" |
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:5.6-fpm | |
| # try php:5.6-fpm-alpine later for smaller image | |
| # still requires postfix or just use separate email server container? | |
| RUN apt-get update && apt-get install -y \ | |
| # have to install dependencies for modules | |
| libmcrypt-dev libpng-dev libtidy-dev libicu-dev \ | |
| # then install modules | |
| && docker-php-ext-install -j$(nproc) mcrypt mysql gd tidy intl | |
| # pecl modules | |
| RUN apt-get update && apt-get install -y \ | |
| # module dependencies | |
| uuid-dev \ | |
| # pecl modules | |
| && pecl install uuid apcu-4.0.11 \ | |
| && docker-php-ext-enable uuid apcu | |
| # no need to add apcu/uuid ini files as they are in /usr/local/etc/php/conf.d/ | |
| RUN apt-get install -y php-pear && pear install text_password | |
| RUN apt-get update && apt-get install -y libmemcached-dev zlib1g-dev \ | |
| && pecl install memcached-2.2.0 \ | |
| && docker-php-ext-enable memcached | |
| # FYI: WORKDIR defaults to /var/www/html | |
| RUN mkdir -p /var/lib/iHRIS/lib/4.2-dev | |
| WORKDIR /var/lib/iHRIS/lib/4.2-dev | |
| RUN apt-get install -y bzr bzrtools \ | |
| && bzr branch lp:i2ce/4.2 I2CE \ | |
| && bzr branch lp:textlayout/4.2 textlayout \ | |
| && bzr branch lp:ihris-common/4.2 ihris-common \ | |
| && bzr branch lp:ihris-manage/4.2 ihris-manage | |
| WORKDIR /var/lib/iHRIS/lib/4.2-dev/ihris-manage/sites/blank/pages | |
| RUN mkdir local && cp config.values.php local/ | |
| WORKDIR /var/lib/iHRIS/lib/4.2-dev/ihris-manage/sites/blank/pages/local | |
| RUN sed -i 's|"../../../../I2CE"|"/var/lib/iHRIS/lib/4.2-dev/I2CE"|' config.values.php \ | |
| # uncomment then change val | |
| && sed -i 's|//$i2ce_site_dsn|$i2ce_site_dsn|' config.values.php \ | |
| && sed -i "s|'mysql://john:pass@localhost/database'|'mysql://manage:manage@localhost/manage'|" config.values.php \ | |
| && sed -i 's|//$i2ce_site_module_config|$i2ce_site_module_config|' config.values.php \ | |
| && sed -i 's|"MY_SITE_MODULE.xml"|"/var/lib/iHRIS/lib/4.2-dev/ihris-manage/sites/blank/iHRIS-Manage-BLANK.xml"|' config.values.php | |
| WORKDIR /var/www/html | |
| RUN ln -s /var/lib/iHRIS/lib/4.2-dev/ihris-manage/sites/blank/pages manage | |
| EXPOSE 9000 | |
| CMD [ "php", "./index.php" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment