Skip to content

pitylee/emailMarketingTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel tool

For the Laravel Tool

Go to the Laravel readme found in its corresponding readme

Laradock

Initialize the repository

You can download the repo as a zip, or clone on your workspace if you have the proper git setup:

git clone git@github.com:pitylee/emailMarketingTool.git

If you are not already in laradock directory, first change the current dir where you have the project:

cd /path/to/project/dir/

And then pull the laradock submodule, in some cases with older version of git this is needed:

git submodule update --init --recursive

❗IMPORTANT❗

With the latest Laradock version you will get some errors during the docker-compose build, that can be easily fixed by injecting some dependencies, in this case, since it is a submodule, it is required to do so after the submodule got initialised, in the Laradock workspace Dockerfile with the command:

awk '{sub(/apt-utils/,"libargon2-1 libidn2-0 libpcre2-8-0 libpcre3 libxml2 libzstd1 apt-utils")}1' ./laradock/workspace/Dockerfile > ./laradock/workspace/Dockerfile.txt && mv ./laradock/workspace/Dockerfile.txt ./laradock/workspace/Dockerfile

Dependencies

While a stable internet connection is needed, you may have to install Docker (Desktop) and Docker Compose if you don't have already installed. If you still have to install, please follow the official docs to do so here and here.

Before we begin

Give exec permission to laradock

To give executive permission, run the following command:

chmod +x ./.start

Copy conf and env files

You have to copy the nginx default.conf file from the root, to the laradock submodule's nginx sites directory:

cp default.conf ./laradock/nginx/sites/default.conf

You have to copy the corresponding .env file from the root, to the laradock submodule's directory:

cp .env.laradock ./laradock/.env

You have to copy the corresponding .env file from the root, to the tool directory for Laravel:

cp .env.laravel ./tool/.env

Usage

If you have already ran ./start or the docker-compose commands

At this point, if you have already ran Laradock, you have to restart your Docker Desktop, and re-build the images, more specifically the nginx one, in order to force load the nginx configuration.

Start docker environment

For short usage on Mac and Linux, you can run via the file which contains the commands:

    bash .start 

This will run the docker-compose commands, or you can rule them manually, via running in the terminal of your preference:

cd ./laradock

docker-compose up -d --build nginx mysql redis php-worker

docker-compose exec --user=laradock workspace bash

In the Laradock environment

When you see the that the Docker containers are up and running, and entered the workspace with one of the two solutions from above, you want to do a few small things:

First you want to navigate to /var/www/tool:

cd tool/

Install composer packages for Laravel

composer install 

Generate a secure key for Laravel

php artisan key:generate

Mysql password check and migration

By default, the username and password for Laradock Mysql will be root:root. This is included in the .env, but you may want to double check with DBeaver, your Database editor of your <3's choice.

The migration:

php artisan migrate

The seeds:

php artisan db:seed ...

The tests:

php artisan test

Handy

  • It can come in handy, that we have logs about the incoming requests + the generated MAC can be seen there as well. GUI for this: http://localhost/log-viewer/

Troubleshoot

  • If you have a 500 error, in the laradock/ folder:
docker-compose logs nginx
  • For when Docker fails to run LLB, run in your terminal, or edit+source your .(z)shrc the following:
export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors