diff --git a/docker-compose.yml b/docker-compose.yml index 8814157..3ca0a97 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -164,3 +164,19 @@ services: ports: - "1025:1025" - "8025:8025" + + mongo: + image: mongo + restart: always + environment: + MONGO_INITDB_ROOT_USERNAME: root + MONGO_INITDB_ROOT_PASSWORD: password + + mongo-express: + image: mongo-express + restart: always + ports: + - 8081:8081 + environment: + ME_CONFIG_MONGODB_ADMINUSERNAME: root + ME_CONFIG_MONGODB_ADMINPASSWORD: password diff --git a/php-cli/Dockerfile b/php-cli/Dockerfile index 04c0eae..49e3af8 100644 --- a/php-cli/Dockerfile +++ b/php-cli/Dockerfile @@ -29,3 +29,9 @@ RUN mkdir -p /var/www/.ssh && \ chmod 600 /var/www/.ssh/known_hosts CMD ["/bin/bash"] + +# enable libraries for mongodb +RUN apt-get install -y libcurl4-openssl-dev pkg-config libssl-dev \ + && pecl install mongodb \ + && docker-php-ext-enable mongodb \ + && pecl config-set php_ini /etc/php.ini diff --git a/php/Dockerfile b/php/Dockerfile index 6f4ac23..ab72d27 100644 --- a/php/Dockerfile +++ b/php/Dockerfile @@ -59,3 +59,9 @@ RUN echo '[Date]\ndate.timezone = "Australia/Melbourne"' >> /usr/local/etc/php/c COPY php.ini /usr/local/etc/php/php.ini COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini + +# enable libraries for mongodb +RUN apt-get install -y libcurl4-openssl-dev pkg-config libssl-dev \ + && pecl install mongodb \ + && docker-php-ext-enable mongodb \ + && pecl config-set php_ini /etc/php.ini \ No newline at end of file diff --git a/readme.md b/readme.md index a5993d2..c1c6377 100644 --- a/readme.md +++ b/readme.md @@ -82,6 +82,8 @@ The following can be included as needed in the `./du.sh` script. * __solr__: A solr 5.5 instance - TODO adding custom solr.xml and creating new cores. * __selenium__: remaps requests to symlocal back to the webserver container. * __mailhog__: mail capture, web interface. Available on `localhost:8025`. +* __mongo__: MongoDB image (This is dcocker official image - https://hub.docker.com/_/mongo) +* __mongo-express__: web based interface for mongoDB. Available on `localhost:8081`. (This is docker official image - https://hub.docker.com/_/mongo-express) Note for those containers below that have different versions, simply change the docker-compose file to reference the older version where needed.