Giter Site home page Giter Site logo

cytopia / devilbox Goto Github PK

View Code? Open in Web Editor NEW
4.3K 111.0 639.0 48.96 MB

A modern Docker LAMP stack and MEAN stack for local development

Home Page: http://devilbox.org

License: MIT License

PHP 53.49% CSS 0.89% Shell 44.49% Batchfile 0.02% Makefile 1.02% JavaScript 0.09%
docker lamp lemp mysql apache nginx devilbox php mariadb postgresql

devilbox's Introduction

The Devilbox

Devilbox

Quickstart | Examples | Features | The Devilbox Stack | Community | Contributing | Logos | License

Devilbox Release Discord Discourse License

The Devilbox is a versatile and highly customisable zero-conf PHP Docker stack supporting LEMP and MEAN as well as Websockets, Node, Python and Golang via automated Reverse Proxy integraton.

The main goal is to provide a reproducible development environment that runs on all major platforms and is able to switch and combine any version you need. It supports an unlimited number of projects for which vhosts, SSL certificates and DNS records are created automatically. Email interception and popular development tools will be at your service as well. Configuration is not necessary, as everything is already pre-setup.

All created projects (frontend or backend) will be able to communicate with one another to support the emulation of a complete microservice architecture or an API landscape.

Available Architectures: amd64, arm64
Available PHP Versions: 5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2

🚀 Quickstart

❗ System Requirements
The Devilbox runs on all major operating systems and its only requirement is Docker and Docker Compose:

Linux OSX Windows Plus Docker

Be up and running in 2 minutes.

🚀 Install and Run: Linux

Linux: Install

  1. Download the Devilbox
    git clone https://github.com/cytopia/devilbox
  2. Enter the Devilbox git directory
    cd devilbox
  3. Copy the default environment file
    cp env-example .env

Linux: Run

⚠️ Important: Ensure that nothing is listening on port 80 and 443 on your host system. These ports are required by the Devilbox webserver.


  1. Start httpd, php and mysql container
    # This step may take a few minutes as required
    # Docker images have to be pulled initially.
    
    # Inside the Devilbox git directory
    docker-compose up httpd php mysql
  2. Visit http://localhost in your browser

🚀 Install and Run: MacOS

MacOS: Install

  1. Download the Devilbox
    git clone https://github.com/cytopia/devilbox
  2. Enter the Devilbox git directory
    cd devilbox
  3. Copy the default environment file
    cp env-example .env

MacOS: Run

⚠️ Important: Ensure that nothing is listening on port 80 and 443 on your host system. These ports are required by the Devilbox webserver.


  1. Start httpd, php and mysql container
    # This step may take a few minutes as required
    # Docker images have to be pulled initially.
    
    # Inside the Devilbox git directory
    docker-compose up httpd php mysql
  2. Visit http://localhost in your browser

🚀 Install and Run: Windows
Note: If you are using WSL2, refer to the Linux guide instead.

Windows: Install

  1. Clone https://github.com/cytopia/devilbox to C:\devilbox with Git for Windows
  2. Copy C:\devilbox\env-example to C:\devilbox.env

Windows: Run

⚠️ Important: Ensure that nothing is listening on port 80 and 443 on your host system. These ports are required by the Devilbox webserver.

Open a terminal on Windows and start httpd, php and mysql container:

  1. Start httpd, php and mysql container
    # This step may take a few minutes as required
    # Docker images have to be pulled initially.
    
    # Inside the Devilbox git directory
    docker-compose up httpd php mysql
  2. Visit http://localhost in your browser

💻 Enter the work container

Enter the work container

The Devilbox allows you to work on your projects on the host system as well as inside the work container. Your project files will be available at both locations. The workflow ususally is:

  1. Use your prefered IDE (e.g. PhpStorm) on your host system to add and alter files
  2. Work inside the container to run common cli tools such as node, composer, npm, phpcs, webpack and many more.

To enter the work container, simply run ./shell.sh

  1. On Linux, MacOS and Windows with WSL2
    # Inside the Devilbox git directory
    ./shell.sh
  2. On Windows without WSL2
    # Inside the Devilbox git directory
    ./shell.bat

💡 Examples

Create your first project:

Example: Dummy Project
  1. Start the container you need:
    docker-compose up httpd php mysql
  2. Enter the work container:
    ./shell.sh
  3. Navigate to /shared/httpd:
    cd /shared/httpd
  4. Create your project directory
    mkdir dummy-project
  5. Visit http://localhost/vhosts.php
    You will notice that you need to create a htdocs/ directory
  6. Create htdocs/ directory
    # Navigate to your project directory
    cd /shared/httpd/dummy-project
    
    # Create htdocs dir
    mkdir htdocs
  7. Visit http://localhost/vhosts.php
    You will see that everything is now setup and your project is created and available
  8. Create an index.php file
    # Navigate to your project htdocs directory
    cd /shared/httpd/dummy-project/htdocs
    
    # Create a simple index.php file
    echo '<?php echo "it works";' > index.php
  9. View your project in the browser: http://dummy-project.dvl.to

Example: PHP Framework

Find all the examples in the documentation:

Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox

⭐ Features

The Devilbox tries to be a zero-configuration stack out of the box and has automated all the boring tasks. Additionally it provides common feature required for everyday work.

Automation
Automated Project creation
Automated SSL
Automated DNS
Host permission sync
Modes
Static files
PHP files
Reverse Proxy
Websockets
Backends
PHP-FPM
NodeJS
Python
Golang
...
Profiling
Blackfire
Xdebug
XHProf
Projects
Unlimited Projects
Inter-Project Communication
Custom Project domains
Valid browser HTTPS
Intranet
Virtual Hosts
C&C
Email Reader
OpCache Gui
Batteries
Adminer
phpMyAdmin
phpPgAdmin
phpRedMind
Services
SQL
NoSQL
Cache
...

The Devilbox Stack The Devilbox Stack

The Devilbox aims to be a swiss army knife for local development by providing you all the services you would ever need. To get an idea about the architecture behind it and to also see what's available have a look at its components and usage.

Smallest stack

This is the smallest possible and fully functional stack you can run

Full stack

To better understand what is actually possible have a look at the full example

💻 Modes of operation

Modes of operation

You can startup and operate the Devilbox in three different ways via docker-compose:

  1. Selective startup
  2. On Demand (add/remove container while running)
  3. Full startup

Selective startup

If you already know what kind of container you need before starting the Devilbox, you can just specify them explicitly.

# Inside the Devilbox git directory start httpd php mysql and redis
docker-compose up httpd php mysql redis

The Intranet will show you what container you have currently running:

Devilbox

On Demand

If the Devilbox is already started you can attach more container on-the-fly,

# Inside the Devilbox git directory attach mongo and memcached
docker-compose up mongo memcd

You can also shut down specific containers that you do not need

# Inside the Devilbox git directory shutdown redis
docker-compose stop redis

Full startup

If you just want to start everything, run docker-compose up without any arguments

# Inside the Devilbox git directory start them all
docker-compose up

The Intranet will show you what container you have currently running:

Devilbox

If you prefer a visual guide, have a look at the two introduction videos on Youtube:

Documentation: Install the Devilbox | Start the Devilbox | .env file


🐋 Available Container

Available Container

The following table lists all integrated and pre-configured Docker container shipped by the Devilbox. Only the webserver and PHP container are mandatory, all others are optional and don't need to be started.

Each of them is also available in multiple different versions in order to reflect your exact desired environment.

Accel Web App SQL NoSQL Queue / Search ELK Utils
HAProxy Apache PHP MariaDB Memcached RabbitMQ ElasticSearch Bind
Varnish Nginx Python (Flask) MySQL MongoDB Solr Logstash Blackfire
PerconaDB Redis Kibana MailHog
PostgreSQL Ngrok

Documentation: Available Container


📌 Version Matrix

Version Matrix

Every single attachable container comes with many different versions. In order to select the desired version for a container, simply edit the .env file and uncomment the version of choice. Any combination is possible.

Run different versions

Apache Nginx PHP MySQL MariaDB Percona PgSQL Redis Memcached MongoDB
2.2 stable 5.2[1] 5.5 5.5 5.5 9.0 2.8 1.4 2.8
2.4 mainline 5.3 5.6 10.0 5.6 9.1 3.0 1.5 3.0
5.4 5.7 10.1 5.7 9.2 3.2 1.6 3.2
5.5 8.0 10.2 8.0 9.3 4.0 latest 3.4
5.6 10.3 9.4 5.0 3.6
7.0 10.4 9.5 6.0 4.0
7.1 10.5 9.6 6.2 4.2
7.2 10.6 10 7.0 4.4
7.3 10.7 11 latest 5.0
7.4 10.8 12 latest
8.0 10.9 ...
8.1 10.10 15
8.2 latest

[1] PHP 5.2 is available to use, but it is not officially supported. The Devilbox intranet does not work with this version as PHP 5.2 does not support namespaces. Furthermore PHP 5.2 does only work with Apache 2.4, Nginx stable and Nginx mainline. It does not work with Apache 2.2. Use at your own risk.

Documentation: Change container versions

Additional services

Additionally to the default stack, there are a variety of other services that can be easily enabled and started.

Python (Flask) Blackfire ELK MailHog Ngrok RabbitMQ Solr HAProxy Varnish
2.7 1.8 5.x.y v1.0.0 2.x 3.6 5 1.x 4
... ... 6.x.y latest 3.7 6 5
3.7 1.18.0 7.x.y latest 7 6
3.8 latest latest latest

Documentation: Enable custom container


⚙️ Available PHP Extensions

Available PHP Extensions

The Devilbox is a development stack, so it is made sure that a lot of PHP modules are available out of the box in order to work with many different frameworks.

  • Core enabled (cannot be disabled):
  • Enabled (can be disabled): 🗸
  • Available, but disabled (can be enabled): d

Modules PHP 5.2 PHP 5.3 PHP 5.4 PHP 5.5 PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2 PHP 7.3 PHP 7.4 PHP 8.0 PHP 8.1 PHP 8.2
amqp 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
apc 🗸 🗸 🗸 🗸
apcu 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
bcmath 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
blackfire d d d d d d d
bz2 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
calendar 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
ctype
curl
date
dba 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
dom
enchant 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
ereg
exif 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
FFI 🗸
fileinfo 🗸
filter
ftp
gd 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
gettext 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
gmp 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
hash
iconv
igbinary 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
imagick 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
imap 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
interbase 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
intl 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
ioncube d d d d d d d
json
ldap 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
libxml
lz4 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
lzf 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
mbstring
mcrypt 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
memcache 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
memcached 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
mhash
mongo 🗸 🗸 🗸 🗸 🗸
mongodb 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
msgpack 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
mysql 🗸 🗸 🗸 🗸 🗸
mysqli 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
mysqlnd
OAuth 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
oci8 d d d d d d d d d d d d
OPcache 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
openssl
pcntl 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
pcre
PDO
pdo_dblib 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
PDO_Firebird 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
pdo_mysql 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
PDO_OCI d d d d d d d d
pdo_pgsql 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
pdo_sqlite
pdo_sqlsrv d d d d d d d d
pgsql 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
phalcon d d d d d d d d d d d
Phar 🗸
posix
pspell 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
psr d d d d d d d d d d d
random
rdkafka d d d d d d d d d d d d
readline
recode 🗸 🗸 🗸 🗸 🗸
redis 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
Reflection
session
shmop 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
SimpleXML
snmp 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
soap 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
sockets 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
sodium
solr 🗸 🗸 🗸 🗸 🗸 🗸
SPL
sqlite
sqlite3
sqlsrv d d d d d d d d
ssh2 🗸 🗸 🗸 🗸 🗸
swoole d d d d d d d d d d d
sysvmsg 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
sysvsem 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
sysvshm 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
tidy 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
tokenizer
uploadprogress 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
uuid 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
vips 🗸 🗸 🗸 🗸 🗸 🗸 🗸
wddx 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
Xdebug 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
xhprof d d d d d d d d
xlswriter 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
xml
xmlreader
xmlrpc 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
xmlwriter
xsl 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
yaml 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
zip 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸
zlib
zstd 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸

  • Core enabled (cannot be disabled):
  • Enabled (can be disabled): 🗸
  • Available, but disabled (can be enabled): d

PHP modules can be enabled or disabled on demand to reflect the state of your target environment.

Documentation: Enable/disable PHP modules


🛠️ Available CLI Tools

Available Tools

Well-known and popular tools will be at your service:

Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox

Tool PHP 5.2 PHP 5.3 PHP 5.4 PHP 5.5 PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2 PHP 7.3 PHP 7.4 PHP 8.0 PHP 8.1 PHP 8.2
angular-cli
asgardcms
awesome-ci
codeception
composer
corepack
deployer
eslint
git
git-flow
grunt-cli
gulp
jq
jsonlint
laravel-installer
laravel-lumen
linkcheck
mdl
mdlint
mupdf-tools
net-tools
node
npm
nvm
phalcon-devtools
php-cs-fixer
phpcbf
phpcs
phpmd
phpunit
pip
pm2
pwncat
rsync
sass
shellcheck
ssh
stylelint
svn
symfony-cli
taskfile
tig
vim
vue-cli
webpack-cli
wkhtmltopdf
wp-cli
wscat
yamllint
yarn
yq
zsh

🔌 Supported Frameworks

Supported Frameworks

PHP Frameworks

As far as tested there are no limitations and you can use any Framework or CMS just as you would on your live environment. Below are a few examples of extensively tested Frameworks and CMS:

Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox

Documentation:
Setup CakePHP | Setup CodeIgniter | Setup Contao | Setup CraftCMS | Setup Drupal | Setup Joomla | Setup Laravel | Setup Magento 2 | Setup PhalconPHP | Setup PhotonCMS | Setup PrestaShop | Setup ProcessWire | Setup Shopware | Setup Symfony | Setup Typo3 | Setup WordPress | Setup Yii | Setup Zend

Reverse Proxy Applications

As far as tested there are no limitations and you can use any application that creates an open port. These ports will be reverse proxied by the web server and even allow you to use valid HTTPS for them. By the built-in autostart feature of the Devilbox you can ensure that your application automatically starts up as soon as you run docker-compose up.

NodeJS Python Flask Sphinx

Documentation:
Setup reverse proxy NodeJs | Setup reverse proxy Sphinx documentation


🌐 Devilbox Intranet

Devilbox Intranet

The Devilbox comes with a pre-configured intranet on http://localhost and https://localhost. This can be explicitly disabled or password-protected. The intranet will not only show you, the chosen configuration, but also validate the status of the current configuration, such as if DNS records exists (on host and container), are directories properly set-up. Additionally it provides external tools to let you interact with databases and emails.

  • Virtual Host overview (validates directories and DNS)
  • Command & Control
  • Email overview
  • Database overview (MySQL, PgSQL, Redis, Memcache, ...)
  • Info pages (Httpd, MySQL, PgSQL, Redis, Memcache, ...)
  • And many more...

The following batteries are available in the Devilbox intranet by default:

Adminer phpMyAdmin phpPgAdmin phpRedMin PHPMemcachedAdmin OpCacheGUI Mail viewer
Adminer phpMyAdmin phpPgAdmin phpRedMin PHP Memcached Admin OpCache GUI Mail viewer

Documentation: Devilbox Intranet


📸 Screenshots

Screenshots

A few examples of how the built-in intranet looks like.

Intranet: Home Intranet: Vhost Intranet: Database
Intranet: Emails

👫 Community

The Devilbox has a lot of features reaching from a simple single-user development environment that works out of the box up to a shared development infrastructure for a corporate network.

In order to be aware about all that features, ensure to have skimmed over the documentation, so you know what can be done and how that might simplify your every-day life. If you ever run into any unforseen issues, feel free to join the Discord chat or visit the forums and get community support quickly.

devilbox.readthedocs.io discord/devilbox devilbox.discourse.group github.com/devilbox/flames

🤝 Contributing

The Devilbox is still a young project with a long roadmap ahead. Features are decided by you - the community, so any kind of contribution is welcome.

  • Star this project
  • Open up issues for bugs and feature requests
  • Clone this project and submit fixes or features

🧘 Maintainer

I try to keep up with literally over 100 projects. If my work is making your life easier, consider sending coffee or beer. 🖤

Contributions: PyPI: cytopia · Terraform: cytopia · Ansible: cytopia

🌀 Logos

Logos and banners can be found at devilbox/artwork. Feel free to use or modify them by the terms of their license.

🗎 License

MIT License

Copyright (c) 2016 cytopia

devilbox's People

Contributors

9034725985 avatar agnohendrix avatar alikon avatar bplus avatar cytopia avatar ericp-mrel avatar felixmosh avatar ibnuh avatar kenjis avatar llaville avatar merlijnvanlent avatar michaelmillar avatar minhchu avatar mjherraiz avatar mmcev106 avatar mrbig00 avatar mrcrayon avatar nickw108 avatar pbearne avatar pedrosanta avatar pniederlag avatar pnoeric avatar polo2ro avatar rafaelstz avatar remo avatar sonyarianto avatar theglenn88 avatar tyrann0us avatar xmarkclx avatar ztickm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devilbox's Issues

Docs about Composer usage

Could you please write the documentation section how to install & run Composer & also run another PHP & MySQL console commands.

Writing to /etc/hosts

I'm having an issue with VirtualHosts not writing into /etc/hosts. Any advice on settings I should be looking into?

logs.zip

  • Pull latest dockers (e.g.: docker pull cytopia/<used_docker>) before running docker-compose up
  • Specify used docker versions (php, web and database)
  • Attach logs for php, mysql and webserver (found in log/ directory)
  • Start with debug mode and attach docker-compose output (.env setting DEBUG_COMPOSE_ENTRYPOINT=1)
  • Never use different mysql|mariadb versions on the same HOST_PATH_TO_MYSQL_DATADIR on existing database files. Different mysql|mariadb versions might upgrade/corrupt existing database files. If you have done that already, start with a different path of HOST_PATH_TO_MYSQL_DATADIR (to an empty directory) and try again.

Please also specify the following info:

  • [OSX] Which operating system are you at (Linux, OSX or Windows)
  • [1.12.5] docker version
  • [1.90] docker-compose version

Not working after update to 0.9

All working, its my mistake. see comment

After update to 0.9, "docker-compose up" won't work anymore.

$ docker-compose up
WARNING: The PGSQL_ROOT_USER variable is not set. Defaulting to a blank string.
WARNING: The PGSQL_ROOT_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The PGSQL_SERVER variable is not set. Defaulting to a blank string.
WARNING: The HOST_PATH_PGSQL_DATADIR variable is not set. Defaulting to a blank string.
WARNING: The HOST_PORT_PGSQL variable is not set. Defaulting to a blank string.
WARNING: The HOST_PATH_HTTPD_DATADIR variable is not set. Defaulting to a blank string.
WARNING: The HOST_PORT_MEMCD variable is not set. Defaulting to a blank string.
WARNING: The MEMCD_SERVER variable is not set. Defaulting to a blank string.
WARNING: The HOST_PORT_BIND variable is not set. Defaulting to a blank string.
WARNING: The HOST_PATH_MYSQL_DATADIR variable is not set. Defaulting to a blank string.
Creating network "devilbox_app_net" with driver "bridge"
Creating devilbox_bind_1 ... 
Creating devilbox_bind_1 ... done
Creating devilbox_php_1 ... 
Creating devilbox_php_1 ... error

ERROR: for devilbox_php_1  Cannot create container for service php: create .: volume name is too short, names should be at least two alphanumeric characters

ERROR: for php  Cannot create container for service php: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: Encountered errors while bringing up the project.

  • Pull latest dockers (e.g.: docker pull cytopia/<used_docker>)
    cytopia/mysql-5.7 0.9 5c982535f75d 25 hours ago 1.28 GB
    cytopia/php-fpm-7.0 0.9 82ba5f8da78c 25 hours ago 605 MB
    cytopia/apache-2.4 0.9 c603d612adb4 25 hours ago 365 MB
    cytopia/mysql-5.7 latest 5dd6c258b463 27 hours ago 1.28 GB
    cytopia/apache-2.4 latest bc2a2d3ea891 27 hours ago 365 MB
    cytopia/php-fpm-7.0 latest 3813610ad2ee 28 hours ago 605 MB

  • Which operating system are you at (Linux, OSX or Windows)

Linux more 4.4.0-75-generic #96-Ubuntu SMP Thu Apr 20 09:56:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • docker version
Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:14:09 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:14:09 2017
 OS/Arch:      linux/amd64
 Experimental: false
  • docker-compose version
docker-compose version 1.13.0-rc1, build 38af513
docker-py version: 2.2.1
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t  3 May 2016

My .env file:

###
###  ---------------------------------------------------
###  D E V I L B O X   R U N - T I M E   S E T T I N G S
###  ---------------------------------------------------
###
###  All the following settings are applied during
###  $ docker-compose up
###
###  No need to rebuild any dockers!
###

###
### Show all executed commands in each
### docker image during docker-compose up?
###
### 1: Yes
### 0: No
DEBUG_COMPOSE_ENTRYPOINT=1



###
### Relative or absolute path to the devilbox repository.
### (Used as a prefix for all mount paths)
### There is no need to change this.
###
### The only exception is for OSX users wanting to use NFS
### mounts instead of Filesystem mounts due to degraded performance
### on OSX.
###
DEVILBOX_PATH=.


###
### At what IP address should the docker services listen
### on the Host computer?
###
### The specified default should be fine for Linux and OSX (127.0.0.1:).
### If you are on windows, you will probably have to change
### it to the IP address of the docker machine.
###
### a.) Leave blank, to listen on all interfaces (no trailing color ':')
###    LOCAL_LISTEN_ADDR=
### b.) If an IP is specified, note the trailing colon ':'
###    LOCAL_LISTEN_ADDR=127.0.0.1:
###
LOCAL_LISTEN_ADDR=127.0.0.1:


################################################################################
###
### 1. Choose Images (Version)
###
################################################################################

###
### You can choose any combination of httpd, mysql, postgresql or php.
### Each of them are fully compatible between one another.
###


###
### 1.1 Choose HTTP Server Image
###
#HTTPD_SERVER=apache-2.2
HTTPD_SERVER=apache-2.4
#HTTPD_SERVER=nginx-stable
#HTTPD_SERVER=nginx-mainline

###
### 1.2 Choose MySQL Server Image
###
#MYSQL_SERVER=mysql-5.5
#MYSQL_SERVER=mysql-5.6
MYSQL_SERVER=mysql-5.7
#MYSQL_SERVER=mysql-8.0
#MYSQL_SERVER=mariadb-5.5
#MYSQL_SERVER=mariadb-10.0
#MYSQL_SERVER=mariadb-10.1
#MYSQL_SERVER=mariadb-10.2
#MYSQL_SERVER=mariadb-10.3

###
### 1.3 Choose PostgreSQL Server Image
###
#POSTGRES_SERVER=9.1
#POSTGRES_SERVER=9.2
#POSTGRES_SERVER=9.3
#POSTGRES_SERVER=9.4
#POSTGRES_SERVER=9.5
POSTGRES_SERVER=9.6

###
### 1.4 Choose PHP Server Image
###
#PHP_SERVER=php-fpm-5.4
#PHP_SERVER=php-fpm-5.5
#PHP_SERVER=php-fpm-5.6
PHP_SERVER=php-fpm-7.0
#PHP_SERVER=php-fpm-7.1
#PHP_SERVER=hhvm-latest


###
### 1.5 Choose Redis Server Image
###     (only for docker-compose.optional.yml)
###     $ docker-compose -f docker-compose.optional.yml up
###
#REDIS_SERVER=2.8
#REDIS_SERVER=3.0
REDIS_SERVER=3.2


###
### 1.6 Timezone for all dockers and service config files
###
TIMEZONE=Europe/Moscow



################################################################################
###
### 2. Host Mounts (Your computer)
###
################################################################################

###
### Local filesystem path to www projects.
###
HOST_PATH_TO_WWW_DOCROOTS=/home/neo/server

###
### Local filesystem path to mysql/mariadb datadir.
###
### This can be an existing mysql data directory or empty.
### If it already is a mysql data directory with content,
### it will be mounted into the docker and used.
###
### If this directory is empty, a new mysql database will be
### created.
###
### Note: Inside this path, a subdirectory with the mysql|mariadb
###       version will be created where the actual data resides.
###       This is to protect databases from being altered by
###       newer or older mysql|mariadb server versions.
###
HOST_PATH_TO_MYSQL_DATADIR=./data/mysql

###
### Local filesystem path to postgresql datadir.
###
### This can be an existing postgresql data directory or empty.
### If it already is a postgresql data directory with content,
### it will be mounted into the docker and used.
###
### If this directory is empty, a new postgresql database will be
### created.
###
### Note: Inside this path, a subdirectory with the postgresql
###       version will be created where the actual data resides.
###       This is to protect databases from being altered by
###       newer or older postgres server versions.
HOST_PATH_TO_POSTGRES_DATADIR=./data/pgsql



################################################################################
###
### 3. HTTP Docker Settings
###
################################################################################

###
### Expose HTTPD Port to Host
###
HOST_PORT_HTTPD=80


################################################################################
###
### 4. MySQL Docker Settings
###
################################################################################

###
### MySQL root user password
###
### If $HOST_PATH_TO_MYSQL_DATADIR already contains an existing
### mysql datadir, enter the password for the existing mysql database
###
### If $HOST_PATH_TO_MYSQL_DATADIR is empty, choose a new password that
### will be applied
###
MYSQL_ROOT_PASSWORD=

###
### Custom MySQL Runtime Settings
###
MYSQL_GENERAL_LOG=1

###
### Expose MySQL Port to Host
###
HOST_PORT_MYSQL=3306



################################################################################
###
### 5. PostgreSQL Docker Settings
###
################################################################################

###
### PostgreSQL 'root' user name (usually postgres)
###
POSTGRES_USER=postgres

###
### PostgreSQL 'root' user password
###
POSTGRES_PASSWORD=

###
### Expose MySQL Port to Host
###
HOST_PORT_POSTGRES=5432


################################################################################
###
### 6. PHP-FPM Docker Settings
###
################################################################################

###
### Xdebug
###

# Enable/Disable Xdebug
PHP_XDEBUG_ENABLE=1

# Your local port (your computer host [not the docker])
# where your ide/editor is listening for xdebug connections.
PHP_XDEBUG_REMOTE_PORT=9000

# Your local IP address (your computer host [not the docker])
# where your ide/editor is listening for xdebug connections.
PHP_XDEBUG_REMOTE_HOST=172.20.10.2
## TODO: Check if it works by automatically sending it to the broadcast address



################################################################################
###
### 7. Redis Docker Settings
###
################################################################################

###
### Expost Redis Port to Host
###
HOST_PORT_REDIS=6379

phpmyadmin not working

now adminer is ok, phpmyadmin is not.

containers:

9de540fcb0cd        cytopia/mysql-5.7:0.9     "/docker-entrypoin..."   5 hours ago         Up 5 hours          127.0.0.1:3306->3306/tcp                     devilbox_mysql_1
4bdbec57bd5c        cytopia/apache-2.4:0.9    "/docker-entrypoin..."   5 hours ago         Up 5 hours          127.0.0.1:80->80/tcp                         devilbox_httpd_1
a2d7362d18e1        cytopia/php-fpm-7.0:0.9   "/docker-entrypoin..."   5 hours ago         Up 5 hours          9000/tcp                                     devilbox_php_1
cf1aed406f1a        cytopia/bind:latest       "/docker-entrypoin..."   5 hours ago         Up 5 hours          127.0.0.1:54->53/tcp, 127.0.0.1:54->53/udp   devilbox_bind_1

http://127.0.0.1/vendor/phpmyadmin-4.7/index.php

( ! ) Fatal error: Uncaught UnexpectedValueException: Overloading of string functions using mbstring.func_overload is not supported by phpseclib. in /var/www/default/htdocs/vendor/phpmyadmin-4.7/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php on line 11
( ! ) UnexpectedValueException: Overloading of string functions using mbstring.func_overload is not supported by phpseclib. in /var/www/default/htdocs/vendor/phpmyadmin-4.7/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php on line 11
Call Stack
#	Time	Memory	Function	Location
1	0.0001	376512	{main}( )	.../index.php:0
2	0.0001	383984	require_once( '/var/www/default/htdocs/vendor/phpmyadmin-4.7/libraries/common.inc.php' )	.../index.php:19
3	0.0001	384992	require_once( '/var/www/default/htdocs/vendor/phpmyadmin-4.7/vendor/autoload.php' )	.../common.inc.php:85
4	0.0002	385648	ComposerAutoloaderInit7033babd32da3410d35a338a5cac8c30::getLoader( )	.../autoload.php:7
5	0.0004	392216	composerRequire7033babd32da3410d35a338a5cac8c30( )	.../autoload_real.php:60
6	0.0004	392464	require( '/var/www/default/htdocs/vendor/phpmyadmin-4.7/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php' )	.../autoload_real.php:70

my conf, version, etc still same from #61

Duplication of env variables passed to docker-compose

There is no need to mention value of env vars in docker-compose, it will automatically pass it to service, it will take from .env automatically:

i.e. instead of
environment:
- DEBUG_COMPOSE_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}

do
environment:
- DEBUG_COMPOSE_ENTRYPOINT

No Host DNS record found

The Virtual Hosts menu option lists all my projects with a ERR message:

No Host DNS record found. Add the following to /etc/hosts:
127.0.0.1 domain.loc

Because I'm running under Windows 10, my hosts file uses the default VirtualBox IP Address:

192.168.99.100  domain.loc

However the project loads normally without any problems, only the host list of devilbox shows this error and with no apparent side effects.

localhost on Windows 10 not found

If you encounter a bug and something does not work, make sure you have done the following and check those boxes before submitting an issue - thank you!

  • Pull latest dockers (e.g.: docker pull cytopia/<used_docker>) before running docker-compose up
  • Specify used docker versions (php, web and database)
  • Attach logs for php, mysql and webserver (found in log/ directory)
  • Start with debug mode and attach docker-compose output (.env setting DEBUG_COMPOSE_ENTRYPOINT=1)
  • Never use different mysql|mariadb versions on the same HOST_PATH_TO_MYSQL_DATADIR on existing database files. Different mysql|mariadb versions might upgrade/corrupt existing database files. If you have done that already, start with a different path of HOST_PATH_TO_MYSQL_DATADIR (to an empty directory) and try again.

Please also specify the following info:

  • [Windows 10] Which operating system are you at (Linux, OSX or Windows)
  • [1.12.0] docker version
  • [1.8.0] docker-compose version

Hi, nice job. It works flawless under Debian (VirtualBox on Windows), but does not work on Windows Host with Docker-Machine.

In Webbrowser (Chrome, Firefox, Edge): "http://localhost can not be found".

Maybe I am missing something?

Failed to start on macOS

If you encounter a bug and something does not work, make sure you have done the following and check those boxes before submitting an issue - thank you!

  • Pull latest dockers (e.g.: docker pull cytopia/<used_docker>) before running docker-compose up
  • Specify used docker versions (php, web and database)
  • Attach logs for php, mysql and webserver (found in log/ directory)
  • Start with debug mode and attach docker-compose output (.env setting DEBUG_COMPOSE_ENTRYPOINT=1)
  • Never use different mysql|mariadb versions on the same HOST_PATH_TO_MYSQL_DATADIR on existing database files. Different mysql|mariadb versions might upgrade/corrupt existing database files. If you have done that already, start with a different path of HOST_PATH_TO_MYSQL_DATADIR (to an empty directory) and try again.

Please also specify the following info:

  • [ macOS] Which operating system are you at (Linux, OSX or Windows)
  • [17.03.1-ce ] docker version
  • [1.11.2, build dfed245] docker-compose version

Start log:

WARNING: The POSTGRES_SERVER variable is not set. Defaulting to a blank string.
Pulling postgres (postgres:latest)...
latest: Pulling from library/postgres
Digest: sha256:3b51a72ca2642f24fa782c2fb99ddb0d29cbcd38f32639c98a80966a25ae2a64
Status: Image is up to date for postgres:latest
Starting devilbox_mysql_1
Pulling postgres (postgres:latest)...
latest: Pulling from library/postgres
Digest: sha256:3b51a72ca2642f24fa782c2fb99ddb0d29cbcd38f32639c98a80966a25ae2a64
Status: Image is up to date for postgres:latest

ERROR: for postgres  Image 'postgres:' not found
Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose/cli/main.py", line 64, in main
  File "compose/cli/main.py", line 116, in perform_command
  File "compose/cli/main.py", line 876, in up
  File "compose/project.py", line 416, in up
  File "compose/parallel.py", line 66, in parallel_execute
compose.service.NoSuchImageError: Image 'postgres:' not found
Failed to execute script docker-compose

.env file:

###
###  ---------------------------------------------------
###  D E V I L B O X   R U N - T I M E   S E T T I N G S
###  ---------------------------------------------------
###
###  All the following settings are applied during
###  $ docker-compose up
###
###  No need to rebuild any dockers!
###

###
### Show all executed commands in each
### docker image during docker-compose up?
###
### 1: Yes
### 0: No
DEBUG_COMPOSE_ENTRYPOINT=1



###
### Relative or absolute path to the devilbox repository.
### (Used as a prefix for all mount paths)
### There is no need to change this.
###
### The only exception is for OSX users wanting to use NFS
### mounts instead of Filesystem mounts due to degraded performance
### on OSX.
###
DEVILBOX_PATH=.


###
### At what IP address should the docker services listen
### on the Host computer?
###
### The specified default should be fine for Linux and OSX (127.0.0.1:).
### If you are on windows, you will probably have to change
### it to the IP address of the docker machine.
###
### a.) Leave blank, to listen on all interfaces (no trailing color ':')
###    LOCAL_LISTEN_ADDR=
### b.) If an IP is specified, note the trailing colon ':'
###    LOCAL_LISTEN_ADDR=127.0.0.1:
###
LOCAL_LISTEN_ADDR=127.0.0.1:


################################################################################
###
### 1. Choose Images (Version)
###
################################################################################

###
### You can choose any combination of httpd, mysql, postgresql or php.
### Each of them are fully compatible between one another.
###


###
### 1.1 Choose HTTP Server Image
###
#HTTPD_SERVER=apache-2.2
#HTTPD_SERVER=apache-2.4
HTTPD_SERVER=nginx-stable
#HTTPD_SERVER=nginx-mainline

###
### 1.2 Choose MySQL Server Image
###
#MYSQL_SERVER=mysql-5.5
#MYSQL_SERVER=mysql-5.6
#MYSQL_SERVER=mysql-5.7
MYSQL_SERVER=mysql-8.0
#MYSQL_SERVER=mariadb-5.5
#MYSQL_SERVER=mariadb-10.0
#MYSQL_SERVER=mariadb-10.1
#MYSQL_SERVER=mariadb-10.2
#MYSQL_SERVER=mariadb-10.3

###
### 1.3 Choose PostgreSQL Server Image
###
#POSTGRES_SERVER=9.1
#POSTGRES_SERVER=9.2
#POSTGRES_SERVER=9.3
#POSTGRES_SERVER=9.4
#POSTGRES_SERVER=9.5
#POSTGRES_SERVER=9.6

###
### 1.4 Choose PHP Server Image
###
#PHP_SERVER=php-fpm-5.4
#PHP_SERVER=php-fpm-5.5
#PHP_SERVER=php-fpm-5.6
#PHP_SERVER=php-fpm-7.0
PHP_SERVER=php-fpm-7.1
#PHP_SERVER=hhvm-latest


###
### 1.5 Choose Redis Server Image
###     (only for docker-compose.optional.yml)
###     $ docker-compose -f docker-compose.optional.yml up
###
#REDIS_SERVER=2.8
#REDIS_SERVER=3.0
REDIS_SERVER=3.2


###
### 1.6 Timezone for all dockers and service config files
###
TIMEZONE=Europe/Moscow



################################################################################
###
### 2. Host Mounts (Your computer)
###
################################################################################

###
### Local filesystem path to www projects.
###
HOST_PATH_TO_WWW_DOCROOTS=~/Projects/

###
### Local filesystem path to mysql/mariadb datadir.
###
### This can be an existing mysql data directory or empty.
### If it already is a mysql data directory with content,
### it will be mounted into the docker and used.
###
### If this directory is empty, a new mysql database will be
### created.
###
### Note: Inside this path, a subdirectory with the mysql|mariadb
###       version will be created where the actual data resides.
###       This is to protect databases from being altered by
###       newer or older mysql|mariadb server versions.
###
HOST_PATH_TO_MYSQL_DATADIR=/Users/uonick/mysql80

###
### Local filesystem path to postgresql datadir.
###
### This can be an existing postgresql data directory or empty.
### If it already is a postgresql data directory with content,
### it will be mounted into the docker and used.
###
### If this directory is empty, a new postgresql database will be
### created.
###
### Note: Inside this path, a subdirectory with the postgresql
###       version will be created where the actual data resides.
###       This is to protect databases from being altered by
###       newer or older postgres server versions.
HOST_PATH_TO_POSTGRES_DATADIR=./data/pgsql



################################################################################
###
### 3. HTTP Docker Settings
###
################################################################################

###
### Expose HTTPD Port to Host
###
HOST_PORT_HTTPD=80


################################################################################
###
### 4. MySQL Docker Settings
###
################################################################################

###
### MySQL root user password
###
### If $HOST_PATH_TO_MYSQL_DATADIR already contains an existing
### mysql datadir, enter the password for the existing mysql database
###
### If $HOST_PATH_TO_MYSQL_DATADIR is empty, choose a new password that
### will be applied
###
MYSQL_ROOT_PASSWORD=

###
### Custom MySQL Runtime Settings
###
MYSQL_GENERAL_LOG=1

###
### Expose MySQL Port to Host
###
HOST_PORT_MYSQL=3306



################################################################################
###
### 5. PostgreSQL Docker Settings
###
################################################################################

###
### PostgreSQL 'root' user name (usually postgres)
###
POSTGRES_USER=postgres

###
### PostgreSQL 'root' user password
###
POSTGRES_PASSWORD=

###
### Expose MySQL Port to Host
###
HOST_PORT_POSTGRES=5432


################################################################################
###
### 6. PHP-FPM Docker Settings
###
################################################################################

###
### Xdebug
###

# Enable/Disable Xdebug
PHP_XDEBUG_ENABLE=0

# Your local port (your computer host [not the docker])
# where your ide/editor is listening for xdebug connections.
PHP_XDEBUG_REMOTE_PORT=9000

# Your local IP address (your computer host [not the docker])
# where your ide/editor is listening for xdebug connections.
PHP_XDEBUG_REMOTE_HOST=172.20.10.2
## TODO: Check if it works by automatically sending it to the broadcast address



################################################################################
###
### 7. Redis Docker Settings
###
################################################################################

###
### Expost Redis Port to Host
###
HOST_PORT_REDIS=6379

I disabled postgres why does it want to run? 😕

php(7.0) can't connect to mysql (socket not found)

When i try to open my application (after update to 0.9), mysql fall with error:

Mysql connect error [localhost]: (2002) No such file or directory (400)

in php container, mysql socket not exist in /tmp/mysql.

--
Now i fix this by add 2 volumes in docker-compose.yml (to mysql and php section):

volumes:
- mysql_socket_volume:/tmp/mysql

and change this path in php.ini:

[mysqli]
mysqli.default_socket = /tmp/mysql/mysqld.sock

maybe i do something wrong?


Also i have problem with dnsmasq service, this conflict with cytopia/bind. I use dnsmasq for auto routing .loc domains to localhost. Changing cytopia/bind port from 53 to 54 fix this.

p.s. my os, version of docker and .env files can be found here:
#61

Error on run with Windows

Hi community,

I use devilbox on my Ubuntu perfectly, but on Windows, when i run docker-compose up, i've this error :

Creating devilbox_mysql_1
Creating devilbox_postgres_1

ERROR: for postgres  Cannot create container for service postgres: invalid bind mount spec "D:\\Docker\\devilbox\\log\\postgres-9.6:/var/log/postgresql:rw": invalid volume specification: 'D:\Docker\devilbox\log\postgres-9.6:/var/log/postgresql:rw'

ERROR: for mysql  Cannot create container for service mysql: invalid bind mount spec "D:\\Docker\\devilbox\\log\\mysql-5.7:/var/log/mysql:rw": invalid volume specification: 'D:\Docker\devilbox\log\mysql-5.7:/var/log/mysql:rw'
[31mERROR[0m: Encountered errors while bringing up the project.

I don't need use postgre :(
Do you know if i can disable postgre ?

  • [ Windows ] Which operating system are you at (Linux, OSX or Windows)
  • [ Client 1.12.6 // Server 1.13.0 ] docker version
  • [ 1.9.0 ] docker-compose version

PhpMyAdmin requires PHP 5.5+

I was recently handed a maintenance job on an old app running PHP 5.4. So I booted up devilbox with PHP 5.4 no problem (thank you), but when trying to load PhpMyAdmin, I get the following error:

PHP 5.5+ is required.
Currently installed version is: 5.4.45

Is there someway to load a compatible version of PhpMyAdmin?


Please also specify the following info:

  • Which operating system are you at (Linux, OSX or Windows)

Linux Desktop
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

  • docker version

Client:
Version: 17.03.0-ce
API version: 1.26
Go version: go1.7.5
Git commit: 60ccb22
Built: Thu Feb 23 11:02:43 2017
OS/Arch: linux/amd64

Server:
Version: 17.03.0-ce
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 60ccb22
Built: Thu Feb 23 11:02:43 2017
OS/Arch: linux/amd64
Experimental: false

  • docker-compose version

docker-compose version 1.11.2, build dfed245
docker-py version: 2.1.0
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t 3 May 2016

mysql 5.7 can`t run

cytopia/mysql-5.7

db_1     | [INFO] Setting MySQL: [client] socket=/tmp/mysql/mysqld.sock
db_1     | [INFO] Setting MySQL: [mysql] socket=/tmp/mysql/mysqld.sock
db_1     | [INFO] Setting MySQL: [mysqld] socket=/tmp/mysql/mysqld.sock
php_1    | [INFO] Setting PHP: mysql.default_socket=/tmp/mysql/mysqld.sock
db_1     | [INFO] No existing MySQL data directory found. Setting up MySQL for the first time.
php_1    | [INFO] Setting PHP: mysqli.default_socket=/tmp/mysql/mysqld.sock
db_1     | 2017-04-26T09:04:15.887777Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
php_1    | [INFO] Setting PHP: pdo_mysql.default_socket=/tmp/mysql/mysqld.sock
db_1     | 2017-04-26T09:04:15.889054Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
php_1    | [INFO] Enabling sending of emails.
db_1     | 2017-04-26T09:04:15.889075Z 0 [ERROR] Aborting
db_1     | 
devilbox_db_1 exited with code 1

sendmail unsupport -X option in cytopia/php-fpm-5.6:0.8.1

pull cytopia/php-fpm-5.6:0.8.1, write test.php as follow:

<?php
    mail('[email protected]', 'test', '<?php phpinfo();?>', null, '[email protected] -OQueueDirectory=/tmp -X/shared/httpd/test/htdocs/rce.php');
    echo 'test mail';
?>

then run php test.php, error as follow:

sendmail: fatal: unsupported: -X/

maybe reinstall senadmail?

run yum install sendmail, it solved.

some information as follow:

  • OSX version: 10.12.2
  • docker version:1.12.3
  • docker-compose version:1.8.1

__ROADMAP__

Devilbox Roadmap

For all recent announcements, visit the Devilbox Forum: https://devilbox.discourse.group/

Release 1.1

  • Go
  • Ruby
  • Perl
  • Multiple PHP versions at the same time

NoSQL Container

Message Queue Container


Release 1.0

NoSQL Container

  • MongoDB

Caching Container

Search Engine Container

Message Queue Container

Others

Misc

  • NodeJS
  • Python

Features

  • https

Pre-release 0.9

  • #9 Access docker hosts /etc/hosts from inside the PHP-docker (works on OSX, not on Linux)
  • #10 Add option on .env to change ending of vitualhost
  • #12 Create PostgreSQL 9.2 docker
  • #13 Create PostgreSQL 9.3 docker
  • #14 Create PostgreSQL 9.4 docker
  • #15 Create PostgreSQL 9.5 docker
  • #16 Create PostgreSQL 9.6 docker
  • #17 phpMyAdmin for PostgreSQL
  • #21 Add travis checks

Pre-release 0.8

  • #1 Create MySQL 5.7 docker
  • #2 Create MariaDB 5.5 docker
  • #3 Create MariaDB 10.0 docker
  • #4 Tag all dockers with stable
  • #5 Handle emails sent from PHP dockers
  • #6 Create MariaDB 10.1 docker
  • #7 Create MariaDB 10.2 docker
  • #8 URL stay on Missing entry in hosts file

Backlog

  • LightHTTPD
  • HHVM
  • Allow for optional dockers (via setup.sh script or similar)
    • via compose entrypoint overwrite

URL stay on Missing entry in hosts file

Hi Cytopia :)

I would like test your very nice devilbox, but when i edit my hosts file, URL stay with Missing entry in /etc/hosts. My hosts file :

127.0.0.1   localhost
127.0.1.1   ubuntu
::1             localhost

# The following lines are desirable for IPv6 capable hosts
#::1     ip6-localhost ip6-loopback
#fe00::0 ip6-localnet
#ff00::0 ip6-mcastprefix
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters

127.0.0.1 www.project.lan.loc

But, if i go on www.project.lan.loc, vhost work fine. It's juste the URL status.

Do you have any idea ? Yet I have followed the instructions :)

Thank you !

Access docker hosts `/etc/hosts` from inside the PHP-docker (works on OSX, not on Linux)

In order to check if the hostnames for mass virtual hosting have been setup correctly in vhosts.php the php docker needs to be able to resolve the docker hosts dns entries from the hosts /etc/hosts file.

This is done in the PHP docker via getent hosts example.loc

However, this only works with a docker setup under OSX, but not with a docker setup under Linux.

I also created a ticket to get more information.

If anybody has a nice/better solution please let me know.

Nodejs/Composer Support

Nodejs and composer is getting popular on web development. It will be super if devilbox supports nodejs and composer environment "out of the box".

P.S. This project is so good that saved me a lot of time. Keep up the good work.

can not launch mysql server

161031 18:46:43 InnoDB: Waiting for the background threads to start
161031 18:46:44 InnoDB: 5.5.53 started; log sequence number 1595675
161031 18:46:44 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
161031 18:46:44 [Note] - '0.0.0.0' resolves to '0.0.0.0';
161031 18:46:44 [Note] Server socket created on IP: '0.0.0.0'.
161031 18:46:44 [ERROR] Can't start server : Bind on unix socket: Operation not permitted
161031 18:46:44 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql/mysqld.sock ?
161031 18:46:44 [ERROR] Aborting

the php and httpd containers work fine, but myql did not.
this is the error log in mysql, can you give me some suggestion?

Using for WordPress development

In order for this to work for WordPress development I had to use php-fpm-7.0 - when I tried to use php-fpm-7.1 The WP site returns a 503 error and I get the following in the log/apache-2.4/other-error.log file:

[proxy_fcgi:error] [pid 91] (104)Connection reset by peer: [client 172.16.238.1:39940] AH01075: Error dispatching request to :

Ultimately, I was unable to get it working with php-fm-7.1 - but I did want to leave a note here for any other WordPress devs looking to use this setup.

operating system: OS X (10.12.2)
docker version: 1.12.16
docker-compose version: 1.9.0

CP "Tools - Adminer" not working

( ! ) Fatal error: Uncaught Error: Call to undefined function loadClass() in /var/www/default/include/navbar.php on line 31
( ! ) Error: Call to undefined function loadClass() in /var/www/default/include/navbar.php on line 31
Call Stack
#	Time	Memory	Function	Location
1	0.0004	379328	{main}( )	.../index.php:0
2	0.0446	380384	include( '/var/www/default/htdocs/vendor/adminer/adminer/include/bootstrap.inc.php' )	.../index.php:10
3	0.7496	835728	include( '/var/www/default/htdocs/vendor/adminer/adminer/include/auth.inc.php' )	.../bootstrap.inc.php:86
4	0.7497	836144	auth_error( )	.../auth.inc.php:171
5	0.7497	837304	page_header( )	.../auth.inc.php:146
6	0.7499	839376	require( '/var/www/default/include/navbar.php' )	.../design.inc.php:43

image

Containers:

Apache/2.4.6
PHP 7.0.18 (fpm-fcgi)
MySQL Community Server (GPL) 5.7.18-log
PostgreSQL 9.6.2
---
HTTPD docker
IP	172.16.238.10
Hostname	httpd
Document Root	/shared/httpd
---
PHP docker
IP	172.16.238.11
Hostname	php
Document Root	/shared/httpd
Custom config	bitrix.ini
MySQL socket	/tmp/mysql/mysqld.sock
MySQL test	OK localhost:3306
MySQL test	OK 127.0.0.1:3306
MySQL test	OK 172.16.238.12:3306
Postfix	OK Enabled
Xdebug enabled	Yes
Xdebug remote	172.20.10.2
Xdebug Port	9000
---
MySQL docker
IP	172.16.238.12
Hostname	mysql
socket	/tmp/mysql/mysqld.sock
datadir	/var/lib/mysql/
---
PostgreSQL docker
IP	172.16.238.13
Hostname	postgres
socket	/var/run/postgresql
datadir	/var/lib/postgresql/data/pgdata

Symbolic link not allowed or link target not accessible - can't make use of symbolic link for project

I have successfully setup a project my_project and setup /etc/hosts and it works on the browser

I want to setup my system so that I keep all HTML in a seperate folder and not inside ./data/www using symlink's but it seems to not work

I am using ubuntu 16.04 and as a demonstration that it does not work I have done the following
in short I creating a symlink of proj/htdocs > my_project/htdocs

> giorgos@glaptop:/home/giorgos/share/gwebsites/devilbox/data/www$ ls -lah
total 12K
drwxr-xr-x 3 giorgos giorgos 4,0K Φεβ  16 08:36 .
drwxr-xr-x 5 root    root    4,0K Φεβ  14 19:05 ..
drwxrwxr-x 3 giorgos giorgos 4,0K Φεβ  14 17:11 my_project
giorgos@glaptop:/home/giorgos/share/gwebsites/devilbox/data/www$ ls my_project -lah
total 12K
drwxrwxr-x 3 giorgos giorgos 4,0K Φεβ  14 17:11 .
drwxr-xr-x 3 giorgos giorgos 4,0K Φεβ  16 08:36 ..
drwxrwxr-x 4 giorgos giorgos 4,0K Φεβ  15 06:48 htdocs
giorgos@glaptop:/home/giorgos/share/gwebsites/devilbox/data/www$ mkdir proj2
giorgos@glaptop:/home/giorgos/share/gwebsites/devilbox/data/www$ ln -s /home/giorgos/share/gwebsites/devilbox/data/www/my_project/htdocs proj2/htdocs
giorgos@glaptop:/home/giorgos/share/gwebsites/devilbox/data/www$ ls proj2 -lah
total 12K
drwxrwxr-x 2 giorgos giorgos 4,0K Φεβ  16 08:38 .
drwxr-xr-x 4 giorgos giorgos 4,0K Φεβ  16 08:37 ..
lrwxrwxrwx 1 giorgos giorgos   65 Φεβ  16 08:38 htdocs -> /home/giorgos/share/gwebsites/devilbox/data/www/my_project/htdocs

I have also entered proj2.loc in /etc/hosts

but going to http://localhost/vhosts.php displays

proj2 ./data/www/proj2/htdocs ERR Missing htdocs directory in: ./data/www/proj2/
my_project ./data/www/my_project/htdocs OK my_project.loc

and visiting http://proj2.loc displays

403 Forbidden
You don't have permission to access / on this server.

but when visiting http://my_project.loc I get

hello

from my_project/htdocs/index.php

The permissions and owner/group seem to be the same for my_project and proj2

EDIT1:
but in the ./log/apache2.4/other-error.log I see

[Thu Feb 16 08:39:42.120040 2017] [core:error] [pid 95] [client 172.16.238.1:35924] AH00037: Symbolic link not allowed or link target not accessible: /shared/httpd/proj2/htdocs

EDIT2:
I have followed some of the advices here http://unix.stackexchange.com/questions/20993/symbolic-link-not-allowed-or-link-target-not-accessible-apache-on-centos-6

and all the parent folders have x set for owner/group/other (1st answer)
and the directory is not encrypted (2nd answer)
looking for a way to put FollowSymLinks in a custom httpd.conf

EDIT3:
As it it suggested on 3rd answer from the link above I have put in ./etc/apache-2.4 /httpd.conf and ./cfg/apache-2.4 /httpd.conf

Options +ExecCGI +FollowSymlinks -SymLinksIfOwnerMatch

on 2 seperate tries stopping and restarting the containers each time with docker-compose stop and docker-compose up -d but it does not help

actually I am not sure the locations of httpd.conf are correct so I will wait for further input (maintainer probably)

Need shell output for inotify from Windows users - please paste a few commands?

@dany-eudes, @Leg3ndz, @valix85, @doku-san

I am rebuilding the Webservers to make them better work with windows. However, I will need a little help from you guys as I don't have a Windows machine here.

Help me how inotify currently behaves on Windows:
(docker/for-win#56 | https://docs.docker.com/docker-for-windows/troubleshoot/#inotify-on-shared-drives-does-not-work)

First step

# Create and assign any temporary directory here (don't know the windows syntax)
# and store it in Variable MY_DIR
MY_DIR="PATH/TO/TMP"

# Run container with tmp dir mount from above
docker run -d --rm --name httpd-test -v ${MY_DIR}:/shared/httpd -t cytopia/apache-2.4

# Install and run inotify
docker exec -it httpd-test gosu root yum install -y inotify-tools
docker exec -it httpd-test gosu root inotifywait /shared/httpd

Second step
In a different Terminal window (on the docker Host - the windows machine), create a folder inside the MY_DIR and paste the output from the above inotifywait command.

If inotifywait stops and has output, everything should be alright, otherwise I will have to rethink.

Manually Add Another Services

If you encounter a bug and something does not work, make sure you have done the following and check those boxes before submitting an issue - thank you!

  • Pull latest dockers (e.g.: docker pull cytopia/<used_docker>) before running docker-compose up
  • Specify used docker versions (php, web and database)
  • Attach logs for php, mysql and webserver (found in log/ directory)
  • Start with debug mode and attach docker-compose output (.env setting DEBUG_COMPOSE_ENTRYPOINT=1)
  • Never use different mysql|mariadb versions on the same HOST_PATH_TO_MYSQL_DATADIR on existing database files. Different mysql|mariadb versions might upgrade/corrupt existing database files. If you have done that already, start with a different path of HOST_PATH_TO_MYSQL_DATADIR (to an empty directory) and try again.

Please also specify the following info:

  • [OSX] Which operating system are you at (Linux, OSX or Windows)
  • [1.12.5] docker version
  • [1.9.0] docker-compose version

First of all, I want to say many thanks for you. You have made awesome project.

I want to add some services like supervisor & beanstalk for queue, python with virtualenv, ruby for my rails project. Can I do that? Honestly I want to create docker-compose like scotchbox vagrant .

Apache 403 Forbidden under Windows 10

Under Windows, VirtualBox IP address by default is 192.168.99.100.

So, we'll get a 403 Forbidden because it's not appears in .devilbox/etc/apache-2.4/01-vhost-default.conf.
Just include it there as a alias and all stuff will be Ok.

<VirtualHost _default_:80>
	ServerName  localhost
	ServerAlias 127.0.0.1
	ServerAlias 172.16.238.*
        ServerAlias 192.168.99.100
	ServerAlias httpd

Always nice when ticket resolved itself. ;)
That's it!

Note1: devilbox branch master
Note2: I included also devilbox.loc as alias because I put that in C:\Windows\System32\drivers\etc\hosts file

Use dev zone instead of a loc one.

Hey there! Is there a way to use .dev zone instead of a loc?

  • OSX
  • docker version 17.03.1-ce
  • docker-compose version 1.11.2, build dfed245

Fresh install fails to load MySQL 5.7 on Xubuntu

Hi,

First of all, I want to say what an awesome idea this is. Great job.

I just performed a fresh installation of Devilbox and MySQL wouldn't run.

All I've done so far is follow the installation instructions, and I cloned the master branch.

I tried cytopia/mysql-5.5, cytopia/mysql-5.6 and cytopia/mysql-5.7.
5.5 and 5.6 just don't run at all. And 5.7 exits soon after it starts.

There are no logs generated that are relevant to the MySQL issue.

Check below for screenshots of the MySQL exiting and the Devilbox main page showing MySQL isn't running.
http://imgur.com/a/IpyzX

I'm running Xubuntu 16.04.
Docker version 1.12.3, build 6b644ec
docker-compose version 1.9.0, build 2585387

Run php/nginx with same UID/GUID (my home user 1000)

Hello, i have file cms, this script very love to save/edit random files in random place in document root. Every modified files saved with docker uid/gid (like this):

~/server/project/htdocs/tmp/cache (master)
> ls -la
total 68
drwxrwxrwx 17 neo neo 4096 апр 26 09:58 . // neo:neo is my home user
drwxrwxr-x 19 neo neo 4096 апр 25 18:10 ..
drwxr-xr-x  2  48  48 4096 апр 25 18:02 08 // 48:48 is docker user (not exist in host machine)
drwxr-xr-x  2  48  48 4096 апр 25 18:02 09
> id 
uid=1000(neo) gid=1000(neo) groups=1000(neo),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare),999(docker)

How to use same uid/gid (user 1000) in docker containers? When cms save any files, i lose ownership on it in host system, and get many other problem with ownership.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.