-
Notifications
You must be signed in to change notification settings - Fork 3
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 #34 from fsr5-fhaachen/dev
Release 2.0.0
- Loading branch information
Showing
28 changed files
with
60,771 additions
and
7,266 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,15 @@ | ||
.github | ||
.vscode | ||
node_modules/ | ||
vendor | ||
.env | ||
.env.example | ||
.gitignore | ||
.gitattributes | ||
.php-cs-fixer.cache | ||
.prettierignore | ||
.prettierrc.json | ||
.rr.yaml | ||
.styleci.yml | ||
LICENSE | ||
rr |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
target-branch: "dev" | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
target-branch: "dev" | ||
- package-ecosystem: "composer" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
target-branch: "dev" |
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,22 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
authors: | ||
- octocat | ||
categories: | ||
- title: Breaking Changes | ||
labels: | ||
- breaking-change | ||
- title: Added | ||
labels: | ||
- enhancement | ||
- title: Fixed | ||
labels: | ||
- bug | ||
- title: Removed | ||
labels: | ||
- deprecated | ||
- title: Other Changes | ||
labels: | ||
- "*" |
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,57 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["main", "dev"] | ||
pull_request: | ||
branches: ["main", "dev"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php-version: ["8.0"] | ||
node-version: [16.x] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Use PHP ${{ matrix.php-version }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
- name: Copy .env | ||
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | ||
- name: Install PHP Dependencies | ||
run: composer update --ignore-platform-req=php+ --no-interaction --no-progress | ||
- name: Install Node.js Dependencies | ||
run: | | ||
npm ci --force --legacy-peer-deps | ||
- name: Execute build | ||
run: npm run build --if-present | ||
- name: Generate key | ||
run: php artisan key:generate | ||
- name: Directory Permissions | ||
run: chmod -R 777 storage bootstrap/cache | ||
- name: Create Database | ||
run: | | ||
mkdir -p database | ||
touch database/database.sqlite | ||
- name: Execute migrations | ||
env: | ||
DB_CONNECTION: sqlite | ||
DB_DATABASE: database/database.sqlite | ||
run: | | ||
php artisan migrate | ||
- name: Execute tests (Unit and Feature tests) via PHPUnit | ||
env: | ||
DB_CONNECTION: sqlite | ||
DB_DATABASE: database/database.sqlite | ||
run: vendor/bin/phpunit |
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,27 @@ | ||
name: Docker CI (staging) | ||
|
||
on: | ||
push: | ||
branches: [dev] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push docker | ||
run: | | ||
docker build -f ./Dockerfile . --tag ${{ env.REGISTRY }}/fsr5-fhaachen/strichlistensystem:dev | ||
docker push ${{ env.REGISTRY }}/fsr5-fhaachen/strichlistensystem:dev |
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,28 @@ | ||
name: Docker CI (release) | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push docker | ||
run: | | ||
docker build -f ./Dockerfile . --tag ${{ env.REGISTRY }}/fsr5-fhaachen/strichlistensystem:${{ env.RELEASE_VERSION }} --tag ${{ env.REGISTRY }}/fsr5-fhaachen/strichlistensystem:latest | ||
docker push ${{ env.REGISTRY }}/fsr5-fhaachen/strichlistensystem:${{ env.RELEASE_VERSION }} | ||
docker push ${{ env.REGISTRY }}/fsr5-fhaachen/strichlistensystem:latest |
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 |
---|---|---|
|
@@ -14,3 +14,5 @@ npm-debug.log | |
yarn-error.log | ||
/.idea | ||
/.vscode | ||
rr | ||
.rr.yaml |
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,57 @@ | ||
FROM php:8.1-cli-alpine | ||
|
||
WORKDIR /var/www/html | ||
|
||
COPY . . | ||
|
||
RUN chown www-data:www-data -R /var/www/html | ||
|
||
# install packages for php | ||
#RUN apk add --no-cache bzip2-dev curl-dev libxml2-dev enchant-2 | ||
|
||
# install php extensions | ||
RUN docker-php-ext-install bcmath sockets pdo_mysql | ||
# ctype \ | ||
# json \ | ||
# mbstring \ | ||
# openssl \ | ||
# pdo \ | ||
# tokenizer \ | ||
# xml | ||
|
||
RUN apk add --no-cache pcre-dev $PHPIZE_DEPS && pecl install redis && docker-php-ext-enable redis.so | ||
|
||
# install composer | ||
RUN EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" | ||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
RUN ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" | ||
RUN if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then >&2 echo 'ERROR: Invalid installer checksum' && rm composer-setup.php && exit 1; fi | ||
RUN php composer-setup.php --quiet | ||
RUN rm composer-setup.php | ||
|
||
# install php dependencies | ||
RUN php composer.phar install | ||
|
||
# install nodejs | ||
RUN apk add --no-cache nodejs npm | ||
|
||
# install node dependencies | ||
RUN npm install | ||
|
||
# build application | ||
# RUN npm run production | ||
|
||
# install roadrunner | ||
COPY --from=spiralscout/roadrunner:latest /usr/bin/rr /usr/bin/rr | ||
|
||
# configure roadrunner | ||
RUN php artisan octane:install --server=roadrunner | ||
|
||
ENV ROADRUNNER_MAX_REQUESTS=512 | ||
ENV ROADRUNNER_WORKERS="auto" | ||
|
||
EXPOSE 8000 | ||
|
||
CMD php artisan octane:start --server="roadrunner" --host="0.0.0.0" --workers=${ROADRUNNER_WORKERS} --max-requests=${ROADRUNNER_MAX_REQUESTS} | ||
|
||
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD php artisan octane:status --server="roadrunner" |
Oops, something went wrong.