Skip to content

Commit

Permalink
add amigor
Browse files Browse the repository at this point in the history
  • Loading branch information
mszulik committed Jun 10, 2024
1 parent b22d14c commit 2c47837
Show file tree
Hide file tree
Showing 71 changed files with 3,244 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
APP_NAME="Transmorpher Amigor"
APP_ENV=local
APP_KEY=base64:rE8A8OivXEW/wCiRS5D0SMTr3LO/NA2KSZPSsBzPZ2I=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://transmorpher-amigor.test

# Docker
APP_SERVICE=app
DOCKER_CONTAINER_NAME=amigor
#DOCKER_PHP_VERSION=8.3
# Use different DB ports if you need to expose more than one DB container
#FORWARD_DB_PORT=3306

# Transmorpher
TRANSMORPHER_AUTH_TOKEN=setThisViaPullPreviewWorkflow
TRANSMORPHER_S2S_API_BASE_URL=http://transmorpher/api
TRANSMORPHER_WEB_API_BASE_URL=setThisInPullPreviewCompose
TRANSMORPHER_WEB_DELIVERY_BASE_URL=setThisInPullPreviewCompose
TRANSMORPHER_WEB_PLACEHOLDER_URL=https://placehold.co/400

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US

APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=amigor-mysql-1
DB_PORT=3306
DB_DATABASE=amigor
DB_USERNAME=amigor
DB_PASSWORD=password

SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database

CACHE_STORE=database
CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
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_APP_NAME="${APP_NAME}"
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
amigor/ export-ignore
.github/ export-ignore
.env.example export-ignore
docker-compose.yml export-ignore
docker-compose.pullpreview.yml export-ignore
sail export-ignore

17 changes: 17 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Docker Image CI

on:
release:
types: [ published ]
pull_request:
types: [ labeled, synchronize, closed ]

jobs:
build-push-docker-image:
name: Build and push docker image
# https://github.com/cybex-gmbh/github-workflows/blob/main/.github/workflows/docker-build-push.yml
uses: cybex-gmbh/github-workflows/.github/workflows/docker-build-push.yml@feature/further-configuration-options
with:
DOCKER_REPOSITORY: cybexwebdev/transmorpher-amigor
DOCKERFILE_PATH: ./amigor/docker/Dockerfile
secrets: inherit
58 changes: 58 additions & 0 deletions .github/workflows/pullpreview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: PullPreview

on:
pull_request:
types: [ labeled, unlabeled, synchronize, closed, reopened ]

jobs:
prepare-transmorpher-environment:
if: ${{ contains(github.event.pull_request.labels.*.name, 'pullpreview') || github.event.action == 'unlabeled' || github.event.action == 'closed' }}
name: Prepare PullPreview staging environment
runs-on: ubuntu-latest

steps:
- name: Checkout Transmorpher Client repo
if: ${{ contains(github.event.pull_request.labels.*.name, 'pullpreview') }}
# https://github.com/actions/checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
amigor/.env.transmorpher
# https://git-scm.com/docs/git-sparse-checkout#_internalscone_mode_handling
sparse-checkout-cone-mode: false

- name: Write secrets in .env file
if: ${{ contains(github.event.pull_request.labels.*.name, 'pullpreview') }}
run: |
echo "TRANSMORPHER_AUTH_TOKEN_HASH=\"${{ secrets.PULLPREVIEW_TRANSMORPHER_AUTH_TOKEN_HASH }}\"" >> amigor/.env.transmorpher
echo "TRANSMORPHER_SIGNING_KEYPAIR=\"${{ secrets.PULLPREVIEW_TRANSMORPHER_SIGNING_KEYPAIR }}\"" >> amigor/.env.transmorpher
- name: Upload transmorpher env file
if: ${{ contains(github.event.pull_request.labels.*.name, 'pullpreview') }}
# https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v4
with:
name: transmorpher-env
path: |
amigor/.env.transmorpher
deploy-staging-environment:
needs: prepare-transmorpher-environment
permissions:
contents: read # to fetch code (actions/checkout)
deployments: write # to delete deployments
pull-requests: write # to remove labels
statuses: write # to create commit status

name: Deploy PullPreview staging environment
uses: cybex-gmbh/github-workflows/.github/workflows/pullpreview.yml@feature/further-configuration-options
with:
PULLPREVIEW_ADMINS: jheusinger, gael-connan-cybex, holyfabi, lupinitylabs, mszulik
INSTANCE_TYPE: large
ARTIFACT_NAME: transmorpher-env
secrets:
ENV_VARS: |
TRANSMORPHER_AUTH_TOKEN="${{ secrets.PULLPREVIEW_TRANSMORPHER_AUTH_TOKEN }}"
PULLPREVIEW_AWS_ACCESS_KEY_ID: ${{ secrets.PULLPREVIEW_AWS_ACCESS_KEY_ID }}
PULLPREVIEW_AWS_SECRET_ACCESS_KEY: ${{ secrets.PULLPREVIEW_AWS_SECRET_ACCESS_KEY }}
PULLPREVIEW_BASIC_AUTH: ${{ secrets.PULLPREVIEW_BASIC_AUTH }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ yarn.lock
yarn-error.log
node_modules
package-lock.json
.env
18 changes: 18 additions & 0 deletions amigor/.editorconfig
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
78 changes: 78 additions & 0 deletions amigor/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
APP_NAME="Transmorpher Amigor"
APP_ENV=local
APP_KEY=base64:rE8A8OivXEW/wCiRS5D0SMTr3LO/NA2KSZPSsBzPZ2I=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://transmorpher-amigor.test

# Docker
APP_SERVICE=app
DOCKER_CONTAINER_NAME=amigor
#DOCKER_PHP_VERSION=8.3
# Use different DB ports if you need to expose more than one DB container
#FORWARD_DB_PORT=3306

# Transmorpher
TRANSMORPHER_AUTH_TOKEN=setThisViaPullPreviewWorkflow
TRANSMORPHER_S2S_API_BASE_URL=http://transmorpher/api
TRANSMORPHER_WEB_API_BASE_URL=setThisInPullPreviewCompose
TRANSMORPHER_WEB_DELIVERY_BASE_URL=setThisInPullPreviewCompose
TRANSMORPHER_WEB_PLACEHOLDER_URL=https://placehold.co/400

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US

APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=amigor-mysql-1
DB_PORT=3306
DB_DATABASE=amigor
DB_USERNAME=amigor
DB_PASSWORD=password

SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database

CACHE_STORE=database
CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
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_APP_NAME="${APP_NAME}"
78 changes: 78 additions & 0 deletions amigor/.env.transmorpher
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
APP_NAME=Transmorpher
APP_ENV=production
APP_KEY=base64:QnuUwKRiP7CvGUt99BhC/aAnCZa5eKfbBVQpb7DEA+Y=
APP_DEBUG=false
APP_URL=http://transmorpher.test

APP_SERVICE=app
DOCKER_CONTAINER_NAME=transmorpher
#DOCKER_PHP_VERSION=8.0
# Use different DB ports if you need to expose more than one DB container
#FORWARD_DB_PORT=3306

WORKERS_AMOUNT=1

# Transmorpher
TRANSMORPHER_DEV_MODE=false
TRANSMORPHER_STORE_DERIVATIVES=true
TRANSMORPHER_DISK_ORIGINALS=localOriginals
TRANSMORPHER_DISK_IMAGE_DERIVATIVES=localImageDerivatives
TRANSMORPHER_DISK_VIDEO_DERIVATIVES=localVideoDerivatives
#TRANSMORPHER_SIGNING_KEYPAIR=
TRANSMORPHER_OPTIMIZER_TIMEOUT=60
# More information: https://github.com/cybex-gmbh/transmorpher/tree/release/v0#configuration-options
VIDEO_TRANSCODING_WORKERS_AMOUNT=1

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=transmorpher-mysql-1
DB_PORT=3306
DB_DATABASE=transmorpher
DB_USERNAME=transmorpher
DB_PASSWORD=password

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database
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=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME=Transmorpher

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

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

VITE_PUSHER_APP_KEY=
VITE_PUSHER_HOST=
VITE_PUSHER_PORT=443
VITE_PUSHER_SCHEME=https
VITE_PUSHER_APP_CLUSTER=mt1
11 changes: 11 additions & 0 deletions amigor/.gitattributes
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
20 changes: 20 additions & 0 deletions amigor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/storage/
/vendor
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/.fleet
/.idea
/.vscode
1 change: 1 addition & 0 deletions amigor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Companion app for the Transmorpher
8 changes: 8 additions & 0 deletions amigor/app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace App\Http\Controllers;

abstract class Controller
{
//
}
Loading

0 comments on commit 2c47837

Please sign in to comment.