Create network from dedicated local ip
- If the network uses this ip then select others (eg 172.255.0.1 or similar)
docker network create nginx-proxy --subnet=172.18.0.0/16 --gateway=172.18.0.1
Inspect network
docker network inspect nginx-proxy
Add to /ete/hosts IP gateway
- Also change the IP gateway in the .env file NGINX_PROXY_IP=172.18.0.1
sudo echo "172.18.0.1 symfonytests.lh" >> /etc/hosts
- Copy .env.disc to .env in _develop folder. and change ports to your requirments.
- Copy .env to .env.local in symfony folder.
cp .env .env.local
- Update MERCURE_PUBLISH_URL and MERCURE_JWT_SECRET.
Remember to have the same values in .env and in jwt.io key generator. docker-compose build
docker-compose up -d
composer install
- Open http://symfonytests.lh/test/cookie to set cookie.
- Open http://symfonytests.lh/test/receive to wait for new messages.
- Now open in the new tab http://symfonytests.lh/test/publish to send new message.
- Look at the first window for response.
You must change your-256-bit-secret to your secret provided in _develop/.env