mchekin / rpg

Online Role Playing Game (based on Laravel)
MIT License
188 stars 52 forks source link

Configurando docker-compose in project. #71

Closed ricardosierra closed 3 years ago

ricardosierra commented 4 years ago

To use run use: docker-compose up

The first time is needed create the external network with "docker network create outside"

And after up containers is need run migrates:

docker exec -it rpg_php_1 bash -c "php artisan migrate --seed"

Or enter in container

docker exec -it rpg_php_1 bash

And run migrates:

php artisan migrate --seed
mchekin commented 4 years ago

@ricardosierra

Hey

Thank you for your pull request.

Unfortunately currently running docker-compose up results in:

ERROR: Network outside declared as external, but could not be found. Please create the network manually using docker network create outside and try again.

ricardosierra commented 4 years ago

Sorry for the delay, I am having difficult days.

It is mandatory to create the network. I usually put this in the readme. To remove this as well, it serves to isolate in several networks, all containers communicate only within that network. The only one that your accesses outside the docker is "nginx" that is both inside the "outside" network and the "internal" network. The internal he doesn't complain about, but this outside is mandatory to create once regardless of how many projects to use.

networks:
   outside:
     external: true
   internal:
     driver: bridge

I believe it is more important in production than in development. Can I take what you think?

mchekin commented 3 years ago

@ricardosierra

Thank you for your contribution. I took some inspiration from your pull request, but since there was no answer for sometime in this thread I continued with my own branch and merged it. https://github.com/mchekin/rpg/pull/72

Please tell me if you think there any issues with it.