Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.6 as released publicly on open.minvws.nl #27

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .db_requirements
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.0.1
v0.0.13
34 changes: 34 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ APP_SECRET=32f3c49be690d4c5f499093ae7dd3a7d
# Database at-rest encryption key (generated with "php bin/console generate:database-key")
DATABASE_ENCRYPTION_KEY=

# The name of the site. Used only for displaying purposes.
SITE_NAME=open.minvws.nl

# -----------------------------------------------------
# External service configuration
# -----------------------------------------------------
Expand Down Expand Up @@ -45,10 +48,41 @@ TIKA_HOST=http://127.0.0.1:9998

# Redis instance that is used for document content caching
REDIS_URL=redis://localhost:6379
REDIS_TLS_CAFILE=
REDIS_TLS_LOCAL_CERT=
REDIS_TLS_LOCAL_PK=

# The name of cookie. Should start with __Host- , but cannot be prefixed
# with __Host- when running on non-TLS connections
COOKIE_NAME=WOOPID

# Issuer of the TOTP tokens, used in 2fa for the totp URI
TOTP_ISSUER=localhost

# Application mode. Could be only for balie (backend), frontend, or both
APP_MODE=both

# Base URL of the application frontend (which could different from backend when APP_MODE is not BOTH)
PUBLIC_BASE_URL=http://localhost:8000

# -----------------------------------------------------
# Storage adapter to use
# Choose between aws or local
STORAGE_DOCUMENT_ADAPTER=local
STORAGE_THUMBNAIL_ADAPTER=local
STORAGE_BATCH_ADAPTER=local

# Storage adapter configuration for AWS S3/Minio
STORAGE_MINIO_REGION=eu-west-1
STORAGE_MINIO_ENDPOINT=
STORAGE_MINIO_ACCESS_KEY=
STORAGE_MINIO_SECRET_KEY=

# Bucket definitions for AWS S3/Minio
STORAGE_MINIO_DOCUMENT_BUCKET=doc_bucket
STORAGE_MINIO_THUMBNAIL_BUCKET=thumb_bucket
STORAGE_MINIO_BATCH_BUCKET=batch_bucket

# -----------------------------------------------------
# Identification number for Piwik analytics
PIWIK_ANALYTICS_ID=0
15 changes: 15 additions & 0 deletions .env.ci
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
APP_ENV=dev
APP_SECRET=32f3c49be690d4c5f499093ae7dd3a7d

SITE_NAME=open.minvws.nl

DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres?serverVersion=15&charset=utf8"

HIGH_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/high
Expand All @@ -20,7 +22,20 @@ ELASTICSEARCH_MTLS_CA_PATH=
TIKA_HOST=http://localhost:9998

REDIS_URL=redis://localhost:6379
REDIS_TLS_CAFILE=
REDIS_TLS_LOCAL_CERT=
REDIS_TLS_LOCAL_PK=

COOKIE_NAME=WOOPID

TOTP_ISSUER=localhost

APP_MODE=both
PUBLIC_BASE_URL=http://localhost:8000


STORAGE_DOCUMENT_ADAPTER=local
STORAGE_THUMBNAIL_ADAPTER=local
STORAGE_BATCH_ADAPTER=local

PIWIK_ANALYTICS_ID=0
13 changes: 13 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
APP_ENV=dev
APP_SECRET=32f3c49be690d4c5f499093ae7dd3a7d

SITE_NAME=open.minvws.nl

DATABASE_URL="postgresql://postgres:postgres@postgres:5432/postgres?serverVersion=15&charset=utf8"

HIGH_TRANSPORT_DSN=amqp://guest:guest@rabbitmq:5672/%2f/high
Expand All @@ -26,8 +28,19 @@ TIKA_HOST=http://tika:9998
DATABASE_ENCRYPTION_KEY=

REDIS_URL=redis://redis:6379
REDIS_TLS_CAFILE=
REDIS_TLS_LOCAL_CERT=
REDIS_TLS_LOCAL_PK=

COOKIE_NAME=WOOPID

TOTP_ISSUER=localhost

APP_MODE=both
PUBLIC_BASE_URL=http://localhost:8000

STORAGE_DOCUMENT_ADAPTER=local
STORAGE_THUMBNAIL_ADAPTER=local
STORAGE_BATCH_ADAPTER=local

PIWIK_ANALYTICS_ID=0
4 changes: 2 additions & 2 deletions .github/workflows/documentation-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
name: lint markDown file
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DavidAnson/markdownlint-cli2-action@v11
- uses: actions/checkout@v3
- uses: DavidAnson/markdownlint-cli2-action@v12
with:
globs: '**/*.md'

Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/php-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,36 @@ jobs:
max-parallel: 3
matrix:
php-versions: [ '8.1', '8.2' ]

php-linting-twig:
needs:
- composer-install
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: vendor/
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
- name: copy env file
run: |
cp .env.ci .env.local
# change database url to sqlite
sed -i 's|^DATABASE_URL=.*|DATABASE_URL=sqlite:///%kernel.project_dir%/var/data.db|' .env.local
- name: Twig linter
run: |
bin/console cache:clear
bin/console cache:warmup
bin/console lint:twig templates
env:
APP_ENV: prod
APP_DEBUG: false
strategy:
max-parallel: 3
matrix:
php-versions: [ '8.1', '8.2' ]
2 changes: 0 additions & 2 deletions .github/workflows/robotframeworkci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Robot Framework tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ yarn-error.log
#

/database
/public/sitemap*
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@minvws:registry=https://npm.pkg.github.com
@minvws:registry=https://npm.pkg.github.com
22 changes: 21 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SHELL=/usr/bin/env bash -O globstar

all: help

test: test_phpcs test_phpstan test_phpcsfixer test_phpmd test_unit test_psalm ## Runs tests
test: test_phpcs test_phpstan test_phpcsfixer test_phpmd test_unit test_psalm test_twig test_markdown ## Runs tests

test_phpcs:
source test-utils.sh ;\
Expand Down Expand Up @@ -36,6 +36,18 @@ test_unit: ## Run unit tests
section "PHPUNIT" ;\
vendor/bin/phpunit --testsuite "Woopie Unit Test Suite"

test_twig: ## Run twig linter
source test-utils.sh ;\
section "TWIG-LINT" ;\
APP_DEBUG=false APP_ENV=prod php bin/console cache:clear
APP_DEBUG=false APP_ENV=prod php bin/console cache:warmup
APP_DEBUG=false APP_ENV=prod php bin/console lint:twig templates

test_markdown: ## Lint markdown files
source test-utils.sh ;\
section "MARKDOWN-LINT" ;\
npm run mdlint

fix: ## Fixes coding style
vendor/bin/php-cs-fixer fix
vendor/bin/phpcbf
Expand Down Expand Up @@ -71,3 +83,11 @@ test-rf/%: ## Run Robot Framework tests with matching tag

test-rf-head/%: ## Run Robot Framework with browser visible, with matching tag
env/bin/python -m robot -d tests/robot_framework/results -x outputxunit.xml -i $* -v headless:false tests/robot_framework

update: ## Update code / db/ assets, for instance after git pull
composer install
bin/console doctrine:migrations:migrate --no-interaction
npm install
npm run build
vendor/bin/phpdotenvsync --opt=sync --src=.env.development --dest=.env.local --no-interaction

6 changes: 5 additions & 1 deletion assets/admin.js
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
import './styles/admin/admin.scss';
// Styling
import './styles/admin/admin.scss';

// JS
import '@minvws/manon/collapsible.js';
3 changes: 3 additions & 0 deletions assets/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ import './styles/login.css';

import './init.js';
import '@minvws/manon/collapsible.js';
import "./navigation.js"
import './search/init.js';
import './tabs.js';
4 changes: 2 additions & 2 deletions assets/dropzone.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ Dropzone.options.uploadform = {
autoProcessQueue: true,
uploadMultiple: false,
addRemoveLinks: true,
maxFiles: 100,
maxFiles: 2000,
maxFilesize: 4096, // MB
chunking: true,
parallelChunkUploads: true,
retryChunks: true,
retryChunksLimit: 3,
chunkSize: 50 * 1024 * 1024, // Bytes
chunkSize: 16 * 1024 * 1024, // Bytes
timeout: 0,
dictDefaultMessage: "Drop PDF or ZIP files here to upload your documents",
acceptedFiles: "application/pdf,application/x-pdf,.zip",
Expand Down
1 change: 1 addition & 0 deletions assets/init.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { onDomReady } from '@minvws/manon/utils.js';

onDomReady(function () {
document.documentElement.classList.remove('no-js');
document.documentElement.classList.add('js');
});
Loading