Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp committed May 11, 2023
0 parents commit d55a708
Show file tree
Hide file tree
Showing 113 changed files with 15,933 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.git
.gitignore
Makefile
README.md
assets
.editorconfig
.dockerignore
CHANGELOG.md
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml,yaml.dist}]
indent_size = 2

[*.{neon,neon.dist}]
indent_size = 2

[Makefile]
indent_style = tab
95 changes: 95 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#######################################
# Project environment variables
#######################################

# Should be same with downloaded and configured docker-shared-services
# Default: ss - ([S]hared [S]ervices)
# More info in repository docs: https://github.com/wayofdev/docker-shared-services
SHARED_SERVICES_NAMESPACE=${SHARED_SERVICES_NAMESPACE}

# Should be same with downloaded and configured docker-project-services
# Default: wod
# More info in repository docs: https://github.com/wayofdev/docker-project-services
PROJECT_SERVICES_NAMESPACE=${PROJECT_SERVICES_NAMESPACE}

# https://docs.docker.com/compose/reference/envvars/#compose_project_name
# With custom namespace provided, it will be used to prefix all services
# in Docker network for current project
COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME}

#######################################
# Laravel default environment variables
#######################################

APP_NAME=${APP_NAME}
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=https://api.${COMPOSE_PROJECT_NAME}.docker

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=wod
DB_USERNAME=wod
DB_PASSWORD=password

CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

#######################################
# Sentry
#######################################

SENTRY_LARAVEL_DSN=https://[email protected]/1234567890
SENTRY_TRACES_SAMPLE_RATE=1.0

#######################################
# Deployer
#######################################

# Create slack app and add incoming webhook urls
# https://api.slack.com/messaging/webhooks
DEPLOYER_STAGING_SLACK_WEBHOOK=https://hooks.slack.com/services/XXXXXXX/XXXXX/XXXXXX
DEPLOYER_STAGING_REMOTE_USER=staging-xxxxx
DEPLOYER_STAGING_HOST=staging.laravel-starter-tpl.wayof.dev
DEPLOYER_STAGING_BRANCH=develop

DEPLOYER_PROD_SLACK_WEBHOOK=https://hooks.slack.com/services/XXXXXXX/XXXXX/XXXXXX
DEPLOYER_PROD_REMOTE_USER=prod-xxxxx
DEPLOYER_PROD_HOST=prod.laravel-starter-tpl.wayof.dev
DEPLOYER_PROD_BRANCH=master

# https://wayofdev.sentry.io/settings/account/api/auth-tokens/
DEPLOYER_SENTRY_TOKEN=50b88fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DEPLOYER_SENTRY_ORG=wayofdev
DEPLOYER_SENTRY_PROJECT=laravel-starter-tpl
DEPLOYER_SENTRY_SERVER=https://wayofdev.sentry.io
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
* text=auto eol=lf

*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php

/.github export-ignore
CHANGELOG.md export-ignore
15 changes: 15 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---

# this file is for the labeler workflow job
# Documentation https://github.com/marketplace/actions/labeler

"type: documentation":
- assets/**/*
- .github/*
- ./*.md

"type: maintenance":
- .github/workflows/*
- app/tests/**/*

...
27 changes: 27 additions & 0 deletions .github/workflows/auto-merge-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---

# https://github.com/peter-evans/enable-pull-request-automerge

on: # yamllint disable-line rule:truthy
pull_request:

permissions:
pull-requests: write
contents: write

name: 🤞 Auto merge release

jobs:
auto-merge:
if: github.actor == 'lotyp' && startsWith(github.head_ref, 'release-please--')
runs-on: ubuntu-latest
steps:
- name: 🤞 Auto-merge pull request
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ github.event.pull_request.number }}
merge-method: merge
# to trigger other workflows, pass PAT token instead of GITHUB_TOKEN
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}

...
96 changes: 96 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---

on: # yamllint disable-line rule:truthy
pull_request:
branches:
- master
- develop

name: 🔍 Continuous integration

defaults:
run:
working-directory: app

jobs:
integration:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-22.04"]
php: ["8.1", "8.2"]

steps:
- name: 📦 Check out the codebase
uses: actions/checkout@v3

- name: 🛠️ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, fileinfo, xdebug
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: xdebug

- name: 🛠️ Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: ♻️ Restore cached backend dependencies
id: cached-composer-dependencies
uses: actions/cache@v3
with:
path: vendor
key: vendor-${{ runner.os }}-${{ hashFiles('**/composer.lock') }}-${{ matrix.php }}

- name: 📥 Install backend dependencies
if: steps.cached-composer-dependencies.outputs.cache-hit != 'true'
run: composer install

- name: 🛠️ Prepare environment
run: |
cd ../ && make env && cd app
cp ../.env .env
mkdir -p ./.build/php-cs-fixer
mkdir -p ./.build/phpstan
mkdir -p ./.build/phpunit
env:
APP_NAME: laravel
SHARED_SERVICES_NAMESPACE: ss
PROJECT_SERVICES_NAMESPACE: wod
COMPOSE_PROJECT_NAME: laravel-starter-tpl

- name: 🔑 Generate secret application key
run: php artisan key:generate

- name: 🔗 Create laravel storage symlinks
run: php artisan storage:link

- name: 🔍 Run coding standards task
run: |
composer run cs:diff
- name: 🔍 Run static analysis using phpstan
run: |
composer run stan
env:
PHPSTAN_OUTPUT_FORMAT: github

- name: 🧪 Execute phpunit and pest tests
run: |
composer run test:cc
env:
XDEBUG_MODE: "coverage"

- name: 📤 Upload coverage results to Codecov.io
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
files: coverage.xml

...
27 changes: 27 additions & 0 deletions .github/workflows/codesee-arch-diagram.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# This workflow was added by CodeSee. Learn more at https://codesee.io/
# This is v2.0 of this workflow file

on: # yamllint disable-line rule:truthy
push:
branches:
- develop
pull_request_target:
types:
- opened
- synchronize
- reopened

name: 🤖 CodeSee

permissions: read-all

jobs:
codesee:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: 💻 Analyze the repo with CodeSee
uses: Codesee-io/codesee-action@v2
with:
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---

# https://github.com/google-github-actions/release-please-action#release-types-supported

on: # yamllint disable-line rule:truthy
push:
branches:
- master

name: 📦 Create release

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: 🎉 Create release
uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
release-type: node
package-name: docker-node
default-branch: master
changelog-types: |
[
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
{ "type": "docs", "section": "Documentation", "hidden": false },
{ "type": "chore", "section": "Miscellaneous", "hidden": false },
{ "type": "style", "section": "Styles", "hidden": true },
{ "type": "revert", "section": "Reverts", "hidden": true },
{ "type": "deps", "section": "Dependencies", "hidden": true },
{ "type": "refactor", "section": "Code Refactoring", "hidden": true },
{ "type": "test", "section": "Tests", "hidden": true },
{ "type": "build", "section": "Build System", "hidden": true },
{ "type": "ci", "section": "Continuous Integration", "hidden": true }
]
...
Loading

0 comments on commit d55a708

Please sign in to comment.