Topics coming in the next edition:
- ✅ Load balancers from scratch (published on 10th of October)
- ✅ Terraform (published on 12th of November)
- HELM
- Serving static content
- CGI, FastCGI, php-fpm
| version: '3.7' | |
| services: | |
| elasticsearch: | |
| image: elasticsearch:7.9.2 | |
| ports: | |
| - '9200:9200' | |
| environment: | |
| - discovery.type=single-node | |
| ulimits: |
mkdir pem
cd pem
ssh-keygen -b 2048 -f identity -t rsa
| // app/Console/Kernel.php | |
| <?php | |
| namespace App\Console; | |
| use Illuminate\Console\Scheduling\Schedule; | |
| use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | |
| class Kernel extends ConsoleKernel |
This is a simple way of importing MySQL database in Docker.
In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.
Put the exported sql file in the shared folder.
Login to your Docker instance via docker exec -it DOCKER_CONTAINER_ID bin/bash.
Login to MySQL via mysql -u USERNAME -p.
Install Supervisor with sudo apt-get install supervisor in Unix or brew install supervisor in Mac OSX. Ensure it's started with sudo service supervisor restart in Unix or brew services start supervisor in Mac OSX.
In Unix in /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.
In Mac OSX first run supervisord -c /usr/local/etc/supervisord.ini and in /usr/local/etc/supervisor.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.
This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.
Now update Supervisor with: sudo supervisorctl reread in Unix and with: brew services restart supervisor in MAc OSX . And start using those changes with: sudo supervisorctl update.
$ sudo npm install -g hexo-cli
$ hexo -v
hexo-cli: 0.1.9
The API we are creating in this gist will follow these rules :
password Grant Type only (no need for Authorization pages and such).v1.api.example.com)The API will be written in PHP with the Symfony 3 framework. The following SF2 bundles are used :