datxto / framgia-laravel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

framgia-laravel

Build Status

Build Status

Preparation

Installing Docker

The Docker installation package available in the official Ubuntu 16.04 repository may not be the latest version. To get the latest and greatest version, install Docker from the official Docker repository. This section shows you how to do just that.

First, add the GPG key for the official Docker repository to the system:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Add the Docker repository to APT sources:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Next, update the package database with the Docker packages from the newly added repo:

sudo apt-get update

Make sure you are about to install from the Docker repo instead of the default Ubuntu 16.04 repo:

apt-cache policy docker-ce

Finally, install Docker:

sudo apt-get install -y docker-ce

Docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it's running:

sudo systemctl status docker

References:

Installing Docker Compose

Run this command to download the latest version of Docker Compose:

sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Apply executable permissions to the binary:

sudo chmod +x /usr/local/bin/docker-compose

Test the installation.

docker-compose --version

References:

Development

Setting up development environment

  • Copy config files
cp docker-compose.dev.yml docker-compose.yml
cp .env.dev.example .env
  • Start docker containers
docker-compose up -d
  • Install dependences, migrate, and seed data
docker-compose exec workspace composer install --dev --no-interaction
docker-compose exec workspace php artisan migrate --seed
docker-compose exec workspace php artisan migrate --database=mysql_test --seed
  • Generate application encryption key
docker-compose exec workspace php key:generate

Working

  • Test before sending a pull request
sh test.sh
  • Enter the docker workspace container
docker-compose exec workspace bash

Production

About


Languages

Language:PHP 95.8%Language:HTML 3.3%Language:Vue 0.7%Language:Shell 0.3%