-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from specialtactics/v1
Version 1 PR (Open for ongoing review until finalised)
- Loading branch information
Showing
33 changed files
with
2,966 additions
and
43 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,11 @@ | |
|
||
class UserStorySeeder extends BaseSeeder | ||
{ | ||
/** | ||
* Credentials | ||
*/ | ||
const ADMIN_CREDENTIALS = ['[email protected]', 'secret']; | ||
|
||
public function runFake() | ||
{ | ||
// Grab all roles for reference | ||
|
@@ -13,10 +18,17 @@ public function runFake() | |
// Create an admin user | ||
factory(App\Models\User::class)->create([ | ||
'name' => 'Admin', | ||
'email' => '[email protected]', | ||
'email' => static::ADMIN_CREDENTIALS[0], | ||
'primary_role' => $roles->where('name', 'admin')->first()->role_id, | ||
]); | ||
|
||
// Create regular user | ||
factory(App\Models\User::class)->create([ | ||
'name' => 'Bob', | ||
'email' => '[email protected]', | ||
'primary_role' => $roles->where('name', 'regular')->first()->role_id, | ||
]); | ||
|
||
// Get some random roles to assign to users | ||
$fakeRolesToAssignCount = 3; | ||
$fakeRolesToAssign = RoleTableSeeder::getRandomRoles($fakeRolesToAssignCount); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
version: '3.7' | ||
|
||
services: | ||
|
||
# Workspace Container | ||
workspace: | ||
container_name: your_project_workspace | ||
build: | ||
context: ./env/docker/workspace | ||
args: | ||
- PHP_VERSION=${PHP_VERSION} | ||
- PHP_XDEBUG_ENABLE=${PHP_XDEBUG_ENABLE} | ||
- PHP_XDEBUG_VERSION=${PHP_XDEBUG_VERSION} | ||
- PHP_XDEBUG_REMOTE_CONNECT_BACK=${PHP_XDEBUG_REMOTE_CONNECT_BACK} | ||
- COMPOSER_PROCESS_TIMEOUT=${COMPOSER_PROCESS_TIMEOUT} | ||
volumes: | ||
- ./:/var/www:cached | ||
- ~/.ssh:/home/laradock/.ssh | ||
- ~/.gitconfig:/home/laradock/.gitconfig | ||
- ~/.config/composer:/home/laradock/.config/composer | ||
- ~/.aws:/home/laradock/.aws | ||
tty: true | ||
networks: | ||
- your_project_network | ||
|
||
# PHP-FPM | ||
php-fpm: | ||
container_name: your_project_php_fpm | ||
build: | ||
context: ./env/docker/php-fpm | ||
args: | ||
- PHP_VERSION=${PHP_VERSION} | ||
- PHP_XDEBUG_ENABLE=${PHP_XDEBUG_ENABLE} | ||
- PHP_XDEBUG_VERSION=${PHP_XDEBUG_VERSION} | ||
- PHP_XDEBUG_REMOTE_CONNECT_BACK=${PHP_XDEBUG_REMOTE_CONNECT_BACK} | ||
volumes: | ||
- ./:/var/www:cached | ||
depends_on: | ||
- workspace | ||
networks: | ||
- your_project_network | ||
|
||
# NGINX | ||
nginx: | ||
container_name: your_project_nginx | ||
build: | ||
context: ./env/docker/nginx | ||
volumes: | ||
- ./:/var/www:cached | ||
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx | ||
depends_on: | ||
- php-fpm | ||
- postgres | ||
environment: | ||
- HTTPS_METHOD=${HTTPS_METHOD} | ||
ports: | ||
- 80:80 | ||
networks: | ||
- your_project_network | ||
|
||
# PostgreSQL | ||
postgres: | ||
container_name: your_project_postgres | ||
build: | ||
context: ./env/docker/postgres | ||
volumes: | ||
- ${DATA_PATH_HOST}postgres:/var/lib/postgresql/data | ||
environment: | ||
- POSTGRES_DB=${POSTGRES_DB} | ||
- POSTGRES_USER=${POSTGRES_USER} | ||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
networks: | ||
- your_project_network | ||
|
||
# Redis | ||
redis: | ||
container_name: your_project_redis | ||
image: "redis" | ||
hostname: your_project_redis | ||
networks: | ||
- your_project_network | ||
|
||
# Volumes configuration | ||
volumes: | ||
postgres: | ||
driver: "local" | ||
|
||
# Network configuration | ||
networks: | ||
your_project_network: | ||
name: your_project_network |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
composer install | ||
composer dump-autoload --optimize | ||
php artisan ide-helper:generate | ||
php artisan ide-helper:meta |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.idea | ||
/logs | ||
/data | ||
.env | ||
/.project | ||
.docker-sync | ||
/jenkins/jenkins_home |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM nginx:alpine | ||
|
||
COPY nginx.conf /etc/nginx/ | ||
COPY sites/laravel.conf /etc/nginx/conf.d/ | ||
COPY upstream.conf /etc/nginx/conf.d/ | ||
RUN rm -f /etc/nginx/conf.d/default.conf | ||
|
||
RUN set -x ; \ | ||
addgroup -g 82 -S www-data ; \ | ||
adduser -u 1000 -D -S -G www-data www-data && exit 0 ; exit 1 | ||
|
||
EXPOSE 80 443 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
user www-data; | ||
worker_processes 4; | ||
pid /run/nginx.pid; | ||
# daemon off; | ||
|
||
events { | ||
worker_connections 2048; | ||
multi_accept on; | ||
use epoll; | ||
} | ||
|
||
http { | ||
server_tokens off; | ||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 15; | ||
types_hash_max_size 2048; | ||
client_max_body_size 20M; | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
access_log /dev/stdout; | ||
error_log /dev/stderr; | ||
gzip on; | ||
gzip_disable "msie6"; | ||
|
||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | ||
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS'; | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
include /etc/nginx/sites-available/*.conf; | ||
open_file_cache off; # Disabled for issue 619 | ||
charset UTF-8; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
server { | ||
|
||
listen 80; | ||
listen [::]:80; | ||
|
||
server_name localhost; | ||
root /var/www/public; | ||
index index.php index.html index.htm; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php$is_args$args; | ||
} | ||
|
||
location ~ \.php$ { | ||
try_files $uri /index.php =404; | ||
fastcgi_pass php-upstream; | ||
fastcgi_index index.php; | ||
fastcgi_buffers 16 16k; | ||
fastcgi_buffer_size 32k; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
#fixes timeouts | ||
fastcgi_read_timeout 600; | ||
include fastcgi_params; | ||
} | ||
|
||
location ~ /\.ht { | ||
deny all; | ||
} | ||
|
||
location /.well-known/acme-challenge/ { | ||
root /var/www/letsencrypt/; | ||
log_not_found off; | ||
} | ||
|
||
error_log /var/log/nginx/laravel_error.log; | ||
access_log /var/log/nginx/laravel_access.log; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
upstream php-upstream { | ||
server php-fpm:9000; | ||
} |
Oops, something went wrong.