title: Setting Up Laravel in Ubuntu / DigitalOcean keywords: servers, laravel, coderstape, coder's tape description: Let's take a look at settting up a server from scratch for Laravel. date: April 1, 2019 tags: servers, laravel permalink: setting-up-laravel-in-ubuntu-digitalocean img: https://coderstape.com/storage/uploads/GZTXUbyGum2xeUZM9qBD5aPv8EKLwG3C8RGcRon4.jpeg author: Victor Gonzalez authorlink: https://github.com/vicgonvt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
vendor/bin/phpunit | |
(git push) || true | |
git checkout production | |
git merge master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Laravel Vapor CD | |
on: | |
release: | |
types: [ published, deleted ] | |
branches: | |
- master | |
jobs: | |
deploy_release: | |
runs-on: ubuntu-20.04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Preview Environment | |
on: | |
pull_request: | |
types: [opened] | |
env: | |
FORGE_API_TOKEN: ${{ secrets.FORGE_API_TOKEN }} | |
FORGE_SERVER_ID: ${{ secrets.FORGE_SERVER_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function quadraticRegression($dataPoints) { | |
$sumX = 0; | |
$sumX2 = 0; | |
$sumX3 = 0; | |
$sumX4 = 0; | |
$sumY = 0; | |
$sumXY = 0; | |
$sumX2Y = 0; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function polyfit($dependentValues, $independentValues, $countOfElements, $order, &$coefficients) | |
{ | |
// Declarations... | |
// ---------------------------------- | |
$maxOrder = 5; | |
$B = array_fill(0, $maxOrder + 1, 0.0); | |
$P = array_fill(0, (2 * ($maxOrder + 1)) + 1, 0.0); | |
$A = array_fill(0, (2 * ($maxOrder + 1)) * ($maxOrder + 1), 0.0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: '[PROJECT NAME]' | |
'on': | |
push: | |
branches: | |
- master | |
- develop | |
- 'releases/**' | |
pull_request: null | |
env: | |
working_directory: ./application |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user web; | |
# One worker process per CPU core. | |
worker_processes 8; | |
# Also set | |
# /etc/security/limits.conf | |
# web soft nofile 65535 | |
# web hard nofile 65535 | |
# /etc/default/nginx |
NewerOlder