Compare commits

...

4 Commits

Author SHA1 Message Date
881f1a3b0a fix PDF URL issue 2023-03-09 19:39:56 +05:30
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 35 additions and 16 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

1
.gitignore vendored
View File

@ -17,3 +17,4 @@ Homestead.yaml
/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);

View File

@ -46,32 +46,32 @@ return [
Invoice::class => [ Invoice::class => [
'salt' => Invoice::class.config('app.key'), 'salt' => Invoice::class.config('app.key'),
'length' => '20', 'length' => '20',
'alphabet' => 'XKyIAR7mgt8jD2vbqPrOSVenNGpiYLx4M61T', 'alphabet' => 'XKAR7m8jD2bqP9OSVeNGiYL465T10zhfWuc3',
], ],
Estimate::class => [ Estimate::class => [
'salt' => Estimate::class.config('app.key'), 'salt' => Estimate::class.config('app.key'),
'length' => '20', 'length' => '20',
'alphabet' => 'yLJWP79M8rYVqbn1NXjulO6IUDdvekRQGo40', 'alphabet' => 'yJW2P79M8rCHsVq5zbn1fXl6IUt3dAekGo40',
], ],
Payment::class => [ Payment::class => [
'salt' => Payment::class.config('app.key'), 'salt' => Payment::class.config('app.key'),
'length' => '20', 'length' => '20',
'alphabet' => 'asqtW3eDRIxB65GYl7UVLS1dybn9XrKTZ4zO', 'alphabet' => 'aqW3eR2Icf0jp65Gl7UVS1dhyb8Mn9XKTZ4O',
], ],
Company::class => [ Company::class => [
'salt' => Company::class.config('app.key'), 'salt' => Company::class.config('app.key'),
'length' => '20', 'length' => '20',
'alphabet' => 's0DxOFtEYEnuKPmP08Ch6A1iHlLmBTBVWms5', 'alphabet' => 's0D7xOFYEqn2uKJm3Pr9g8Cz46A1iHLBTVW5',
], ],
EmailLog::class => [ EmailLog::class => [
'salt' => EmailLog::class.config('app.key'), 'salt' => EmailLog::class.config('app.key'),
'length' => '20', 'length' => '20',
'alphabet' => 'BRAMEz5str5UVe9oCqzoYY2oKgUi8wQQSmrR', 'alphabet' => 'BA5tJUVNPe93fCq6DHlY2x4ZO1Kg7i8wSm0R',
], ],
Transaction::class => [ Transaction::class => [
'salt' => Transaction::class.config('app.key'), 'salt' => Transaction::class.config('app.key'),
'length' => '20', 'length' => '20',
'alphabet' => 'ADyQWE8mgt7jF2vbnPrKLJenHVpiUIq4M12T', 'alphabet' => 'ADyWE86Cg7jF23vS0bonXrZ5KLH9puIQ4M1T',
], ],
], ],
]; ];

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/