GithubHelp home page GithubHelp logo

eko / docker-symfony Goto Github PK

View Code? Open in Web Editor NEW
1.3K 1.3K 476.0 161 KB

Run a Symfony application using Docker & docker-compose

License: BSD Zero Clause License

Dockerfile 66.32% Shell 33.68%
docker docker-symfony kibana nginx php-fpm symfony

docker-symfony's Introduction

Hi ๐Ÿ‘‹

I'm Vincent. I work with open-source for so many years and I love to discover, contribute and share new things with other developers!

๐ŸŒฑ My latest projects

๐Ÿ“œ My recent blog posts

๐Ÿ”ญ Latest releases I've contributed to

๐Ÿ’ฌ Feedback

Everyone likes feedback! So if you are using one of my projects, please do not hesitate to hear your voice.

๐Ÿ“ซ How to reach me

docker-symfony's People

Contributors

ahmedofali avatar akovalyov avatar automatix avatar b-galati avatar captainjojo avatar eko avatar enekochan avatar gritt avatar julbrs avatar lrkwz avatar maxooo avatar mickadoo avatar navitronic avatar nicolascarpi avatar nicramarcin avatar phpeek avatar prims47 avatar progonkpa avatar ricfio avatar samsch avatar valerianpereira avatar vria avatar wabbenhuis avatar waldyrious 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

docker-symfony's Issues

SessionHandler not found exception

hello, first of all, thanks for your share of this docker environment. I recently encountered a problem when using it with "symfondy demo application"(master). Here enclosed the exception message:

CRITICAL06:26:09 php Fatal Error: Class 'SessionHandler' not found
CRITICAL06:26:09 request Uncaught PHP Exception Symfony\Component\Debug\Exception\ClassNotFoundException: "Attempted to load class "SessionHandler" from the global namespace. Did you forget a "use" statement?" at /var/www/symfony/vendor/symfony/http-foundation/Session/Storage/Handler/NativeSessionHandler.php line 19

Principlely, it's the class "SessionHandler" not exist, i searched quite a while but can't find a solution. Have you encountered the same problem ? thanks in advance

Code license

Any chance you could attach a license to this repo, for the sake of explicitly allowing it to be downloaded and modified?

I'm guessing your intent would line up with the "do whatever you want with this" ideal of the WTFPL, but that license does have rather "colorful" language.

Why debian:jessie ?

Hello, simple question here, why debian:jessie for the code instead of a busybox ? just to save space & reuse the layer ?

File not found when trying to access Symfony project

Hi,

I followed the instructions about how to install it but when i try to access my symfony project.
If i try to access Kibana, it works.

> docker-compose ps 
        Name                       Command               State              Ports           
--------------------------------------------------------------------------------------------
dockersymfony_db_1      docker-entrypoint.sh mysqld      Up      0.0.0.0:3306->3306/tcp     
dockersymfony_elk_1     /usr/bin/supervisord -n -c ...   Up      0.0.0.0:81->80/tcp         
dockersymfony_nginx_1   nginx                            Up      443/tcp, 0.0.0.0:80->80/tcp
dockersymfony_php_1     php-fpm7 -F                      Up      0.0.0.0:9000->9000/tcp 

I have 127.0.0.1 and 0.0.0.0 in my hosts

I created a new symfony project at the root of the folder like that

> symfony new symfony
> ls 
LICENSE.md                 docker-compose.travis.yml  elk/                       nginx/                     symfony/
README.md                  docker-compose.yml         logs/                      php-fpm/

How can i success ?

Thank's in advance

Slow synchronization

Hey guys, I'm facing a very hard time on files synchronization. It takes every request about 20-30 seconds to update my files to docker.

Any clue?

error running docker-compose up

I get the following error

e89a19c56178: Error pulling image (latest) from docker.io/willdurand/elk, Driver aufs failed to create image rootfs 6016c7ab9091a3333c335a505e5e60c022ad2296ab36c4db3bb51b59930f9f40: write /mnt/sda1/var/lib/docker/aufs/layers/6016c7ab9091a3333c335a505e5e60c022ad2296ab36c4db3bb51b59930f9f40: no space left on device4db3bb51b59930

I got 39GB fee space on my HD so not sure why I get that error.

Windows folder share

Hello,

I use boot2docker in windows 10 machine. I have successfully mounted my windows folder from Windows to boot2docker but now how to tell docker-compose.yml to mount the folder from boot2docker to the application code container? (i want to mount the folder to /var/www/symfony folder you use so I can develop from windows and see changes live)

php & composer commands not found inside dockersymfony_nginx_1

First of all, I want to think all the contributors to this amazing work.

I have installed this depo, and when I was inside the nginx container with docker exec -it dockersymfony_nginx_1 sh i can't execute both php and composer commands inside the container.

Ps: inside the /etc folder i don't found the php folder

how I can resolve this issue, please

Database host to paramaters.yml

Would it be worth talking about the parameters.yml where we can configure:

parameters:
#...
    database_host: db
#...

Because the linked containers are aliased in /etc/hosts.
It took me ~2h to figure this out...

ctype extension missing from php image

After adjusting the ports in docker-compose.yml, fixing php-fpm configuration and running the following commands:

docker-compose up -d
docker-compose run php /var/www/symfony/app/console

... I expected my Symfony 2.8 application to respond with the list of available commands but I ran into:

PHP Fatal error:  Call to undefined function Symfony\Component\Yaml\ctype_digit() in /var/www  /symfony/vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php on line 522

Now docker-compose run php php -m reveals that the ctype extension is NOT enabled in the php image.

[PHP Modules]

apc
apcu
Core
curl
date
ereg
fileinfo
filter
gd
hash
iconv
imagick
intl
json
libxml
mbstring
mcrypt
mysql
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
readline
Reflection
session
SimpleXML
SPL
standard
tokenizer
xml
xmlwriter
Zend OPcache
zlib

[Zend Modules]
Zend OPcache

The composition is currently not working with Symfony 2.8 at least.

Strange error - can't run magic

docker-compose up

Warning: the mapping "symfony:/var/www/symfony" in the volumes config for service "application" is ambiguous. In a future version of Docker, it will designate a "named" volume (see moby/moby#14242). To prevent unexpected behaviour, change it to "./symfony:/var/www/symfony"
Warning: the mapping "logs/symfony:/var/www/symfony/app/logs" in the volumes config for service "application" is ambiguous. In a future version of Docker, it will designate a "named" volume (see moby/moby#14242). To prevent unexpected behaviour, change it to "./logs/symfony:/var/www/symfony/app/logs"
Warning: the mapping "logs/nginx/:/var/log/nginx" in the volumes config for service "nginx" is ambiguous. In a future version of Docker, it will designate a "named" volume (see moby/moby#14242). To prevent unexpected behaviour, change it to "./logs/nginx/:/var/log/nginx"
Warning: the mapping "elk/logstash:/etc/logstash" in the volumes config for service "elk" is ambiguous. In a future version of Docker, it will designate a "named" volume (see moby/moby#14242). To prevent unexpected behaviour, change it to "./elk/logstash:/etc/logstash"
Warning: the mapping "elk/logstash/patterns:/opt/logstash/patterns" in the volumes config for service "elk" is ambiguous. In a future version of Docker, it will designate a "named" volume (see moby/moby#14242). To prevent unexpected behaviour, change it to "./elk/logstash/patterns:/opt/logstash/patterns"
client and server don't have same version (client : 1.19, server: 1.12)

docker -v

Docker version 1.0.1, build 990021a

docker-compose -v

docker-compose version: 1.4.0

No connections until MySQL init completes

If there is no database initialized when the container starts, then a default database will be created. While this is the expected behavior, this means that it will not accept incoming connections until such initialization completes. This may cause issues when using automation tools, such as docker-compose, which start several containers simultaneously.

user www-data not found

I get this error when docker up

2016/07/05 11:58:01 [emerg] 1#0: getpwnam("www-data") failed in /etc/nginx/nginx.conf:1

Pb docker-compose

I'm facing this docker-compose problem even if I'm using the config file as is on git.
I'm running on Boot2Docker-cli version: v1.7.0 on Mac OS.

โžœ  docker-symfony git:(master) docker-compose up  
Pulling application (symfony/code:latest)...
Pulling repository symfony/code
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "/compose/build/docker-compose/out00-PYZ.pyz/compose.cli.main", line 31, in main

Do you have any ideas?

Performance

I have some performances issues. I had an vagrant enviroment and I change my enviroment to docker, using this POC and adding a extra mongodb image in the docker-compose.yml for session cache purpose.

My problem is that I am facing problems with the performance of my web, I am using loadtest to test it and it takes around 7 second in each request. However using the same code with vagrant one request spend 391.6 ms.

I am using loadtest to test the time response.

Output for docker enviroment:

Tue Aug 15 2017 14:07:43 GMT+0200 (CEST)] INFO Requests: 0 (0%), requests per second: 0, mean latency: 0 ms
[Tue Aug 15 2017 14:07:48 GMT+0200 (CEST)] INFO Requests: 0 (0%), requests per second: 0, mean latency: 0 ms
[Tue Aug 15 2017 14:07:53 GMT+0200 (CEST)] INFO Requests: 1 (1%), requests per second: 0, mean latency: 6660.1 ms
[Tue Aug 15 2017 14:07:58 GMT+0200 (CEST)] INFO Requests: 2 (2%), requests per second: 0, mean latency: 7943 ms
[Tue Aug 15 2017 14:08:03 GMT+0200 (CEST)] INFO Requests: 2 (2%), requests per second: 0, mean latency: 0 ms
[Tue Aug 15 2017 14:08:08 GMT+0200 (CEST)] INFO Requests: 3 (3%), requests per second: 0, mean latency: 7487.2 ms
[Tue Aug 15 2017 14:08:13 GMT+0200 (CEST)] INFO Requests: 3 (3%), requests per second: 0, mean latency: 0 ms
[Tue Aug 15 2017 14:08:18 GMT+0200 (CEST)] INFO Requests: 4 (4%), requests per second: 0, mean latency: 8929.4 ms
[Tue Aug 15 2017 14:08:23 GMT+0200 (CEST)] INFO Requests: 4 (4%), requests per second: 0, mean latency: 0 ms
[Tue Aug 15 2017 14:08:28 GMT+0200 (CEST)] INFO Requests: 5 (5%), requests per second: 0, mean latency: 13982.8 ms
[Tue Aug 15 2017 14:08:33 GMT+0200 (CEST)] INFO Requests: 5 (5%), requests per second: 0, mean latency: 0 ms
[Tue Aug 15 2017 14:08:38 GMT+0200 (CEST)] INFO Requests: 5 (5%), requests per second: 0, mean latency: 0 ms
[Tue Aug 15 2017 14:08:43 GMT+0200 (CEST)] INFO Requests: 6 (6%), requests per second: 0, mean latency: 13372.4 ms
[Tue Aug 15 2017 14:08:48 GMT+0200 (CEST)] INFO Requests: 6 (6%), requests per second: 0, mean latency: 0 ms

Ourput for vagrant enviroment:

[Tue Aug 15 2017 14:19:14 GMT+0200 (CEST)] INFO Requests: 0 (0%), requests per second: 0, mean latency: 0 ms
[Tue Aug 15 2017 14:19:19 GMT+0200 (CEST)] INFO Requests: 10 (10%), requests per second: 2, mean latency: 472.3 ms
[Tue Aug 15 2017 14:19:24 GMT+0200 (CEST)] INFO Requests: 23 (23%), requests per second: 3, mean latency: 391.6 ms
[Tue Aug 15 2017 14:19:29 GMT+0200 (CEST)] INFO Requests: 36 (36%), requests per second: 3, mean latency: 387.6 ms
[Tue Aug 15 2017 14:19:34 GMT+0200 (CEST)] INFO Requests: 46 (46%), requests per second: 2, mean latency: 506 ms
[Tue Aug 15 2017 14:19:39 GMT+0200 (CEST)] INFO Requests: 59 (59%), requests per second: 3, mean latency: 388.2 ms
[Tue Aug 15 2017 14:19:44 GMT+0200 (CEST)] INFO Requests: 73 (73%), requests per second: 3, mean latency: 340.1 ms
[Tue Aug 15 2017 14:19:49 GMT+0200 (CEST)] INFO Requests: 88 (88%), requests per second: 3, mean latency: 332.9 m

Do you have any sugestion/idea about what could be happening?

ELK crash logstash after spawning and exited

elk_1 | 2017-03-30 08:15:29,783 CRIT Supervisor running as root (no user in config file)
elk_1 | 2017-03-30 08:15:29,784 WARN Included extra file "/etc/supervisor/conf.d/kibana.conf" during parsing
elk_1 | 2017-03-30 08:15:29,784 WARN Included extra file "/etc/supervisor/conf.d/logstash.conf" during parsing
elk_1 | 2017-03-30 08:15:29,784 WARN Included extra file "/etc/supervisor/conf.d/elasticsearch.conf" during parsing
elk_1 | 2017-03-30 08:15:29,796 INFO RPC interface 'supervisor' initialized
elk_1 | 2017-03-30 08:15:29,796 CRIT Server 'unix_http_server' running without any HTTP authentication checking
elk_1 | 2017-03-30 08:15:29,797 INFO supervisord started with pid 1
elk_1 | 2017-03-30 08:15:30,798 INFO spawned: 'elasticsearch' with pid 7
elk_1 | 2017-03-30 08:15:30,799 INFO spawned: 'logstash' with pid 8
elk_1 | 2017-03-30 08:15:30,800 INFO spawned: 'kibana' with pid 9
elk_1 | 2017-03-30 08:15:32,468 INFO success: elasticsearch entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:15:32,468 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:15:32,468 INFO success: kibana entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:15:49,745 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:15:50,749 INFO spawned: 'logstash' with pid 83
elk_1 | 2017-03-30 08:15:51,750 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:15:59,759 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:16:00,761 INFO spawned: 'logstash' with pid 113
elk_1 | 2017-03-30 08:16:01,767 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:16:08,982 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:16:09,984 INFO spawned: 'logstash' with pid 142
elk_1 | 2017-03-30 08:16:10,986 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:16:17,975 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:16:18,976 INFO spawned: 'logstash' with pid 172
elk_1 | 2017-03-30 08:16:19,979 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:16:26,884 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:16:27,886 INFO spawned: 'logstash' with pid 201
elk_1 | 2017-03-30 08:16:28,887 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:16:35,669 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:16:36,671 INFO spawned: 'logstash' with pid 230
elk_1 | 2017-03-30 08:16:37,672 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:16:44,391 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:16:45,392 INFO spawned: 'logstash' with pid 259
elk_1 | 2017-03-30 08:16:46,394 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:16:53,147 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:16:54,149 INFO spawned: 'logstash' with pid 288
elk_1 | 2017-03-30 08:16:55,150 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:17:01,896 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:17:02,898 INFO spawned: 'logstash' with pid 317
elk_1 | 2017-03-30 08:17:03,900 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:17:10,547 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:17:11,549 INFO spawned: 'logstash' with pid 346
elk_1 | 2017-03-30 08:17:12,550 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:17:19,130 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:17:20,132 INFO spawned: 'logstash' with pid 375
elk_1 | 2017-03-30 08:17:21,136 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:17:28,040 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:17:29,042 INFO spawned: 'logstash' with pid 404
elk_1 | 2017-03-30 08:17:30,047 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:17:36,991 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:17:37,993 INFO spawned: 'logstash' with pid 433
elk_1 | 2017-03-30 08:17:38,997 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:17:45,766 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:17:46,768 INFO spawned: 'logstash' with pid 462
elk_1 | 2017-03-30 08:17:47,771 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:17:56,453 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:17:57,455 INFO spawned: 'logstash' with pid 491
elk_1 | 2017-03-30 08:17:58,457 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:18:05,627 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:18:06,629 INFO spawned: 'logstash' with pid 520
elk_1 | 2017-03-30 08:18:07,631 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
elk_1 | 2017-03-30 08:18:14,686 INFO exited: logstash (exit status 1; not expected)
elk_1 | 2017-03-30 08:18:15,688 INFO spawned: 'logstash' with pid 549

Symfony 4 connection refused

While trying to run:
docker-compose run php bin/console doctrine:migrations:diff

I get the error:

In AbstractMySQLDriver.php line 112:
                                                                              
  An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused  
                                                                              

In PDOConnection.php line 50:
                                             
  SQLSTATE[HY000] [2002] Connection refused  
                                             

In PDOConnection.php line 46:
                                             
  SQLSTATE[HY000] [2002] Connection refused 

This is my config at doctrine.yaml:

doctrine:
    dbal:
        # configure these for your database server
        driver: 'pdo_mysql'
        server_version: '5.7'
        charset: utf8mb4
        default_table_options:
            charset: utf8mb4
            collate: utf8mb4_unicode_ci

        url: '%env(resolve:DATABASE_URL)%'

My symfony .env DATABASE_URL variable looks like this:
DATABASE_URL=mysql://root:[email protected]:3306/symfony also tried with DATABASE_URL=mysql://symfony:[email protected]:3306/symfony

The extrange thing here is that I can enter using DBeaver using both ways to connect
I cleared cache, rebuild/restarted containers...

ยฟDid I forgot something?

Nginx conf: sendfile off -> sendfile on ?

In the nginx conf you are using:

sendfile off;

When using assetic on symfony it will create trouble because of the cache during the develop time.
Should it be changed to sendfile on?

Symfony didn't work

Where I should put my symfony folder? home/Docker-symfony folder has size 80KB. and folders code, elk, logs, nginx, php-fpm, symfony that protected. I was insert into etc/hosts 127.0.0.1 symfony.dev but nothing wrong.

HTTPS Support?

Hi there.
That's an awesome Dockerfile, but still need some improvement to be production ready:
I was wondering how can it support HTTPS only Symfony projects? Can this be done on the nginx server?
Thanks for the input !

It seems that symfony4 need `php7-simplexml`

after i git clone a symfony 4 project from someone, i ran the command bellow to initialize the cache in contaner.

composer run-script post-update-cmd
php bin/console cache:warmup
mkdir var/cache/dev/profiler

then i have the error function simplexml_import_dom not found.

to fix this problem, just put a line php7-simplexml \ to the file docker-symfony/php-fpm/Dockerfile, and docker-compose build again.

Nginx cannot connect to upstream

HI all,
Thx for this project.
I'm getting an error with nginx. Kibana is displaying without errors.
But i'm always getting a 502 when i want to access the symfony.dev website.
What is going wrong?
I'm using the same conf files cloned from this repo.
Ubutnu 14.04 Lts is my OS.

CakePHP Version of this repository

I've developed a CakePHP variant of this repository (minus ELK stack) if anyone is interested. I was wondering if you would perhaps adopt it into an official branch of this core repository?

By the way, thank you very much for this wonderful start in which I was able to build a CakePHP version from. It is extremely appreciated!

Link

docker-cakephp

Improvements

In the CakePHP version I have also made some updates:

  • Ability to automatically clone source-code repositories into the docker-image upon start-up without having to keep your source-code inside of the primary cluster repository, this eases updates and keeps concerns separated
  • Ability to have your source-code running in a standalone container with a shared volume, to ease infrastructure/code updates and keep the concerns separated

Additional Links

Problems with permissions inside a container

Hello,

I've followed the setup instructions and got all containers running as expected. However, when visiting symfony.dev I see a blank page. When I inspected symfony error log I saw this message:

thrown in /var/www/symfony/app/bootstrap.php.cache on line 2659" while reading response header from upstream, client: 172.17.42.1, server: symfony.dev, request: "GET / HTTP/1.1", upstream: "fastcgi://172.17.0.19:9000", host: "symfony.dev"
2015/06/10 22:05:02 [error] 5#0: *22 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'Unable to write in the logs directory (/var/www/symfony/app/logs)
' in /var/www/symfony/app/bootstrap.php.cache:2659
Stack trace:
#0 /var/www/symfony/app/bootstrap.php.cache(2617): Symfony\Component\HttpKernel\Kernel->buildContainer()
#1 /var/www/symfony/app/bootstrap.php.cache(2396): Symfony\Component\HttpKernel\Kernel->initializeContainer()
#2 /var/www/symfony/app/bootstrap.php.cache(2427): Symfony\Component\HttpKernel\Kernel->boot()
#3 /var/www/symfony/web/app.php(28): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#4 {main}

I guess this has to do with permissions inside a container. How could I solve this problem?

Primary script unknown

when performing any request I get a the following entry in the nginx error log:

2015/06/04 15:15:35 [error] 5#0: *15 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 172.17.42.1, server: symfony.dev, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://172.17.0.238:9000", host: "symfony.dev"

do you have any idea what's wrong?

Error: image symfony/code:latest not found

Hi,

I wanted to try this project out and I get following error

$ docker-compose up
Recreating dockersymfony_application_1...
Pulling application (symfony/code:latest)...
Pulling repository symfony/code
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.main", line 31, in main
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.docopt_command", line 21, in sys_dispatch
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.command", line 34, in dispatch
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.docopt_command", line 24, in dispatch
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.command", line 66, in perform_command
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.main", line 460, in up
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.project", line 230, in up
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 332, in execute_convergence_plan
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 380, in recreate_container
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 208, in create_container
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 236, in ensure_image_exists
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 694, in pull
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.progress_stream", line 37, in stream_output
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.progress_stream", line 50, in print_output_event
compose.progress_stream.StreamOutputError: Error: image symfony/code:latest not found

docker compose file not working on os x

Hi there !

It's the first time I'm using docker so this might be a dumb issue: I've git pulled your repo, changed the occurences of FROM debian:jessie to FROM ubuntu:14.04 and ran docker-compose up in the boot2docker terminal. I get this:

bash-3.2$ docker-compose up
Creating docker_application_1...
Pulling image symfony/code:latest...
Pulling repository symfony/code
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "/compose/build/docker-compose/out00-PYZ.pyz/compose.cli.main", line 31, in main
  File "/compose/build/docker-compose/out00-PYZ.pyz/compose.cli.docopt_command", line 21, in sys_dispatch
  File "/compose/build/docker-compose/out00-PYZ.pyz/compose.cli.command", line 27, in dispatch
  File "/compose/build/docker-compose/out00-PYZ.pyz/compose.cli.docopt_command", line 24, in dispatch
  File "/compose/build/docker-compose/out00-PYZ.pyz/compose.cli.command", line 59, in perform_command
  File "/compose/build/docker-compose/out00-PYZ.pyz/compose.cli.main", line 464, in up
  File "/compose/build/docker-compose/out00-PYZ.pyz/compose.project", line 208, in up
  File "/compose/build/docker-compose/out00-PYZ.pyz/compose.service", line 214, in recreate_containers
  File "/compose/build/docker-compose/out00-PYZ.pyz/compose.service", line 199, in create_container
  File "/compose/build/docker-compose/out00-PYZ.pyz/compose.progress_stream", line 37, in stream_output
  File "/compose/build/docker-compose/out00-PYZ.pyz/compose.progress_stream", line 50, in print_output_event
compose.progress_stream.StreamOutputError: Error: image symfony/code:latest not found

many issues with this repository

after cloning and executing docker-compose up here is what i get:

php_1 | [22-Aug-2016 12:23:58] WARNING: Nothing matches the include pattern '/etc/php5/fpm.d/*.conf' from /etc/php5/php-fpm.conf at line 15.

db_1 | ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'root'@'%'
dockersymfonymaster_db_1 exited with code 1

Fedora: Unable to create the cache directory

Hi I have problem with setting permissions for my second computer with Fedora 25.
when I run symfony project over lamp everything is working but when I start it using docker I have this error message "Unable to create the cache directory".
My main computer is running osx and everyting is okay, but with Fedora I have problem with permissions for my symfony apps with docker.

I tried change permissions to 777 also commands from symfony doc (http://symfony.com/doc/current/setup/file_permissions.html)

Thank you.
MD

xdebug

How to add xdebug module?

Error on `docker-compose up`

Issue

The following error displays on docker-compose up.

ERROR: Couldn't connect to Docker daemon - you might need to run docker-machine start default.

Expected

No error

Steps to reproduce

  1. Clone repository with $ git clone [email protected]:eko/docker-symfony.git

  2. Symlink Symfony repo to a symfony/ dir inside docker-symfony/; ln -s /path/to/project /path/to/docker-symfony/symfony

  3. Add ip.of.docker.host symfony.dev to /etc/hosts.

  4. Run docker-compose up

  5. Error shows after the line

    elk_1 | 2016-03-27 23:45:57,241 INFO success: kibana entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
    ERROR: Couldn't connect to Docker daemon - you might need to run docker-machine start default.

Screenshot

screen shot 2016-03-28 at 8 08 50 am

Notes

  • I'm on OSX v10.9.5 (Mavericks)

  • Running docker-machine start default results in:

    Starting "default"...
    Machine "default" is already running.

  • The setup seems to work; I can access the symfony project at symfony.dev with no problem. Same with Kibana at symfony.dev:81.

screen shot 2016-03-28 at 8 14 43 am

screen shot 2016-03-28 at 8 14 22 am

Nginx refuses to connect

Hi, I make docker-compose up succesfull (only logstash can't find the config - I'd commented it for now), then I add 127.0.0.1 symfony.dev into my hosts file, open in browser http://symfony.dev and get net::ERR_CONNECTION_REFUSED

don't have access to Kibana

Hi there! First of all, thanks for this contribution, so usefull !!

I'm trying to access to kibana through this url : http://symfony.dev:81/ but it's doesn't work.
Message : ERR_CONNECTION_REFUSED

Here is my Vagrantfile, I change the IP of my host docker machine.

VAGRANTFILE_API_VERSION = "2"

  Vagrant.configure(2) do |config|

    config.vm.box = "ubuntu/trusty64"
    config.vm.network "private_network", ip: "192.168.20.100"
    config.vm.hostname = "zzz-1"

    config.vm.provision :docker
    config.vm.provision :docker_compose, yml: "/vagrant/docker-compose.yml", rebuild: true, run: "always"

  end

Failed to write cache file

After i use bin/console make:controller create a new controller, i failed to see the page from browser:

IOException
Failed to write file "/var/www/symfony/var/cache/dev/srcDevDebugProjectContainer.xml".

it seems not the permissions problem, because i can use file_put_contents("/var/www/symfony/var/cache/dev/srcDevDebugProjectContainer.xml", "xxxx") to write the file.

how to fix this problem?

symfony folder not automatically updated in docker container

I'm running on os x with boot2docker:

bash-3.2$ docker version
Client version: 1.6.2
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 7c8fca2
OS/Arch (client): darwin/amd64
Server version: 1.6.2
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 7c8fca2
OS/Arch (server): linux/amd64

I've set my symfony folder as a symbolic link to the parent folder. When I edit a file (for example web/config.php), it doesn't get changed in the docker container (when I refresh the web page in the browser, nothing changed).

The symfony folder isn't synchronized at each change ?

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.