diff --git a/README.md b/README.md index 85b47e6..6201258 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,8 @@ Sitio de servicio Angular 18.x: [http://192.168.33.99:4200](http://192.168.33.99 Sitio de servicio SpringBoot 3.x: [http://192.168.33.99:5800](http://192.168.33.99:5800) +Sitio de servicio Mailpit: [http://192.168.33.99:8025](http://192.168.33.99:8025) +
**NOTA:** Si no se está usando Vagrant como máquina virtual es necesario cambiar la dirección IP (`192.168.33.99`) de la caja de Vagrant @@ -133,25 +135,47 @@ por `localhost`, en archivos de Dockerfile y Docker-compose. Ejecuta el siguiente comando, desde la terminal. ```shell -$ docker-compose up --build +$ cd workspace ``` -**Paso 2)** Accerder al servicio docker-compose de Laravel 11.x para. +**Paso 2)** Convetir el achivo `setup.sh` en un archivo ejecutable o script de linux y ejecutarló. + +Además de crear variable de entorno, instalar nodejs, y crear alias para linux Ejecuta el siguiente comando, desde la terminal. ```shell -$ docker-compose exec service_laravel /bin/bash +$ dos2unix ./setup.sh && ./setup.sh && source ~/.bashrc ``` -**Paso 3)** Dentro del servicio docker-compose de Laravel 11.x para ejecutar seeders. +**Paso 3)** Construir todos los servicios de docker-compose -Ejecuta el siguiente comando, desde la terminal. +Se construye la imagen, contenedor y ejecuta cada servicio que compone docker-compose ```shell -$ php artisan db:seed --class=DatabaseSeeder +$ doc-again ``` +**Paso 4)** Comienza a probar el proyecto + +Felicidades ya puedes acceder a los sitios del proyecto, que son: + +- Sitio de servicio Laravel 11.x: [http://192.168.33.99:8000](http://192.168.33.99:8000) + + usuario: admin@admin.com + + contraseña: password + +- Sitio de servicio Angular 18.x: [http://192.168.33.99:4200](http://192.168.33.99:4200) + + usuario: victor.maximo@example.com + + contraseña: password + +- Sitio de servicio SpringBoot 3.x: [http://192.168.33.99:5800](http://192.168.33.99:5800) + +- Sitio de servicio Mailpit: [http://192.168.33.99:8025](http://192.168.33.99:8025) +
# Vista previas @@ -177,3 +201,9 @@ $ php artisan db:seed --class=DatabaseSeeder ![preview10.jpg](/screenshots/preview_10.jpg) ![preview11.jpg](/screenshots/preview_11.jpg) + +![preview11.jpg](/screenshots/preview_12.jpg) + +![preview11.jpg](/screenshots/preview_13.jpg) + +![preview11.jpg](/screenshots/preview_14.jpg) diff --git a/Vagrantfile b/Vagrantfile index 3328d2f..8f913bb 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -101,7 +101,7 @@ Vagrant.configure("2") do |config| # *OJO* : Corre solo una vez usando `vagrant up` config.vm.provision "install-docker", type: "docker", - images: ["mysql:5.7", "maven:3.6.3-openjdk-17-slim", "shinsenter/laravel:php8.2-alpine", "node:20.11.1-alpine"] + images: ["mysql:5.7", "maven:3.6.3-openjdk-17-slim", "shinsenter/laravel:php8.2-alpine", "node:20.11.1-alpine", "axllent/mailpit"] #config.vm.provider "vmware_fusion" do |v| # v.vmx["vhv.enable"] = "TRUE" diff --git a/docker-compose.yml b/docker-compose.yml index fb6a1cd..6bf768e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -51,6 +51,7 @@ services: php artisan cache:clear && php artisan view:clear && php artisan route:clear && + php artisan db:seed --class=DatabaseSeeder && nginx -g 'daemon off;' " depends_on: diff --git a/screenshots/preview_12.jpg b/screenshots/preview_12.jpg new file mode 100644 index 0000000..4742c1b Binary files /dev/null and b/screenshots/preview_12.jpg differ diff --git a/screenshots/preview_13.jpg b/screenshots/preview_13.jpg new file mode 100644 index 0000000..fc99de7 Binary files /dev/null and b/screenshots/preview_13.jpg differ diff --git a/screenshots/preview_14.jpg b/screenshots/preview_14.jpg new file mode 100644 index 0000000..9c46309 Binary files /dev/null and b/screenshots/preview_14.jpg differ diff --git a/setup.sh b/setup.sh index 35c3058..71d20f6 100644 --- a/setup.sh +++ b/setup.sh @@ -14,7 +14,11 @@ echo ' ' >> /home/vagrant/.bashrc echo '# Creando alias para docker-compose y docker' >> /home/vagrant/.bashrc echo 'alias doc=docker-compose' >> /home/vagrant/.bashrc echo 'alias doc-rm="docker-compose stop && docker-compose rm --force"' >> /home/vagrant/.bashrc -echo 'alias doc-again="docker-compose stop && docker-compose rm --force && docker-compose build && docker-compose up"' >> /home/vagrant/.bashrc +echo 'alias doc-ps="docker-compose ps --all"' >> /home/vagrant/.bashrc +echo 'alias doc-laravel="docker-compose exec service_laravel /bin/bash"' >> /home/vagrant/.bashrc +echo 'alias doc-logs="docker-compose logs"' >> /home/vagrant/.bashrc +echo 'alias doc-down="docker-compose stop && docker-compose rm --force"' >> /home/vagrant/.bashrc +echo 'alias doc-up="docker-compose stop && docker-compose rm --force && docker-compose build && docker-compose up"' >> /home/vagrant/.bashrc echo 'alias docker-ps-clean="docker container prune -f"' >> /home/vagrant/.bashrc echo 'alias docker-images-clean="docker rmi $(docker images -f "dangling=true" -q)"' >> /home/vagrant/.bashrc echo ' ' >> /home/vagrant/.bashrc