Public | Automated Build

Last pushed: 3 years ago
Short Description
WWW server for foodcoopsystem developers
Full Description

Development environment for FoodCoopSystem

This repository includes docker container sources for a docker image including www server for foodcoopsystem developers. It's basically a Apache + PHP (5.6) server, but has some addons that might be usefull in foodcoopsystem (and probably any Drupal based) application.

Short specification

This image includes following tools:

  • Installed composer
  • Installed latest stable drush from 7.x branch
  • Installed development and profiling extensions like php5-xdebug and php5-xhprof.
  • Installed PHP 5.6 (as apache2 module and php5-cli).
  • Installed stack for functional testing (Selenium, dummy X server and firefox)


This is all port forwarding and access details you will need to work with docker.

  • SSH
    • Host ssh port: 9022
    • User: root
    • Password: root
  • DataBase
    • Host MySQL port: 3306
    • User: root
    • Password: root
    • Database: foodcoop
  • WWW
    • Host apache2 port: 80

If you are logged in to ssh service, host name for mysql server is "db". You can access those services, simple by specifing as your host and one of required ports.

Creating your docker environement (Ubuntu)

Note: This instruction will fail, if you have apache/nginx/\<other web server\> or mysql server running on your machine. This instruction assumes that ports 80 and 3306 are free. You can simply fix this just stopping your service. E.g. on ubuntu: sudo service apache2 stop and sudo service mysql stop

  1. Install docker:
  2. Install docker-compose:
  3. Install drush on your machine:
  4. Add alias for foodcoop and db container installation in your /etc/hosts file: sudo echo " db www.foodcoopsystem.local" >> /etc/hosts
  5. Copy drush/foodcoopsystem.aliases.drushrc.php into ~/.drush/ subdirectory (create it if it doesn't exist)
  6. Copy compose/docker-compose.yml file into your foodcoop codebase.
  7. Execute docker-compose up (This will pull dependencies and create all required containers).
  8. Copy your public key into www container: ssh-copy-id root@www.foodcoopsystem.local -p9022
  9. If you want to stop containers: docker-compose stop
  10. If you want to return to work, and start environement: docker-compose start

File docker-compose.yml will share app subdirectory from foodcoop codebase as /var/www directory at www container. You can use drush with alias `@foodcoopsystem.localwithout need to change to working directory so from any place in the system. E.g.: You can access it from you home dir$ cd ~; drush @foodcoopsystem.local status`


  • How to update image?
    • Use command: docker pull foodcoopsystem/dev-www:latest. This command wil update the image.
    • Go to FoodCoop codebase and run docker-compose up Here we rebuild the image and run system.
Docker Pull Command
Source Repository