Compare commits

...

4 Commits

Author SHA1 Message Date
e3ed12f8ed Bump guzzlehttp/psr7 from 2.3.0 to 2.5.0
Bumps [guzzlehttp/psr7](https://github.com/guzzle/psr7) from 2.3.0 to 2.5.0.
- [Release notes](https://github.com/guzzle/psr7/releases)
- [Changelog](https://github.com/guzzle/psr7/blob/2.5/CHANGELOG.md)
- [Commits](https://github.com/guzzle/psr7/compare/2.3.0...2.5.0)

---
updated-dependencies:
- dependency-name: guzzlehttp/psr7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-19 19:48:42 +00:00
05d5ce26fd Adds Zip to the required PHP Extension check (#1146)
* Ignore .DS_Store

* Checks for required ZIP extension
2023-02-19 11:42:34 +05:30
393fe20010 Fix incorrect invoice creation message (#1109)
Creation message now includes the views disk in its path.
2022-12-17 18:20:51 +05:30
57bdbd2897 feat: front-end files bulding (#1098)
Co-authored-by: Aramayis <>
2022-12-17 18:19:49 +05:30
7 changed files with 58 additions and 38 deletions

View File

@ -14,8 +14,6 @@ jobs:
steps: steps:
- name: Checkout git repo - name: Checkout git repo
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Generate UUID image name - name: Generate UUID image name
id: uuid id: uuid
run: echo "UUID_TAG_APP=$(uuidgen)" >> $GITHUB_ENV run: echo "UUID_TAG_APP=$(uuidgen)" >> $GITHUB_ENV
@ -33,11 +31,10 @@ jobs:
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
file: ./uffizzi/Dockerfile file: ./uffizzi/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
build-nginx: build-nginx:
needs:
- build-application
name: Build and Push `nginx` name: Build and Push `nginx`
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || github.event.action != 'closed' }} if: ${{ github.event_name != 'pull_request' || github.event.action != 'closed' }}
@ -65,6 +62,8 @@ jobs:
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
file: ./uffizzi/nginx/Dockerfile file: ./uffizzi/nginx/Dockerfile
build-args: |
BASE_IMAGE=${{ needs.build-application.outputs.tags }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

3
.gitignore vendored
View File

@ -16,4 +16,5 @@ Homestead.yaml
.gitkeep .gitkeep
/public/docs /public/docs
/.scribe /.scribe
!storage/fonts/.gitkeep !storage/fonts/.gitkeep
.DS_Store

View File

@ -55,7 +55,7 @@ class CreateTemplateCommand extends Command
copy(public_path("/build/img/PDF/{$type}1.png"), public_path("/build/img/PDF/{$templateName}.png")); copy(public_path("/build/img/PDF/{$type}1.png"), public_path("/build/img/PDF/{$templateName}.png"));
copy(resource_path("/static/img/PDF/{$type}1.png"), resource_path("/static/img/PDF/{$templateName}.png")); copy(resource_path("/static/img/PDF/{$type}1.png"), resource_path("/static/img/PDF/{$templateName}.png"));
$path = resource_path("app/pdf/{$type}/{$templateName}.blade.php"); $path = resource_path("views/app/pdf/{$type}/{$templateName}.blade.php");
$type = ucfirst($type); $type = ucfirst($type);
$this->info("{$type} Template created successfully at ".$path); $this->info("{$type} Template created successfully at ".$path);

57
composer.lock generated
View File

@ -1841,22 +1841,22 @@
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "2.3.0", "version": "2.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "83260bb50b8fc753c72d14dc1621a2dac31877ee" "reference": "b635f279edd83fc275f822a1188157ffea568ff6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/83260bb50b8fc753c72d14dc1621a2dac31877ee", "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6",
"reference": "83260bb50b8fc753c72d14dc1621a2dac31877ee", "reference": "b635f279edd83fc275f822a1188157ffea568ff6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"psr/http-factory": "^1.0", "psr/http-factory": "^1.0",
"psr/http-message": "^1.0", "psr/http-message": "^1.1 || ^2.0",
"ralouphie/getallheaders": "^3.0" "ralouphie/getallheaders": "^3.0"
}, },
"provide": { "provide": {
@ -1864,17 +1864,18 @@
"psr/http-message-implementation": "1.0" "psr/http-message-implementation": "1.0"
}, },
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.4.1", "bamarni/composer-bin-plugin": "^1.8.1",
"http-interop/http-factory-tests": "^0.9", "http-interop/http-factory-tests": "^0.9",
"phpunit/phpunit": "^8.5.8 || ^9.3.10" "phpunit/phpunit": "^8.5.29 || ^9.5.23"
}, },
"suggest": { "suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "bamarni-bin": {
"dev-master": "2.3-dev" "bin-links": true,
"forward-command": false
} }
}, },
"autoload": { "autoload": {
@ -1936,7 +1937,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/psr7/issues", "issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.3.0" "source": "https://github.com/guzzle/psr7/tree/2.5.0"
}, },
"funding": [ "funding": [
{ {
@ -1952,7 +1953,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-06-09T08:26:02+00:00" "time": "2023-04-17T16:11:26+00:00"
}, },
{ {
"name": "hamcrest/hamcrest-php", "name": "hamcrest/hamcrest-php",
@ -5215,21 +5216,21 @@
}, },
{ {
"name": "psr/http-factory", "name": "psr/http-factory",
"version": "1.0.1", "version": "1.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/http-factory.git", "url": "https://github.com/php-fig/http-factory.git",
"reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" "reference": "e616d01114759c4c489f93b099585439f795fe35"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
"reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", "reference": "e616d01114759c4c489f93b099585439f795fe35",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.0.0", "php": ">=7.0.0",
"psr/http-message": "^1.0" "psr/http-message": "^1.0 || ^2.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -5249,7 +5250,7 @@
"authors": [ "authors": [
{ {
"name": "PHP-FIG", "name": "PHP-FIG",
"homepage": "http://www.php-fig.org/" "homepage": "https://www.php-fig.org/"
} }
], ],
"description": "Common interfaces for PSR-7 HTTP message factories", "description": "Common interfaces for PSR-7 HTTP message factories",
@ -5264,31 +5265,31 @@
"response" "response"
], ],
"support": { "support": {
"source": "https://github.com/php-fig/http-factory/tree/master" "source": "https://github.com/php-fig/http-factory/tree/1.0.2"
}, },
"time": "2019-04-30T12:38:16+00:00" "time": "2023-04-10T20:10:41+00:00"
}, },
{ {
"name": "psr/http-message", "name": "psr/http-message",
"version": "1.0.1", "version": "1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/http-message.git", "url": "https://github.com/php-fig/http-message.git",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.0" "php": "^7.2 || ^8.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev" "dev-master": "1.1.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -5317,9 +5318,9 @@
"response" "response"
], ],
"support": { "support": {
"source": "https://github.com/php-fig/http-message/tree/master" "source": "https://github.com/php-fig/http-message/tree/1.1"
}, },
"time": "2016-08-06T14:39:51+00:00" "time": "2023-04-04T09:50:52+00:00"
}, },
{ {
"name": "psr/log", "name": "psr/log",
@ -11856,5 +11857,5 @@
"php": "^7.4 || ^8.0" "php": "^7.4 || ^8.0"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.1.0" "plugin-api-version": "2.3.0"
} }

View File

@ -27,6 +27,7 @@ return [
'tokenizer', 'tokenizer',
'JSON', 'JSON',
'cURL', 'cURL',
'zip',
], ],
'apache' => [ 'apache' => [
'mod_rewrite', 'mod_rewrite',

View File

@ -11,7 +11,8 @@ RUN apt-get update && apt-get install -y \
unzip \ unzip \
libzip-dev \ libzip-dev \
libmagickwand-dev \ libmagickwand-dev \
mariadb-client mariadb-client \
npm
# Clear cache # Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/* RUN apt-get clean && rm -rf /var/lib/apt/lists/*
@ -45,4 +46,19 @@ RUN chmod -R 775 composer.json composer.lock \
RUN chown -R $(whoami):$(whoami) /var/log/ RUN chown -R $(whoami):$(whoami) /var/log/
RUN chmod -R 775 /var/log RUN chmod -R 775 /var/log
# Cleanup manually generated build files
RUN rm -rf /var/www/public/build
RUN npm config set user 0
RUN npm config set unsafe-perm true
# Frontend bulding
RUN sed -i 's/DB_CONNECTION=mysql/DB_CONNECTION=sqlite/g' /var/www/.env
RUN sed -i 's/DB_DATABASE=crater/DB_DATABASE=\/tmp\/crater.sqlite/g' /var/www/.env
RUN touch /tmp/crater.sqlite
RUN composer install --no-interaction --prefer-dist
RUN npm i -f
RUN npm install --save-dev sass
RUN export NODE_OPTIONS="--max-old-space-size=4096" && /usr/bin/npx vite build --target=es2020
RUN sed -i 's/DB_CONNECTION=sqlite/DB_CONNECTION=mysql/g' /var/www/.env
RUN sed -i 's/DB_DATABASE=\/tmp\/crater.sqlite/DB_DATABASE=crater/g' /var/www/.env
USER crater-user USER crater-user

View File

@ -1,7 +1,9 @@
ARG BASE_IMAGE
FROM $BASE_IMAGE as build
FROM nginx:1.17-alpine FROM nginx:1.17-alpine
RUN rm /etc/nginx/conf.d/default.conf RUN rm /etc/nginx/conf.d/default.conf
COPY ./ /var/www COPY --from=build /var/www /var/www
COPY ./uffizzi/nginx/nginx /etc/nginx/conf.d/ COPY ./uffizzi/nginx/nginx /etc/nginx/conf.d/