GeniusesOfSymfony / WebsocketAppDemo

Demo of GosWebSocketBundle
MIT License
40 stars 24 forks source link

Suggestion for docs: please add docker-compose instructions #13

Open pluseg opened 4 years ago

pluseg commented 4 years ago

It's just a reminder for all people who try to run this project with docker-compose. I got errors

Solution: you should specify HOST=0.0.0.0 instead of 127.0.0.1.

Here is a sample docker-compose file:

version: '3.2'

services:
    web:
        build: app/docker/php
        ports:
            - 9000:9000
            - 1337:1337
        volumes:
            - ./:/var/www/html
        environment:
            SYMFONY_ENV: dev
        entrypoint: app/docker/php/docker-entrypoint.sh
    nginx:
        image: nginx:latest
        ports:
            - 80:80
        environment:
            - NGINX_PORT=80
            - WWW_DIR=/var/www/html/public
        volumes:
            - ./app/docker/nginx:/etc/nginx/conf.d
            - ./:/var/www/html
            - ./var/logs/nginx:/var/log/nginx
        command: /bin/bash -c "exec nginx -g 'daemon off;'"

networks:
    default:

I could provide files that I have in "app/docker" folder if needed. Or could create a Pull request if you'd like.