Devilbox: first run './docker-compose.yml' is invalid because:

Created on 7 Apr 2019  路  19Comments  路  Source: cytopia/devilbox

i made a new pull from 0 and i got this

docker-compose up
WARNING: The LOCAL_LISTEN_ADDR variable is not set. Defaulting to a blank string.
WARNING: The DEBUG_COMPOSE_ENTRYPOINT variable is not set. Defaulting to a blank string.
WARNING: The EXTRA_HOSTS variable is not set. Defaulting to a blank string.
WARNING: The BIND_TTL_TIME variable is not set. Defaulting to a blank string.
WARNING: The BIND_REFRESH_TIME variable is not set. Defaulting to a blank string.
WARNING: The BIND_RETRY_TIME variable is not set. Defaulting to a blank string.
WARNING: The BIND_EXPIRY_TIME variable is not set. Defaulting to a blank string.
WARNING: The BIND_MAX_CACHE_TIME variable is not set. Defaulting to a blank string.
WARNING: The BIND_LOG_DNS_QUERIES variable is not set. Defaulting to a blank string.
WARNING: The PHP_SERVER variable is not set. Defaulting to a blank string.
WARNING: The PHP_MODULES_ENABLE variable is not set. Defaulting to a blank string.
WARNING: The PHP_MODULES_DISABLE variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_ROOT_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The DEVILBOX_PATH variable is not set. Defaulting to a blank string.
WARNING: The MOUNT_OPTIONS 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 HTTPD_SERVER variable is not set. Defaulting to a blank string.
WARNING: The DEVILBOX_UI_ENABLE variable is not set. Defaulting to a blank string.
WARNING: The TLD_SUFFIX variable is not set. Defaulting to a blank string.
WARNING: The HTTPD_DOCROOT_DIR variable is not set. Defaulting to a blank string.
WARNING: The HTTPD_TEMPLATE_DIR variable is not set. Defaulting to a blank string.
WARNING: The HOST_PORT_HTTPD variable is not set. Defaulting to a blank string.
WARNING: The HOST_PORT_HTTPD_SSL variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_SERVER variable is not set. Defaulting to a blank string.
WARNING: The HOST_PORT_MYSQL variable is not set. Defaulting to a blank string.
WARNING: The PGSQL_SERVER variable is not set. Defaulting to a blank string.
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 HOST_PORT_PGSQL variable is not set. Defaulting to a blank string.
WARNING: The REDIS_SERVER variable is not set. Defaulting to a blank string.
WARNING: The HOST_PORT_REDIS 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_MEMCD variable is not set. Defaulting to a blank string.
WARNING: The MONGO_SERVER variable is not set. Defaulting to a blank string.
WARNING: The HOST_PORT_MONGO variable is not set. Defaulting to a blank string.
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.memcd.ports is invalid: Port ranges don't match in length
services.mongo.ports is invalid: Port ranges don't match in length
services.mysql.ports is invalid: Port ranges don't match in length
services.httpd.ports is invalid: Port ranges don't match in length
services.pgsql.ports is invalid: Port ranges don't match in length
services.redis.ports is invalid: Port ranges don't match in length
services.httpd.ports is invalid: Port ranges don't match in length
bug

Most helpful comment

@Almusamim is .env not env

i was doing things from memory and my memory was failing me :(

so instead of re reading the documentation and i opened a issue :sob: the issues was the .env correct naming nothing else

All 19 comments

Did you follow the setup steps in the documentation? specifically in copying the example file to .env ?

This looks like none of the .env variables are set

I got same error trying to run devilbox

Did you manage to solve this @icf20 if so please share how u did :)
Thank you

docker-compose up WARNING: The LOCAL_LISTEN_ADDR variable is not set. Defaulting to a blank string. WARNING: The DEBUG_COMPOSE_ENTRYPOINT variable is not set. Defaulting to a blank string. WARNING: The EXTRA_HOSTS variable is not set. Defaulting to a blank string. WARNING: The BIND_TTL_TIME variable is not set. Defaulting to a blank string. WARNING: The BIND_REFRESH_TIME variable is not set. Defaulting to a blank string. WARNING: The BIND_RETRY_TIME variable is not set. Defaulting to a blank string. WARNING: The BIND_EXPIRY_TIME variable is not set. Defaulting to a blank string. WARNING: The BIND_MAX_CACHE_TIME variable is not set. Defaulting to a blank string. WARNING: The BIND_LOG_DNS_QUERIES variable is not set. Defaulting to a blank string. WARNING: The PHP_SERVER variable is not set. Defaulting to a blank string. WARNING: The PHP_MODULES_ENABLE variable is not set. Defaulting to a blank string. WARNING: The PHP_MODULES_DISABLE variable is not set. Defaulting to a blank string. WARNING: The MYSQL_ROOT_PASSWORD variable is not set. Defaulting to a blank string. WARNING: The DEVILBOX_PATH variable is not set. Defaulting to a blank string. WARNING: The MOUNT_OPTIONS 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 HTTPD_SERVER variable is not set. Defaulting to a blank string. WARNING: The DEVILBOX_UI_ENABLE variable is not set. Defaulting to a blank string. WARNING: The TLD_SUFFIX variable is not set. Defaulting to a blank string. WARNING: The HTTPD_DOCROOT_DIR variable is not set. Defaulting to a blank string. WARNING: The HTTPD_TEMPLATE_DIR variable is not set. Defaulting to a blank string. WARNING: The HOST_PORT_HTTPD variable is not set. Defaulting to a blank string. WARNING: The HOST_PORT_HTTPD_SSL variable is not set. Defaulting to a blank string. WARNING: The MYSQL_SERVER variable is not set. Defaulting to a blank string. WARNING: The HOST_PORT_MYSQL variable is not set. Defaulting to a blank string. WARNING: The PGSQL_SERVER variable is not set. Defaulting to a blank string. 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 HOST_PORT_PGSQL variable is not set. Defaulting to a blank string. WARNING: The REDIS_SERVER variable is not set. Defaulting to a blank string. WARNING: The HOST_PORT_REDIS 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_MEMCD variable is not set. Defaulting to a blank string. WARNING: The MONGO_SERVER variable is not set. Defaulting to a blank string. WARNING: The HOST_PORT_MONGO variable is not set. Defaulting to a blank string. ERROR: The Compose file '.\docker-compose.yml' is invalid because: services.memcd.ports is invalid: Port ranges don't match in length services.mongo.ports is invalid: Port ranges don't match in length services.mysql.ports is invalid: Port ranges don't match in length services.httpd.ports is invalid: Port ranges don't match in length services.pgsql.ports is invalid: Port ranges don't match in length services.redis.ports is invalid: Port ranges don't match in length services.httpd.ports is invalid: Port ranges don't match in length

@Almusamim Did you setup your .env file?

https://devilbox.readthedocs.io/en/latest/getting-started/install-the-devilbox.html#create-env-file

If you did, can you post the env file you have here? (in a code block or spoiler)

Ya I followed these step of adding gid and uid and left the rest as it is


.env

````

#

---------------------------------------------------

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 docker images!

#

IMPORTANT:

----------

When changing any values ensure to stop, rm and restart:

$ docker-compose stop

$ docker-compose rm -f

$ docker-compose up

#

NOTE:

-----

For you own custom variables, scroll to the bottom

#

The following line will disable any shellcheck warnings throughout this file

shellcheck disable=SC2034,SC2125

#

Show all executed commands in each

docker image during docker-compose up?

#

1: Yes

0: No

DEBUG_COMPOSE_ENTRYPOINT=1

#

Log to file or Docker logs.

#

Logging to file means log files are available under log/

on your host operating system.

Logging to Docker logs means log files are streamed to

stdout and stderr.

#

1: Log to Docker logs

0: Log to file

#

DOCKER_LOGS=0

#

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.

#

Note: When changing this variable you must re-create the container.

Simply remove it, it will be auto-created during the next start:

#

$ docker-compose rm -f

#

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 colon ':')

LOCAL_LISTEN_ADDR=

b.) If an IP is specified, note the trailing colon ':'

LOCAL_LISTEN_ADDR=127.0.0.1:

#

LOCAL_LISTEN_ADDR=

#

This is the domain suffix your projects will be made available

with mass-virtual-hosting.

It is also required for the internal DNS server to be setup.

#

Note: Only ALPHA ([a-zA-Z]+) characters are supported.

#

Example:

TLD_SUFFIX=loc

Makes your project available under xxxx.loc

#

Example:

TLD_SUFFIX=local

Makes your project available under xxxx.local

#

TLD_SUFFIX=loc

#

Optional DNS configuration

Allows you to add extra DNS records (above the wildcard entry)

Useful if your host computer run other Docker services that you want to connect to or reach

from within the Devilbox network by a custom hostname.

#

Format:

-------

Resolve any custom defined hostname to an IP address (useable inside container and host os)

EXTRA_HOSTS==[,=]

#

Resolve any custom defined hostname to whatever IP address a CNAME resolves to

(Useable inside the container and host OS).

Note: CNAME must be resolvable by Google DNS

EXTRA_HOSTS==[,=]

#

Examples:

---------

EXTRA_HOSTS=hostname.loc=1.2.3.4

EXTRA_HOSTS=host.loc=1.2.3.4,host.example.org=3.4.5.6

EXTRA_HOSTS=

#

Set your user id and group id

#

This should be changed to the value of your local

users uid and gid

#

Type id on the terminal to find out your values

#

NEW_UID=197609
NEW_GID=197121

#

Timezone for PHP Docker container (system and php.ini)

#

TIMEZONE=UTC

#

#

INTRANET SETTINGS

#

#

#

TLD_SUFFIX domains are checked if they are set in the

host computer /etc/hosts or available via attached DNS server.

Timeout is done on vhosts.php (intranet) via ajax calls.

In order to keep performance, set this to a low value.

DNS checks might not succeed in time on slow machines.

If DNS is valid, but timeout is expired, set this to a higher value.

#

DNS_CHECK_TIMEOUT value is how many seconds to time out

Default is to timeout after 1 second (DNS_CHECK_TIMEOUT=1)

#

DNS_CHECK_TIMEOUT=1

#

Devilbox UI SSL Certificate generation

#

When using SSL each certificate requires names for which it is responsible:

Common Name as well as alternative names.

#

Specify comma separated hostnames below by which you want to access the Devilbox.

Those hostnames will be included in the SSL certificate for the Devilbox intranet.

This has nothing to do for SSL certificates for projects, it is just for the intranet

itself.

#

DEVILBOX_UI_SSL_CN=localhost,.localhost,devilbox,.devilbox,httpd

#

Devilbox UI Password protection enable/disable (1/0)

#

Set DEVILBOX_UI_PROTECT to 1 in order to password protect the

intranet.

#

Example:

DEVILBOX_UI_PROTECT=1

DEVILBOX_UI_PROTECT=0

#

DEVILBOX_UI_PROTECT=0

#

Devilbox UI Password

#

When DEVILBOX_UI_PROTECT=1, use the following password

to log in. The password can always be changed.

When changing the password, make sure to restart your

PHP container.

#

Example:

DEVILBOX_UI_PASSWORD=my-very-secure-password

DEVILBOX_UI_PASSWORD=Some pass with spaces

#

The default username is 'devilbox'

#

DEVILBOX_UI_PASSWORD=password

#

Enable the Devilbox Intranet?

#

Example:

DEVILBOX_UI_ENABLE=1

DEVILBOX_UI_ENABLE=0

#

DEVILBOX_UI_ENABLE=1

#

Automatically be logged in into phpMyAdmin

#

Example:

DEVILBOX_VENDOR_PHPMYADMIN_AUTOLOGIN=1

DEVILBOX_VENDOR_PHPMYADMIN_AUTOLOGIN=0

#

DEVILBOX_VENDOR_PHPMYADMIN_AUTOLOGIN=1

#

Automatically be logged in into phpPgAdmin

#

Example:

DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN=1

DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN=0

#

DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN=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 PHP Server Image

#

Note: PHP 5.2 is not officially supported. Intranet won't work (due to lack of namespace support).

PHP 5.2 only works with Apache 2.4, Nginx stable and Nginx mainline.

Use at your own risk.

#

PHP_SERVER=5.2

PHP_SERVER=5.3

PHP_SERVER=5.4

PHP_SERVER=5.5

PHP_SERVER=5.6

PHP_SERVER=7.0

PHP_SERVER=7.1

PHP_SERVER=7.2

PHP_SERVER=7.3

PHP_SERVER=7.4

PHP_SERVER=8.0

#

1.2 Choose HTTPD Server Image

#

HTTPD_SERVER=apache-2.2

HTTPD_SERVER=apache-2.4

HTTPD_SERVER=nginx-stable

HTTPD_SERVER=nginx-mainline

#

1.3 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

MYSQL_SERVER=mariadb-10.4

MYSQL_SERVER=percona-5.5

MYSQL_SERVER=percona-5.6

MYSQL_SERVER=percona-5.7

MYSQL_SERVER=percona-8.0

#

1.4 Choose PostgreSQL Server Image

#

IMPORTANT: Apline based images might cause issues on Docker Toolbox or OSX

https://github.com/docker/toolbox/issues/510

#

PGSQL_SERVER=9.0

PGSQL_SERVER=9.1

PGSQL_SERVER=9.2

PGSQL_SERVER=9.2-alpine

PGSQL_SERVER=9.3

PGSQL_SERVER=9.3-alpine

PGSQL_SERVER=9.4

PGSQL_SERVER=9.4-alpine

PGSQL_SERVER=9.5

PGSQL_SERVER=9.5-alpine

PGSQL_SERVER=9.6

PGSQL_SERVER=9.6-alpine

PGSQL_SERVER=10.0

PGSQL_SERVER=10.0-alpine

PGSQL_SERVER=10.1

PGSQL_SERVER=10.1-alpine

PGSQL_SERVER=10.2

PGSQL_SERVER=10.2-alpine

PGSQL_SERVER=10.3

PGSQL_SERVER=10.3-alpine

PGSQL_SERVER=10.4

PGSQL_SERVER=10.4-alpine

PGSQL_SERVER=10.5

PGSQL_SERVER=10.5-alpine

PGSQL_SERVER=10.6

PGSQL_SERVER=10.6-alpine

PGSQL_SERVER=11.0

PGSQL_SERVER=11.0-alpine

PGSQL_SERVER=11.1

PGSQL_SERVER=11.1-alpine

PGSQL_SERVER=latest

PGSQL_SERVER=alpine

#

1.5 Choose Redis Server Image

#

IMPORTANT: Apline based images might cause issues on Docker Toolbox or OSX

https://github.com/docker/toolbox/issues/510

#

REDIS_SERVER=2.8

REDIS_SERVER=3.0

REDIS_SERVER=3.0-alpine

REDIS_SERVER=3.2

REDIS_SERVER=3.2-alpine

REDIS_SERVER=4.0

REDIS_SERVER=4.0-alpine

REDIS_SERVER=5.0

REDIS_SERVER=5.0-alpine

REDIS_SERVER=latest

REDIS_SERVER=alpine

#

1.6 Choose Memcached Server Image

#

IMPORTANT: Apline based images might cause issues on Docker Toolbox or OSX

https://github.com/docker/toolbox/issues/510

#

MEMCD_SERVER=1.4

MEMCD_SERVER=1.4-alpine

MEMCD_SERVER=1.5

MEMCD_SERVER=1.5-alpine

MEMCD_SERVER=latest

MEMCD_SERVER=alpine

#

1.7 Choose Mongo Server Image

#

MONGO_SERVER=2.8

MONGO_SERVER=3.0

MONGO_SERVER=3.2

MONGO_SERVER=3.4

MONGO_SERVER=3.6

MONGO_SERVER=4.0

MONGO_SERVER=latest

#

#

2. Host Mounts (Your computer)

#

#

#

Global mount options

#

Note: When adding custom mount options, ensure to start with a

leading ',' (comma), as those options are prepended to already

existing mount options.

#

Note: If no mount options are specified, leave this variable empty

and do not add a leading ',' (comman).

#

MOUNT_OPTIONS=,cached

MOUNT_OPTIONS=

#

Example: Allow to share mounts accross container with SELINUX enabled

#

MOUNT_OPTIONS=,z

#

MOUNT_OPTIONS=

#

Local filesystem path to www projects.

#

Note: When changing this variable you must re-create the container.

Simply remove it, it will be auto-created during the next start:

#

$ docker-compose rm -f

#

HOST_PATH_HTTPD_DATADIR=./data/www

#

#

3. PHP Docker Settings

#

#

#

Enable certain PHP modules which are not enabled by default

#

Currently the only modules that can be enabled are 'ioncube' and 'blackfire'

Also ensure to disable xdebug when using any of the above:

https://xdebug.org/docs/install#compat

#

PHP_MODULES_ENABLE=ioncube, blackfire

#

PHP_MODULES_ENABLE=

#

Disable any PHP modules that you don't require

#

Specify a comma separated list without spaces of modules to disable

#

PHP_MODULES_DISABLE=xdebug,imagick,swoole

#

PHP_MODULES_DISABLE=oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole

#

Configure everything else about PHP in

* cfg/php-ini-X.X/*.ini

* cfg/php-fpm-X.X/*.conf

#

#

4. HTTPD Docker Settings

#

#

#

Expose HTTPD Port to Host

#

HOST_PORT_HTTPD=80
HOST_PORT_HTTPD_SSL=443

#

Document Root Subdirectory

#

In your project directory, which subfolder should

serve your files?

#

When changing this value, restart the devilbox.

#

HTTPD_DOCROOT_DIR=htdocs

#

Per vHost Config Subdirectory

#

In your project directory, which subfolder should

hold apache, nginx templates for a customized vhost?

#

When changing this value, restart the devilbox.

#

HTTPD_TEMPLATE_DIR=.devilbox

#

Webserver timeout (in seconds) to upstream PHP-FPM server

#

This value should be greater than PHP's max_execution_time,

otherwise the php script could still run and the webserver will

simply drop the connection before getting an answer by PHP.

#

HTTPD_TIMEOUT_TO_PHP_FPM=180

#

NGINX ONLY

#

Set worker_processes and worker_connections

#

https://nginx.org/en/docs/ngx_core_module.html#worker_processes

https://nginx.org/en/docs/ngx_core_module.html#worker_connections

#

HTTPD_NGINX_WORKER_PROCESSES=auto
HTTPD_NGINX_WORKER_CONNECTIONS=1024

#

#

5. MySQL Docker Settings

#

#

#

MySQL root user password

#

If $HOST_PATH_MYSQL_DATADIR already contains an existing

mysql datadir, enter the password for the existing mysql database

#

If $HOST_PATH_MYSQL_DATADIR is empty, choose a new password that

will be applied

#

MYSQL_ROOT_PASSWORD=

#

Expose MySQL Port to Host

#

HOST_PORT_MYSQL=3306

#

#

6. PostgreSQL Docker Settings

#

#

#

PostgreSQL 'root' user name (usually postgres)

#

PGSQL_ROOT_USER=postgres

#

PostgreSQL 'root' user password

#

PGSQL_ROOT_PASSWORD=

#

Expose PostgreSQL Port to Host

#

HOST_PORT_PGSQL=5432

#

#

7. Redis Docker Settings

#

#

#

Expose Redis Port to Host

#

HOST_PORT_REDIS=6379

#

Custom startup arguments

#

Apply custom startup arguments to redis

#

Example: Password protection

Add password protection to the Redis server by specifying it should

require a password.

Note: Do not add quotes or spaces to the password

#

REDIS_ARGS=--requirepass my-redis-root-password

#

Example: Verbosity

#

REDIS_ARGS=--loglevel verbose

#

REDIS_ARGS=

REDIS_ARGS=--loglevel verbose --requirepass my-redis-root-password

#

#

8. Memcached Docker Settings

#

#

#

Expose Memcached Port to Host

#

HOST_PORT_MEMCD=11211

#

#

9. MongoDB Docker Settings

#

#

#

Expose MongoDB Port to Host

#

HOST_PORT_MONGO=27017

#

#

10. Bind Docker Settings

#

#

#

Expose Bind Port to Host

#

HOST_PORT_BIND=1053

#

Add comma separated DNS server from which you want to receive DNS

You can also add DNS servers from your LAN (if any are available)

#

BIND_DNS_RESOLVER=8.8.8.8,8.8.4.4

#

Validate DNSSEC

#

Values:

no: DNSSEC validation is disabled

yes: DNSSEC validation is enabled, but a trust anchor must be manually configured.

auto: DNSSEC validation is enabled, and a default trust anchor for root zone is used.

#

BIND_DNSSEC_VALIDATE=no

#

Bind timing options (time in seconds)

#

Leave empty for defaults.

Only change when you know what you are doing.

#

BIND_TTL_TIME=
BIND_REFRESH_TIME=
BIND_RETRY_TIME=
BIND_EXPIRY_TIME=
BIND_MAX_CACHE_TIME=

#

Show DNS Queries in Docker logs output?

#

1: Yes

0: No

BIND_LOG_DNS_QUERIES=0

#

#

11. Custom variables

#

#

#

Any variable defined in this file will be available

as environment variables to your PHP/HHV Docker container.

#

This might be useful to set application environment and retrieve

them via:

#

#

Example:

would produce: 'some value'

#

Foo=some value

````

Can you confirm the .env file is in the devilbox folder, right next to docker-compose.yml, and that you are in the devilbox folder when you run docker-compose up ?

Yes they are in the same folder

Screenshot

@Almusamim is .env not env

i was doing things from memory and my memory was failing me :(

so instead of re reading the documentation and i opened a issue :sob: the issues was the .env correct naming nothing else

Sorry about that

Reason would be this. If you have accidentally made a git pull then new services are fetched. but your old env has no those services' configs. So what you have to do is, make new .env file again with the env-example file and move all ur old configs there and try again.

I have same issue when trying to start from different directory.
When in directory docker-compose up httpd php mysql works well, but
outside docker-compose -f P/devilbox/docker-compose.yml up httpd php mysql gives same error

docker-compose -f P/devilbox/docker-compose.yml up httpd php mysql
WARNING: The LOCAL_LISTEN_ADDR variable is not set. Defaulting to a blank string.
WARNING: The DEBUG_COMPOSE_ENTRYPOINT variable is not set. Defaulting to a blank string.
WARNING: The EXTRA_HOSTS variable is not set. Defaulting to a blank string.
WARNING: The BIND_TTL_TIME variable is not set. Defaulting to a blank string.
WARNING: The BIND_REFRESH_TIME variable is not set. Defaulting to a blank string.
WARNING: The BIND_RETRY_TIME variable is not set. Defaulting to a blank string.
WARNING: The BIND_EXPIRY_TIME variable is not set. Defaulting to a blank string.
WARNING: The BIND_MAX_CACHE_TIME variable is not set. Defaulting to a blank string.
WARNING: The BIND_LOG_DNS_QUERIES variable is not set. Defaulting to a blank string.
WARNING: The PHP_SERVER variable is not set. Defaulting to a blank string.
WARNING: The PHP_MODULES_ENABLE variable is not set. Defaulting to a blank string.
WARNING: The PHP_MODULES_DISABLE variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_ROOT_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The DEVILBOX_PATH variable is not set. Defaulting to a blank string.
WARNING: The MOUNT_OPTIONS 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_PATH_SSH_DIR variable is not set. Defaulting to a blank string.
WARNING: The HTTPD_SERVER variable is not set. Defaulting to a blank string.
WARNING: The DEVILBOX_UI_ENABLE variable is not set. Defaulting to a blank string.
WARNING: The TLD_SUFFIX variable is not set. Defaulting to a blank string.
WARNING: The HTTPD_DOCROOT_DIR variable is not set. Defaulting to a blank string.
WARNING: The HTTPD_TEMPLATE_DIR variable is not set. Defaulting to a blank string.
WARNING: The HOST_PORT_HTTPD variable is not set. Defaulting to a blank string.
WARNING: The HOST_PORT_HTTPD_SSL variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_SERVER variable is not set. Defaulting to a blank string.
WARNING: The HOST_PORT_MYSQL variable is not set. Defaulting to a blank string.
WARNING: The PGSQL_SERVER variable is not set. Defaulting to a blank string.
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 HOST_PORT_PGSQL variable is not set. Defaulting to a blank string.
WARNING: The REDIS_SERVER variable is not set. Defaulting to a blank string.
WARNING: The HOST_PORT_REDIS 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_MEMCD variable is not set. Defaulting to a blank string.
WARNING: The MONGO_SERVER variable is not set. Defaulting to a blank string.
WARNING: The HOST_PORT_MONGO variable is not set. Defaulting to a blank string.
ERROR: The Compose file './P/devilbox/docker-compose.yml' is invalid because:
services.memcd.ports is invalid: Port ranges don't match in length
services.mongo.ports is invalid: Port ranges don't match in length
services.mysql.ports is invalid: Port ranges don't match in length
services.httpd.ports is invalid: Port ranges don't match in length
services.pgsql.ports is invalid: Port ranges don't match in length
services.redis.ports is invalid: Port ranges don't match in length
services.httpd.ports is invalid: Port ranges don't match in length

Am I doing something wrong?

have same issue when trying to start from different directory.
When in directory docker-compose up httpd php mysql works well, but
outside docker-compose -f P/devilbox/docker-compose.yml up httpd php mysql gives same error

This is because the docker-compose command looks for an .env file in the current directory from where you've started it. Then the .env is not found and the variables are not substituted into docker-compose.yml

@cytopia is there any way to include path to env file or something so it will work?

This I don't know. Why not go directly into this directory?

I would like to set up an alias, so it is possible to open terminal, type command and voila, server is running, while I stay in directory I used to be.

Instead of an alias, you can use a bash function (works the same with autocompletions). This way you can cd into the directory before and start it up.

bashrc

start-devilbox() {
    cd <into-devilbox-directory>
    docker-compose up -d "${*}"
}

For Powershell

Set-Alias d-up d-upFunc

function d-upFunc {
    cd E:\devil-server\devilbox
    docker-compose up -d mysql php httpd
}

Then you can use d-up to trigger it.

Thanks for reply. I will try that

Reason would be this. If you have accidentally made a git pull then new services are fetched. but your old env has no those services' configs. So what you have to do is, make new .env file again with the env-example file and move all ur old configs there and try again.

How to "clear" those pulls you don't want?

Found (Warning!!! deletes All images and pulled)
docker system prune -a

More to this:
Can we not completely comment out PostgreSQL, REDIS, MEMCD, MONGO ???
They take up lots of space and are unneeded for many.
Seems like we can but trying to do so results in errors.

If you do not pull those images, you also have to make sure you run docker-compose up with specifically listing which containers you want to run.

Like what @vikas5914 said in his powershell:
docker-compose up -d mysql php httpd

That says only start those 3 containers. I modified the rebuild.sh / rebuild.bat files to include these arguments.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

taliptako picture taliptako  路  4Comments

msyhr picture msyhr  路  7Comments

sustained picture sustained  路  6Comments

cytopia picture cytopia  路  4Comments

zack6849 picture zack6849  路  5Comments