This repository has been archived by the owner on Sep 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from codebar-ag/feature-initial-setup
Feature Initial Setup
- Loading branch information
Showing
125 changed files
with
15,729 additions
and
101 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
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}] | ||
indent_size = 2 | ||
|
||
[docker-compose.yml] | ||
indent_size = 4 |
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,39 @@ | ||
PP_NAME="paperflakes AG" | ||
APP_ENV=ci | ||
APP_KEY=base64:oEfzdlGjtN5vcUKhdKR6Gg28/6l845bOboYuLwsTEi0= | ||
APP_DEBUG=false | ||
APP_URL=http://localhost:8000 | ||
|
||
NOVA_LICENSE_KEY= | ||
|
||
LOG_CHANNEL=stack | ||
LOG_LEVEL=debug | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=3306 | ||
DB_DATABASE=laravel | ||
DB_USERNAME=root | ||
DB_PASSWORD=root | ||
|
||
BROADCAST_DRIVER=log | ||
CACHE_DRIVER=file | ||
FILESYSTEM_DISK=public | ||
QUEUE_CONNECTION=sync | ||
SESSION_DRIVER=database | ||
SESSION_LIFETIME=120 | ||
|
||
MAIL_MAILER=array | ||
MAIL_FROM_ADDRESS="[email protected]" | ||
MAIL_FROM_NAME="${APP_NAME}" | ||
|
||
AWS_ACCESS_KEY_ID= | ||
AWS_SECRET_ACCESS_KEY= | ||
AWS_DEFAULT_REGION=eu-central-1 | ||
AWS_BUCKET=s3-bucket-codebar-development | ||
AWS_PATH=www-docuwaredaily-com | ||
|
||
SCOUT_DRIVER=collection | ||
SCOUT_QUEUE=false | ||
|
||
DEBUGBAR_ENABLED=false |
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,44 @@ | ||
APP_NAME="DocuWare Daily" | ||
APP_ENV=production | ||
APP_KEY=base64:bKZpO4UH4RrHAd+wOi4JZmvIm4mBPVKiZB0D3twXNiQ= | ||
APP_DEBUG=false | ||
APP_URL=https://www.docuwaredaily.comm | ||
|
||
LOG_CHANNEL=stack | ||
LOG_DEPRECATIONS_CHANNEL=null | ||
LOG_LEVEL=debug | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=3306 | ||
DB_DATABASE=www_docuwaredaily_com | ||
DB_USERNAME=root | ||
DB_PASSWORD= | ||
|
||
BROADCAST_DRIVER=log | ||
CACHE_DRIVER=file | ||
FILESYSTEM_DISK=local | ||
QUEUE_CONNECTION=sync | ||
SESSION_DRIVER=file | ||
SESSION_LIFETIME=120 | ||
|
||
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 | ||
|
||
VITE_USERBACK_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
* 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 | ||
.styleci.yml export-ignore |
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,125 @@ | ||
name: production | assets & deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- production | ||
|
||
jobs: | ||
assets: | ||
runs-on: ${{ matrix.os }} | ||
name: production-assets | ci | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
php: [ 8.2 ] | ||
node: [ 16 ] | ||
|
||
steps: | ||
- name: set timezone | ||
uses: szenius/[email protected] | ||
with: | ||
timezoneLinux: "Europe/Zurich" | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: Setup node env π | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Setup php env | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, fileinfo, mysql, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
|
||
- name: Prepare the environment | ||
run: cp .env.ci .env | ||
|
||
- name: Prepare the vite.config.js file | ||
run: cp vite.config-example.js vite.config.js | ||
|
||
# Backend dependencies | ||
- name: Apply Nova license | ||
run: composer config http-basic.nova.laravel.com ${{ secrets.NOVA_USERNAME }} ${{ secrets.NOVA_LICENSE_KEY }} | ||
|
||
- name: Apply Media Library license | ||
run: composer config http-basic.satis.spatie.be ${{ secrets.SPATIE_USERNAME }} ${{ secrets.SPATIE_MEDIA_LIBRARY_PRO_LICENSE_KEY }} | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install Composer dependencies | ||
run: composer install -q --no-progress --prefer-dist --no-interaction --no-suggest --optimize-autoloader --no-scripts | ||
|
||
# Frontend dependencies | ||
- name: Set NPM token | ||
run: npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }} | ||
|
||
- name: Get npm cache directory | ||
id: npm-cache-dir | ||
run: | | ||
echo "::set-output name=dir::$(npm config get cache)" | ||
- name: Cache node_modules π¦ | ||
uses: actions/cache@v3 | ||
id: npm-cache | ||
with: | ||
path: ${{ steps.npm-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies π¨π»βπ» | ||
run: npm install --frozen-lockfile | ||
|
||
- name: Publish Laravel assets | ||
run: php artisan vendor:publish --tag=laravel-assets --ansi --force | ||
- name: Publish Laravel Nova assets | ||
run: php artisan vendor:publish --tag=nova-assets --ansi --force | ||
- name: Auth assets | ||
run: php artisan vendor:publish --tag=auth-assets --ansi --force | ||
- name: Clear Cache | ||
run: php artisan view:clear | ||
|
||
- name: Set output | ||
id: vars | ||
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/} | ||
|
||
- name: publish production assets | ||
env: | ||
APP_ENV: ${{ steps.vars.outputs.short_ref }} | ||
AWS_ENDPOINT: ${{ secrets.AWS_PRODUCTION_ENDPOINT }} | ||
AWS_URL: ${{ secrets.AWS_PRODUCTION_URL }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_PRODUCTION_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PRODUCTION_SECRET_ACCESS_KEY }} | ||
AWS_DEFAULT_REGION: ${{ secrets.AWS_PRODUCTION_DEFAULT_REGION }} | ||
AWS_BUCKET: ${{ secrets.AWS_PRODUCTION_BUCKET }} | ||
run: php artisan lasso:publish --no-git | ||
|
||
deploy_zunscan: | ||
needs: assets | ||
runs-on: ubuntu-latest | ||
name: production | deploy zunscan | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: '0' | ||
- name: Deploy to production | ||
env: | ||
ENVOYER_HOOK_PRODUCTION: ${{ secrets.ENVOYER_HOOK_PRODUCTION }} | ||
run: curl "$ENVOYER_HOOK_PRODUCTION"?sha=${{ github.sha }} |
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,110 @@ | ||
name: Pull Request | CI PEST | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
ci_pest: | ||
runs-on: ${{ matrix.os }} | ||
name: pull-request | ci pest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
php: [ 8.2 ] | ||
node: [ 16 ] | ||
|
||
steps: | ||
- name: set timezone | ||
uses: szenius/[email protected] | ||
with: | ||
timezoneLinux: "Europe/Zurich" | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: Setup php env | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, fileinfo, mysql, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
|
||
- name: Prepare the .env file | ||
run: cp .env.ci .env | ||
|
||
- name: Prepare the vite.config.js file | ||
run: cp vite.config-example.js vite.config.js | ||
|
||
# Backend dependencies | ||
- name: Apply Nova license | ||
run: composer config http-basic.nova.laravel.com ${{ secrets.NOVA_USERNAME }} ${{ secrets.NOVA_LICENSE_KEY }} | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install Composer dependencies | ||
run: composer install -q --no-progress --prefer-dist --no-interaction --no-suggest --optimize-autoloader --no-scripts | ||
|
||
# Prepare Backend | ||
- name: Create Database | ||
run: | | ||
sudo systemctl start mysql | ||
mysql --user="root" --password="root" -e "CREATE DATABASE laravel character set UTF8mb4 collate utf8mb4_bin;" | ||
# Artisan commands | ||
- name: Generate app key | ||
run: php artisan key:generate | ||
- name: Run Migration | ||
run: php artisan migrate:fresh | ||
|
||
# Frontend dependencies | ||
- name: Set NPM token | ||
run: npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }} | ||
|
||
- name: Get npm cache directory | ||
id: npm-cache-dir | ||
run: | | ||
echo "::set-output name=dir::$(npm config get cache)" | ||
- name: Cache node_modules π¦ | ||
uses: actions/cache@v3 | ||
id: npm-cache | ||
with: | ||
path: ${{ steps.npm-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies π¨π»βπ» | ||
run: npm install --frozen-lockfile | ||
- name: Build assets π¨π»βπ» | ||
run: npm run build | ||
|
||
- name: Publish Laravel assets | ||
run: php artisan vendor:publish --tag=laravel-assets --ansi --force | ||
- name: Publish Laravel Nova assets | ||
run: php artisan vendor:publish --tag=nova-assets --ansi --force | ||
- name: Clear Cache | ||
run: php artisan view:clear | ||
|
||
# Backend tests | ||
- name: Execute PHPunit Test | ||
run: php artisan test --parallel | ||
|
||
# Store logs | ||
- name: Store Log Artifacts | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: Store report artifacts | ||
path: ./storage/logs |
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,23 @@ | ||
name: release | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- production | ||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: '0' | ||
- name: Bump version and push tag | ||
uses: anothrNick/github-tag-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | ||
WITH_V: true | ||
RELEASE_BRANCHES: production | ||
DEFAULT_BUMP: minor |
Oops, something went wrong.