Skip to content

Instantly share code, notes, and snippets.

@grodrigo
Last active June 1, 2020 18:26
Show Gist options
  • Save grodrigo/bf16e39b64ea2283af000c731fcec3f6 to your computer and use it in GitHub Desktop.
Save grodrigo/bf16e39b64ea2283af000c731fcec3f6 to your computer and use it in GitHub Desktop.
laravel bagisto create project with docker

Install bagisto laravel ecommerce with docker-compose

requierements: docker and docker-compose

## get the lastest docker image:
docker pull grodrigo/laravel
## first clone a general laravel setup:
git clone https://gitlab.com/grodrigo.dev/laravel.git bagisto
cd bagisto
cp .env.example .env
## edit .env file of docker, change
nano .env
NAME=bagisto

## change at the end of docker-compose.yml the network and volume names with the name given in .env (bagisto)
nano docker-compose.yml
rm -rf src/
mkdir src

install batisto from github to get the lastest code (https://github.com/bagisto/bagisto)

gti clone https://github.com/bagisto/bagisto.git src
### edit src/.env and change database settings, in DB_HOST remember to put mysql as in your docker-compose service settings
cp src/.env.example .env
nano src/.env
docker-compose exec app composer install
docker-compose exec app php artisan key:generate
docker-compose exec app php artisan bagisto:install

install bagisto with composer

docker-compose exec app composer create-project bagisto/bagisto
### edit src/.env and change database settings, in DB_HOST remember to put mysql as in your docker-compose service settings
cp src/.env.example .env
nano src/.env
### don't set DB_PREFIX due to a bug recently fixed at the code but not yet into the composer installation)
docker-compose exec app php artisan bagisto:install

How to login as admin: http(s)://localhost:8085/admin/login email: admin@example.com password: admin123 How to login as customer: You can directly register as a customer and then login. http(s)://localhost:8085/customer/register

the command php artisan bagisto:install

is the same as to do: php artisan migrate php artisan db:seed php artisan vendor:publish php artisan storage:link composer dump-autoload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment