Comments (1)
Hello @benjaminjonard ,
If you are in the PHP container (docker-compose exec php bash
), try to ping the redis container.
Here, is my result:
root@597b06d48146:/var/www/symfony# ping redis
PING redis (172.19.0.3): 56 data bytes
64 bytes from 172.19.0.3: icmp_seq=0 ttl=64 time=0.106 ms
64 bytes from 172.19.0.3: icmp_seq=1 ttl=64 time=0.070 ms
64 bytes from 172.19.0.3: icmp_seq=2 ttl=64 time=0.067 ms
64 bytes from 172.19.0.3: icmp_seq=3 ttl=64 time=0.077 ms
^C--- redis ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.067/0.080/0.106/0.000 ms
So, redis host is reachable.
If you are using the SncRedisBundle, you have to fill the configuration file like this:
#config.yml
snc_redis:
clients:
default:
type: predis
alias: default
dsn: redis://localhost
In my README.md, I use something like that (in the parameters.yml file):
# path/to/your/symfony-project/app/config/parameters.yml
parameters:
redis_host: redis
So, you need to adapt the config file like this:
snc_redis:
clients:
default:
# ...
dsn: redis://%redis_host%
In my humble opinion, it's not a good idea to put the full IP address/dsn in a config file. This is why I was using the parameters.yml.
Kind regards,
Maxence
from docker-symfony.
Related Issues (20)
- Symfony logs in Kibana HOT 1
- File not found HOT 13
- schema update error HOT 2
- Host data not getting through HOT 1
- ELK on ECS
- how does it work with Symfony HOT 1
- Is there a way to use cron
- missing intl PHP extension during the rendering of a template HOT 1
- Composer could not find a composer.json file in /var/www/symfony HOT 1
- Symfony 4 is not working with this HOT 1
- Combine Nginx & Php-fpm in the same container HOT 1
- Permission denied when trying to update the /etc/hosts
- Composer could not find a composer.json file in /var/www/symfony HOT 1
- adding nodejs image does not work
- Cant access to Containers from host HOT 1
- PHP 5.6 version HOT 2
- Nginx Bad Gateway HOT 2
- ELK keeps restarting? HOT 1
- SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client HOT 6
- Problem fastcgi HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-symfony.