Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
19c24803d1 | |||
29e5daad9a | |||
b0894e0267 | |||
b7b9cebacb | |||
d603fb452a | |||
f0e5d00970 |
39
.dockerignore
Normal file
@@ -0,0 +1,39 @@
|
||||
# Dépendances locales (elles seront réinstallées dans l’image)
|
||||
vendor/
|
||||
node_modules/
|
||||
|
||||
# Fichiers de config locaux ou secrets
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Cache et logs Symfony
|
||||
var
|
||||
|
||||
# Build front-end
|
||||
public/build/
|
||||
public/bundles/
|
||||
|
||||
# Tests
|
||||
phpunit.xml
|
||||
phpunit.xml.dist
|
||||
tests/
|
||||
|
||||
# IDE & OS
|
||||
*.log
|
||||
*.md
|
||||
*.swp
|
||||
.idea/
|
||||
.vscode/
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Git
|
||||
.git
|
||||
.gitignore
|
||||
|
||||
# uploads
|
||||
uploads/
|
||||
public/uploads/
|
||||
|
||||
# Volume
|
||||
volume/
|
42
.env
Normal file
@@ -0,0 +1,42 @@
|
||||
# Basic
|
||||
APP_ENV=PROD
|
||||
APP_SECRET=changeme
|
||||
|
||||
APP_ALIAS=schedule
|
||||
APP_AUTH=MYSQL
|
||||
APP_NAME=Schedule
|
||||
APP_CRON=true
|
||||
|
||||
# Office hours
|
||||
OFFICE_HOUR_START=09:00
|
||||
OFFICE_HOUR_END=17:30
|
||||
|
||||
# MAIL sendmail / smtp
|
||||
MAILER_METHOD=sendmail
|
||||
MAILER_URL=
|
||||
MAILER_NOREPLY=noreply@noreply.fr
|
||||
MAILER_DEFAULT_NOTIF=
|
||||
MAILER_URL=null://localhost
|
||||
|
||||
# BDD
|
||||
DATABASE_HOST=mariadb
|
||||
DATABASE_NAME=schedule
|
||||
DATABASE_USER=user
|
||||
DATABASE_PASSWORD=changeme
|
||||
|
||||
# If APP_AUTH = CAS
|
||||
CAS_HOST=
|
||||
CAS_PORT=
|
||||
CAS_PATH=
|
||||
CAS_USERNAME=username
|
||||
CAS_EMAIL=email
|
||||
CAS_LASTNAME=lastname
|
||||
CAS_FIRSTNAME=firstname
|
||||
|
||||
## Sentry DSN
|
||||
SENTRY_DSN=
|
||||
|
||||
# Dolibar
|
||||
DOLIBARR_ACTIVE=false
|
||||
DOLIBARR_API_KEY=
|
||||
DOLIBARR_URI=
|
28
.gitignore
vendored
@@ -1 +1,27 @@
|
||||
*~
|
||||
|
||||
###> symfony/framework-bundle ###
|
||||
/.env.local
|
||||
/.env.local.php
|
||||
/.env.*.local
|
||||
/config/secrets/prod/prod.decrypt.private.php
|
||||
/public/bundles/
|
||||
/var/
|
||||
/vendor/
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
###> symfony/phpunit-bridge ###
|
||||
.phpunit
|
||||
.phpunit.result.cache
|
||||
/phpunit.xml
|
||||
###< symfony/phpunit-bridge ###
|
||||
|
||||
###> symfony/webpack-encore-bundle ###
|
||||
/node_modules/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
###< symfony/webpack-encore-bundle ###
|
||||
|
||||
###> uploads ###
|
||||
/public/uploads
|
||||
/uploads
|
||||
###> uploads ###
|
||||
|
53
.php-cs-fixer.dist.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->in(__DIR__)
|
||||
->exclude([
|
||||
'vendor',
|
||||
'var',
|
||||
'web',
|
||||
'app/DoctrineMigrations',
|
||||
'bin',
|
||||
'doc',
|
||||
])
|
||||
->name('*.php')
|
||||
;
|
||||
|
||||
// TODO: Définir les règles de style communes
|
||||
// spécifiques au projet
|
||||
return (new PhpCsFixer\Config())
|
||||
->setRules([
|
||||
'@Symfony' => true,
|
||||
'concat_space' => ['spacing' => 'none'],
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'combine_consecutive_issets' => true,
|
||||
'explicit_indirect_variable' => true,
|
||||
'no_useless_return' => true,
|
||||
'ordered_imports' => true,
|
||||
'no_unused_imports' => true,
|
||||
'no_spaces_after_function_name' => true,
|
||||
'no_spaces_inside_parenthesis' => true,
|
||||
'ternary_operator_spaces' => true,
|
||||
'class_definition' => ['single_line' => true],
|
||||
'whitespace_after_comma_in_array' => true,
|
||||
|
||||
// phpdoc
|
||||
'phpdoc_add_missing_param_annotation' => ['only_untyped' => true],
|
||||
'phpdoc_order' => true,
|
||||
'phpdoc_types_order' => [
|
||||
'null_adjustment' => 'always_last',
|
||||
'sort_algorithm' => 'alpha',
|
||||
],
|
||||
'phpdoc_no_empty_return' => false,
|
||||
'phpdoc_summary' => false,
|
||||
'general_phpdoc_annotation_remove' => [
|
||||
'annotations' => [
|
||||
'expectedExceptionMessageRegExp',
|
||||
'expectedException',
|
||||
'expectedExceptionMessage',
|
||||
'author',
|
||||
],
|
||||
],
|
||||
])
|
||||
->setFinder($finder)
|
||||
;
|
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"php.version": "7.4"
|
||||
}
|
26
Makefile
@@ -1,26 +0,0 @@
|
||||
################################
|
||||
# Makefile
|
||||
################################
|
||||
|
||||
SOURCE=schedule
|
||||
VERSION=2.0
|
||||
EOLE_VERSION=2.7
|
||||
EOLE_RELEASE=2.7.1
|
||||
PKGAPPS=web
|
||||
|
||||
################################
|
||||
# Début de zone à ne pas éditer
|
||||
################################
|
||||
|
||||
include eole.mk
|
||||
include apps.mk
|
||||
|
||||
################################
|
||||
# Fin de zone à ne pas éditer
|
||||
################################
|
||||
|
||||
# Makefile rules dedicated to application
|
||||
# if exists
|
||||
ifneq (, $(strip $(wildcard $(SOURCE).mk)))
|
||||
include $(SOURCE).mk
|
||||
endif
|
64
apps.mk
@@ -1,64 +0,0 @@
|
||||
#
|
||||
# NE PAS EDITER CE FICHIER
|
||||
#
|
||||
# Voir Makefile
|
||||
|
||||
|
||||
##########################
|
||||
# Application web envole #
|
||||
##########################
|
||||
ifneq (, $(filter oui web, $(PKGAPPS)))
|
||||
#
|
||||
# Sanity check
|
||||
#
|
||||
ifeq (, $(filter-out X.X, $(strip $(VERSION))))
|
||||
$(error $$(VERSION) variable has incorrect value '$(VERSION)')
|
||||
endif
|
||||
|
||||
# Where to store web application files
|
||||
WEB_PATH := $(DESTDIR)/var/www/html
|
||||
|
||||
# Envole
|
||||
sharenvole_PROG_DIR := $(DESTDIR)/usr/share/envole/$(SOURCE)
|
||||
|
||||
src_$(SOURCE)-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)
|
||||
src_plugins-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)/plugin
|
||||
src_lang-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)/lang
|
||||
|
||||
endif
|
||||
|
||||
##########################
|
||||
# Application EOLE flask #
|
||||
##########################
|
||||
ifneq (, $(filter flask, $(PKGAPPS)))
|
||||
#
|
||||
# Sanity check
|
||||
#
|
||||
ifeq (, $(filter-out XXX, $(strip $(FLASK_MODULE))))
|
||||
$(error $$(FLASK_MODULE) variable has incorrect value '$(FLASK_MODULE)')
|
||||
endif
|
||||
|
||||
ifeq (, $(strip $(wildcard src/$(FLASK_MODULE).conf)))
|
||||
$(error missing eoleflask configuration file 'src/$(FLASK_MODULE).conf')
|
||||
endif
|
||||
|
||||
# Everything is related to mount point
|
||||
APPS_MOUNT_POINT := $(shell sed -ne 's|^"MOUNT_POINT"[[:space:]]*:[[:space:]]*"/\([^"]*\)",|\1|p' \
|
||||
src/$(FLASK_MODULE).conf)
|
||||
|
||||
ifeq (, $(strip $(APPS_MOUNT_POINT)))
|
||||
$(error no "MOUNT_POINT" in eoleflask configuration file 'src/$(FLASK_MODULE).conf')
|
||||
endif
|
||||
|
||||
# eole-flask configuration
|
||||
src_DATA_DIR := $(DESTDIR)/etc/eole/flask/available
|
||||
|
||||
# Where to store flask application files
|
||||
FLASK_PATH := $(eole_DIR)/flask/$(APPS_MOUNT_POINT)
|
||||
|
||||
# static files
|
||||
src_$(FLASK_MODULE)_static_REC_DIR := $(FLASK_PATH)/static
|
||||
src_$(FLASK_MODULE)_templates_REC_DIR := $(FLASK_PATH)/templates
|
||||
src_$(FLASK_MODULE)_instance_REC_DIR := $(FLASK_PATH)/resources
|
||||
|
||||
endif
|
@@ -44,6 +44,7 @@
|
||||
"tetranz/select2entity-bundle": "^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "*",
|
||||
"symfony/debug-pack": "*",
|
||||
"symfony/test-pack": "*"
|
||||
},
|
||||
@@ -75,15 +76,9 @@
|
||||
"symfony/polyfill-php56": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"pre-install-cmd": [
|
||||
"php scripts/checkcomposer.php"
|
||||
],
|
||||
"auto-scripts": {
|
||||
"cache:clear": "symfony-cmd",
|
||||
"cache:clear --env=prod": "symfony-cmd",
|
||||
"assets:install %PUBLIC_DIR%": "symfony-cmd",
|
||||
"make:migration": "symfony-cmd",
|
||||
"doctrine:migrations:migrate --no-interaction --allow-no-migration": "symfony-cmd"
|
||||
"assets:install %PUBLIC_DIR%": "symfony-cmd"
|
||||
},
|
||||
"post-install-cmd": [
|
||||
"@auto-scripts"
|
388
src/schedule-2.0/composer.lock → composer.lock
generated
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "1ad3ebfcef7f9cf273d256ed17d9bfa1",
|
||||
"content-hash": "b88b4bb7a5b2d82324133b372e47e930",
|
||||
"packages": [
|
||||
{
|
||||
"name": "clue/stream-filter",
|
||||
@@ -8629,6 +8629,385 @@
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "composer/pcre",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/pcre.git",
|
||||
"reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560",
|
||||
"reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.2 || ^7.0 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^1.3",
|
||||
"phpstan/phpstan-strict-rules": "^1.1",
|
||||
"symfony/phpunit-bridge": "^4.2 || ^5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\Pcre\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "http://seld.be"
|
||||
}
|
||||
],
|
||||
"description": "PCRE wrapping library that offers type-safe preg_* replacements.",
|
||||
"keywords": [
|
||||
"PCRE",
|
||||
"preg",
|
||||
"regex",
|
||||
"regular expression"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/composer/pcre/issues",
|
||||
"source": "https://github.com/composer/pcre/tree/1.0.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://packagist.com",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/composer",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-01-21T20:24:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/semver",
|
||||
"version": "3.4.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/semver.git",
|
||||
"reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95",
|
||||
"reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.2 || ^7.0 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^1.11",
|
||||
"symfony/phpunit-bridge": "^3 || ^7"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\Semver\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nils Adermann",
|
||||
"email": "naderman@naderman.de",
|
||||
"homepage": "http://www.naderman.de"
|
||||
},
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "http://seld.be"
|
||||
},
|
||||
{
|
||||
"name": "Rob Bast",
|
||||
"email": "rob.bast@gmail.com",
|
||||
"homepage": "http://robbast.nl"
|
||||
}
|
||||
],
|
||||
"description": "Semver library that offers utilities, version constraint parsing and validation.",
|
||||
"keywords": [
|
||||
"semantic",
|
||||
"semver",
|
||||
"validation",
|
||||
"versioning"
|
||||
],
|
||||
"support": {
|
||||
"irc": "ircs://irc.libera.chat:6697/composer",
|
||||
"issues": "https://github.com/composer/semver/issues",
|
||||
"source": "https://github.com/composer/semver/tree/3.4.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://packagist.com",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/composer",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-08-20T19:15:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/xdebug-handler",
|
||||
"version": "2.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/xdebug-handler.git",
|
||||
"reference": "9e36aeed4616366d2b690bdce11f71e9178c579a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a",
|
||||
"reference": "9e36aeed4616366d2b690bdce11f71e9178c579a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer/pcre": "^1",
|
||||
"php": "^5.3.2 || ^7.0 || ^8.0",
|
||||
"psr/log": "^1 || ^2 || ^3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^1.0",
|
||||
"phpstan/phpstan-strict-rules": "^1.1",
|
||||
"symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\XdebugHandler\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "John Stevenson",
|
||||
"email": "john-stevenson@blueyonder.co.uk"
|
||||
}
|
||||
],
|
||||
"description": "Restarts a process without Xdebug.",
|
||||
"keywords": [
|
||||
"Xdebug",
|
||||
"performance"
|
||||
],
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/composer",
|
||||
"issues": "https://github.com/composer/xdebug-handler/issues",
|
||||
"source": "https://github.com/composer/xdebug-handler/tree/2.0.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://packagist.com",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/composer",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-02-24T20:20:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "friendsofphp/php-cs-fixer",
|
||||
"version": "v2.19.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
|
||||
"reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/75ac86f33fab4714ea5a39a396784d83ae3b5ed8",
|
||||
"reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer/semver": "^1.4 || ^2.0 || ^3.0",
|
||||
"composer/xdebug-handler": "^1.2 || ^2.0",
|
||||
"doctrine/annotations": "^1.2",
|
||||
"ext-json": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"php": "^5.6 || ^7.0 || ^8.0",
|
||||
"php-cs-fixer/diff": "^1.3",
|
||||
"symfony/console": "^3.4.43 || ^4.1.6 || ^5.0",
|
||||
"symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0",
|
||||
"symfony/filesystem": "^3.0 || ^4.0 || ^5.0",
|
||||
"symfony/finder": "^3.0 || ^4.0 || ^5.0",
|
||||
"symfony/options-resolver": "^3.0 || ^4.0 || ^5.0",
|
||||
"symfony/polyfill-php70": "^1.0",
|
||||
"symfony/polyfill-php72": "^1.4",
|
||||
"symfony/process": "^3.0 || ^4.0 || ^5.0",
|
||||
"symfony/stopwatch": "^3.0 || ^4.0 || ^5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"justinrainbow/json-schema": "^5.0",
|
||||
"keradus/cli-executor": "^1.4",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"php-coveralls/php-coveralls": "^2.4.2",
|
||||
"php-cs-fixer/accessible-object": "^1.0",
|
||||
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
|
||||
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
|
||||
"phpspec/prophecy-phpunit": "^1.1 || ^2.0",
|
||||
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5",
|
||||
"phpunitgoodpractices/polyfill": "^1.5",
|
||||
"phpunitgoodpractices/traits": "^1.9.1",
|
||||
"sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1",
|
||||
"symfony/phpunit-bridge": "^5.2.1",
|
||||
"symfony/yaml": "^3.0 || ^4.0 || ^5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "For handling output formats in XML",
|
||||
"ext-mbstring": "For handling non-UTF8 characters.",
|
||||
"php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
|
||||
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
|
||||
"symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
|
||||
},
|
||||
"bin": [
|
||||
"php-cs-fixer"
|
||||
],
|
||||
"type": "application",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.19-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpCsFixer\\": "src/"
|
||||
},
|
||||
"classmap": [
|
||||
"tests/Test/AbstractFixerTestCase.php",
|
||||
"tests/Test/AbstractIntegrationCaseFactory.php",
|
||||
"tests/Test/AbstractIntegrationTestCase.php",
|
||||
"tests/Test/Assert/AssertTokensTrait.php",
|
||||
"tests/Test/IntegrationCase.php",
|
||||
"tests/Test/IntegrationCaseFactory.php",
|
||||
"tests/Test/IntegrationCaseFactoryInterface.php",
|
||||
"tests/Test/InternalIntegrationCaseFactory.php",
|
||||
"tests/Test/IsIdenticalConstraint.php",
|
||||
"tests/Test/TokensWithObservedTransformers.php",
|
||||
"tests/TestCase.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Dariusz Rumiński",
|
||||
"email": "dariusz.ruminski@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A tool to automatically fix PHP code style",
|
||||
"support": {
|
||||
"issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues",
|
||||
"source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.19.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/keradus",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-11-15T17:17:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-cs-fixer/diff",
|
||||
"version": "v1.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHP-CS-Fixer/diff.git",
|
||||
"reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759",
|
||||
"reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.6 || ^7.0 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0",
|
||||
"symfony/process": "^3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
},
|
||||
{
|
||||
"name": "Kore Nordmann",
|
||||
"email": "mail@kore-nordmann.de"
|
||||
},
|
||||
{
|
||||
"name": "SpacePossum"
|
||||
}
|
||||
],
|
||||
"description": "sebastian/diff v2 backport support for PHP5.6",
|
||||
"homepage": "https://github.com/PHP-CS-Fixer",
|
||||
"keywords": [
|
||||
"diff"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHP-CS-Fixer/diff/issues",
|
||||
"source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1"
|
||||
},
|
||||
"abandoned": true,
|
||||
"time": "2020-10-14T08:39:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/browser-kit",
|
||||
"version": "v4.4.15",
|
||||
@@ -8996,7 +9375,7 @@
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"stability-flags": {},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
@@ -9004,5 +9383,6 @@
|
||||
"ext-ctype": "*",
|
||||
"ext-iconv": "*"
|
||||
},
|
||||
"platform-dev": []
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.6.0"
|
||||
}
|
@@ -11,3 +11,5 @@ twig:
|
||||
appAuth: '%appAuth%'
|
||||
appName: '%appName%'
|
||||
appCron: '%appCron%'
|
||||
doliActive: '%doliActive%'
|
||||
doliUri: '%doliUri%'
|
@@ -266,13 +266,13 @@ app_offer_viewservice:
|
||||
path: /master/offer/viewservice
|
||||
defaults: { _controller: App\Controller\OfferController:viewservice }
|
||||
|
||||
app_offer_getorders:
|
||||
path: /master/offer/getorders
|
||||
defaults: { _controller: App\Controller\OfferController:getorders }
|
||||
app_offer_dolibarr:
|
||||
path: /master/offer/dolibarr
|
||||
defaults: { _controller: App\Controller\OfferController:dolibarr }
|
||||
|
||||
app_offer_convert:
|
||||
path: /master/offer/convert/{type}/{id}
|
||||
defaults: { _controller: App\Controller\OfferController:convert }
|
||||
app_offer_getdolibarr:
|
||||
path: /master/offer/getdolibarr
|
||||
defaults: { _controller: App\Controller\OfferController:getdolibarr }
|
||||
|
||||
#== Task ====================================================================================================
|
||||
app_task:
|
@@ -1,5 +0,0 @@
|
||||
|
||||
|
||||
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
||||
CREATE DATABASE schedule DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
|
@@ -1,104 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<creole>
|
||||
<files>
|
||||
<file filelist='schedule' name='/etc/eole/eole-db.d/schedule-db.yml' rm='True' mkdir='True'/>
|
||||
</files>
|
||||
|
||||
<containers>
|
||||
<container name='web'>
|
||||
<!--
|
||||
<package>schedule-apps</package>
|
||||
-->
|
||||
|
||||
<!-- service de configuration apache -->
|
||||
<service method="apache" servicelist="schedule">schedule</service>
|
||||
|
||||
<!-- template -->
|
||||
<file filelist='schedule' name='/etc/apache2/sites-available/schedule' source='schedule-apache.conf' />
|
||||
<file filelist='schedule' name='/var/www/html/schedule/.env.local' source='schedule-env.local' rm='True'/>
|
||||
<file filelist='schedule' name='/var/www/html/schedule/scripts/proxy.sh' source='schedule-proxy.sh' rm='True'/>
|
||||
<file filelist='schedule' name='/etc/cron.d/schedule' source='schedule.cron' rm='True'/>
|
||||
</container>
|
||||
</containers>
|
||||
|
||||
<variables>
|
||||
<family name='applications web'>
|
||||
<variable name='activer_schedule' type='oui/non' description='Activer schedule'>
|
||||
<value>oui</value>
|
||||
</variable>
|
||||
</family>
|
||||
|
||||
<family name='schedule' mode='expert'>
|
||||
<variable type='string' name='schedule_db_mode' description='Serveur de bases de données à utiliser'/>
|
||||
<variable type='string' name='schedule_dbserver' description='Adresse du serveur de base de données'/>
|
||||
<variable type='number' name='schedule_dbport' description="Port d'écoute du serveur de base de données"/>
|
||||
<variable type='string' name='schedule_allow_hosts' description="Hôtes authorisés à utiliser la base de données" multi='True'/>
|
||||
<variable type='string' name='schedule_dbuser' description='Utilisateur du serveur de base de données'/>
|
||||
<variable type='string' name='schedule_dbpass' description='Fichier de mot de passe du serveur'/>
|
||||
<variable type='string' name='schedule_email_url' description='URL de connexion au serveur smtp'/>
|
||||
<variable type='string' name='schedule_email_global_notif' description='Email pour envoie de notifications'/>
|
||||
<variable type='string' name="schedule_office_hour_start" description="Heure de début d'une journée">
|
||||
<value>09:00</value>
|
||||
</variable>
|
||||
<variable type='string' name="schedule_office_hour_end" description="Heure de fin d'une journée">
|
||||
<value>17:30</value>
|
||||
</variable>
|
||||
<variable type='oui/non' name="schedule_dolibarr_api" description='Activer la récupération des commandes depuis Dolibarr'>
|
||||
<value>non</value>
|
||||
</variable>
|
||||
<variable type='string' name='schedule_dolibarr_apikey' description='Api Key pour Dolibarr'/>
|
||||
<variable type='string' name='schedule_dolibarr_uri' description='Uri du serveur Dolibarr'/>
|
||||
|
||||
<variable type='oui/non' name="schedule_sentry" description='Activer Sentry'>
|
||||
<value>non</value>
|
||||
</variable>
|
||||
<variable type='string' name='schedule_sentry_dsn' description='DSN de Sentry'/>
|
||||
</family>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
<condition name='hidden_if_in' source='activer_apache'>
|
||||
<param>non</param>
|
||||
<target type='filelist'>schedule</target>
|
||||
<target type='servicelist'>schedule</target>
|
||||
</condition>
|
||||
|
||||
<condition name='hidden_if_in' source='activer_schedule'>
|
||||
<param>non</param>
|
||||
<target type='filelist'>schedule</target>
|
||||
<target type='servicelist'>schedule</target>
|
||||
</condition>
|
||||
|
||||
<check name='valid_enum' target='schedule_db_mode'>
|
||||
<param>['default', 'externe', 'local']</param>
|
||||
</check>
|
||||
<condition name='disabled_if_in' source='schedule_db_mode'>
|
||||
<param>local</param>
|
||||
<target type='variable'>schedule_dbserver</target>
|
||||
<target type='variable'>schedule_dbuser</target>
|
||||
<target type='variable'>schedule_dbport</target>
|
||||
<target type='variable'>schedule_dbpass</target>
|
||||
</condition>
|
||||
<condition name='disabled_if_in' source='schedule_db_mode'>
|
||||
<param>default</param>
|
||||
<target type='variable'>schedule_dbserver</target>
|
||||
<target type='variable'>schedule_dbuser</target>
|
||||
<target type='variable'>schedule_dbport</target>
|
||||
<target type='variable'>schedule_dbpass</target>
|
||||
<target type='variable'>schedule_allow_hosts</target>
|
||||
</condition>
|
||||
<condition name='disabled_if_in' source='schedule_dolibarr_api'>
|
||||
<param>non</param>
|
||||
<target type='variable'>schedule_dolibarr_apikey</target>
|
||||
<target type='variable'>schedule_dolibarr_uri</target>
|
||||
</condition>
|
||||
<condition name='disabled_if_in' source='schedule_sentry'>
|
||||
<param>non</param>
|
||||
<target type='variable'>schedule_sentry_dsn</target>
|
||||
</condition>
|
||||
</constraints>
|
||||
|
||||
<help>
|
||||
<variable name='activer_schedule'>Outils de gestion de Planning</variable>
|
||||
</help>
|
||||
</creole>
|
41
docker-compose.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb
|
||||
container_name: schedule-mariadb
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: changeme
|
||||
MYSQL_DATABASE: schedule
|
||||
MYSQL_USER: user
|
||||
MYSQL_PASSWORD: changeme
|
||||
volumes:
|
||||
- mariadb-data:/var/lib/mysql
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
container_name: schedule-adminer
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 6081:8080
|
||||
|
||||
schedule:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./misc/docker/Dockerfile
|
||||
container_name: schedule
|
||||
image: reg.cadoles.com/envole/schedule
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./src:/app/src:delegated
|
||||
- ./templates:/app/templates:delegated
|
||||
- ./config:/app/config:delegated
|
||||
- ./public/uploads:/app/public/uploads:delegated
|
||||
- ./uploads:/app/uploads:delegated
|
||||
- ./misc:/app/misc:delegated
|
||||
ports:
|
||||
- "8000:80"
|
||||
|
||||
volumes:
|
||||
mariadb-data:
|
231
eole.mk
@@ -1,231 +0,0 @@
|
||||
#
|
||||
# NE PAS EDITER CE FICHIER
|
||||
#
|
||||
# Utiliser <appli>.mk à inclure à la fin de Makefile
|
||||
|
||||
#################
|
||||
# Sanity checks #
|
||||
#################
|
||||
|
||||
ifeq (, $(DESTDIR))
|
||||
$(warning $$(DESTDIR) is empty, installation will be done in /)
|
||||
endif
|
||||
|
||||
ifeq (, $(filter-out XXX-XXX, $(strip $(SOURCE))))
|
||||
$(error $$(SOURCE) variable has incorrect value '$(SOURCE)')
|
||||
endif
|
||||
|
||||
ifeq (, $(filter-out 2.X, $(strip $(EOLE_VERSION))))
|
||||
$(error $$(EOLE_VERSION) variable has incorrect value '$(EOLE_VERSION)')
|
||||
endif
|
||||
|
||||
ifeq (, $(filter-out 2.X.Y, $(strip $(EOLE_RELEASE))))
|
||||
$(error $$(EOLE_RELEASE) variable has incorrect value '$(EOLE_RELEASE)')
|
||||
endif
|
||||
|
||||
#########################
|
||||
# Variables definitions #
|
||||
#########################
|
||||
|
||||
INSTALL := install
|
||||
INSTALL_DATA := install -m 644
|
||||
INSTALL_PROGRAM := install -m 755
|
||||
INSTALL_DIRECTORY := install -m 755 -d
|
||||
INSTALL_RECURSIVE := cp -dr --no-preserve=ownership
|
||||
|
||||
# Standard path
|
||||
bin_PROG_DIR := $(DESTDIR)/usr/bin
|
||||
sbin_PROG_DIR := $(DESTDIR)/usr/sbin
|
||||
man8_DATA_DIR := $(DESTDIR)/usr/share/man/fr.UTF-8/man8
|
||||
|
||||
# Base
|
||||
eole_DIR := $(DESTDIR)/usr/share/eole
|
||||
|
||||
ifeq ($(strip $(EOLE_VERSION)), 2.3)
|
||||
diagnose_PROG_DIR := $(eole_DIR)/diagnose/module
|
||||
else
|
||||
diagnose_PROG_DIR := $(eole_DIR)/diagnose/
|
||||
endif
|
||||
|
||||
# Creole
|
||||
creole_DIR := $(eole_DIR)/creole
|
||||
dicos_DATA_DIR := $(creole_DIR)/dicos
|
||||
tmpl_DATA_DIR := $(creole_DIR)/distrib
|
||||
preservice_PROG_DIR := $(eole_DIR)/preservice
|
||||
pretemplate_PROG_DIR := $(eole_DIR)/pretemplate
|
||||
posttemplate_PROG_DIR := $(eole_DIR)/posttemplate
|
||||
postservice_PROG_DIR := $(eole_DIR)/postservice
|
||||
ifeq ($(strip $(EOLE_VERSION)), 2.3)
|
||||
firewall_DATA_DIR := $(eole_DIR)/firewall
|
||||
endif
|
||||
bacula_restore_DATA_DIR := $(eole_DIR)/bacula/restore
|
||||
bareos_restore_DATA_DIR := $(eole_DIR)/bareos/restore
|
||||
bacula_fichier_DATA_DIR := $(DESTDIR)/etc/bacula/baculafichiers.d
|
||||
bareos_fichier_DATA_DIR := $(DESTDIR)/etc/bareos/bareosfichiers.d
|
||||
ifeq ($(strip $(EOLE_VERSION)), 2.3)
|
||||
schedule_pre_PROG_DIR := $(eole_DIR)/schedule/pre
|
||||
schedule_post_PROG_DIR := $(eole_DIR)/schedule/post
|
||||
else
|
||||
schedule_scripts_PROG_DIR := $(eole_DIR)/schedule/scripts
|
||||
endif
|
||||
extra_REC_DIR := $(creole_DIR)/extra
|
||||
|
||||
# Zéphir
|
||||
zephir_DATA_DIR := $(DESTDIR)/usr/share/zephir
|
||||
zephir_configs_DATA_DIR := $(zephir_DATA_DIR)/monitor/configs
|
||||
zephir_srv_DATA_DIR := $(zephir_configs_DATA_DIR)/services
|
||||
zephir_scripts_PROG_DIR := $(zephir_DATA_DIR)/scripts
|
||||
|
||||
# SSO
|
||||
sso_DATA_DIR := $(DESTDIR)/usr/share/sso
|
||||
sso_filtres_DATA_DIR := $(sso_DATA_DIR)/app_filters
|
||||
sso_user-info_DATA_DIR := $(sso_DATA_DIR)/user_infos
|
||||
|
||||
# EAD
|
||||
ead_DATA_DIR := $(DESTDIR)/usr/share/ead2/backend/config
|
||||
ead_actions_DATA_DIR := $(ead_DATA_DIR)/actions
|
||||
ead_perms_DATA_DIR := $(ead_DATA_DIR)/perms
|
||||
ead_roles_DATA_DIR := $(ead_DATA_DIR)/roles
|
||||
|
||||
# Program libraries goes under /usr/lib/<PROGRAM>/
|
||||
lib_$(SOURCE)_DATA_DIR := $(DESTDIR)/usr/lib/$(SOURCE)
|
||||
|
||||
# Scripts Eole
|
||||
scripts_PROG_DIR := $(eole_DIR)/sbin
|
||||
lib_eole_DATA_DIR := $(DESTDIR)/usr/lib/eole
|
||||
|
||||
# LDAP
|
||||
ldap_passwords_DATA_DIR := $(eole_DIR)/annuaire/password_files
|
||||
|
||||
# LXC
|
||||
lxc_DATA_DIR := $(eole_DIR)/lxc
|
||||
lxc_fstab_DATA_DIR := $(lxc_DATA_DIR)/fstab
|
||||
lxc_hosts_DATA_DIR := $(lxc_DATA_DIR)/hosts
|
||||
|
||||
# SQL
|
||||
sql_DATA_DIR := $(eole_DIR)/mysql/$(SOURCE)
|
||||
sql_gen_DATA_DIR := $(sql_DATA_DIR)/gen
|
||||
sql_updates_DATA_DIR := $(sql_DATA_DIR)/updates
|
||||
|
||||
sql_conf_gen_DATA_DIR := $(eole_DIR)/applications/gen
|
||||
sql_conf_passwords_DATA_DIR := $(eole_DIR)/applications/passwords
|
||||
sql_conf_updates_DATA_DIR := $(eole_DIR)/applications/updates/$(SOURCE)
|
||||
|
||||
# EoleDB sql directory
|
||||
db_DIR := $(eole_DIR)/db
|
||||
db_gen_DATA_DIR := $(eole_DIR)/db/$(SOURCE)/gen
|
||||
db_updates_DATA_DIR := $(eole_DIR)/db/$(SOURCE)/updates
|
||||
|
||||
# Certifs
|
||||
certs_DATA_DIR := $(eole_DIR)/certs
|
||||
|
||||
# Logrotate
|
||||
logrotate_DATA_DIR := $(DESTDIR)/etc/logrotate.d
|
||||
|
||||
# Cron
|
||||
cron_PROG_DIR := $(DESTDIR)/etc/cron.daily
|
||||
|
||||
# Python modules
|
||||
ifneq ($(DESTDIR),)
|
||||
PYTHON_OPTS := --root $(DESTDIR)
|
||||
endif
|
||||
|
||||
# Translation
|
||||
TRANSLATION_SRC := translation
|
||||
TRANSLATION_DEST := $(DESTDIR)/usr/share/locale
|
||||
PO_FILES = $(wildcard $(TRANSLATION_SRC)/*/*.po)
|
||||
MO_FOLDERS = $(addprefix $(TRANSLATION_DEST), $(addsuffix LC_MESSAGES,$(subst $(TRANSLATION_SRC),,$(dir $(PO_FILES)))))
|
||||
|
||||
#############################################
|
||||
# Common directories and files installation #
|
||||
#############################################
|
||||
|
||||
all:
|
||||
|
||||
$(MO_FOLDERS):
|
||||
$(INSTALL_DIRECTORY) $@
|
||||
|
||||
$(PO_FILES): $(MO_FOLDERS)
|
||||
msgfmt -o $(TRANSLATION_DEST)$(subst $(TRANSLATION_SRC),,$(addsuffix LC_MESSAGES,$(dir $@)))/$(notdir $(@:.po=.mo)) $@
|
||||
|
||||
install-lang: $(PO_FILES)
|
||||
|
||||
install:: install-dirs install-files install-lang
|
||||
|
||||
# $1 = command to run
|
||||
# $2 = source directory
|
||||
# $3 = destination directory
|
||||
define fc_install_file
|
||||
if [ -d $2 ]; then \
|
||||
for file in `ls -1 $2/`; do \
|
||||
$1 $2/$$file $3 || true; \
|
||||
done; \
|
||||
fi
|
||||
endef
|
||||
|
||||
##
|
||||
## Directory creation
|
||||
##
|
||||
|
||||
# use % to catch local name in $*
|
||||
# data, program and recursive directory require a corresponding
|
||||
# directory in local sources
|
||||
%_DATA_DIR %_PROG_DIR %REC_DIR:
|
||||
test ! -d $(subst _,/,$*) || $(INSTALL_DIRECTORY) $($@)
|
||||
|
||||
# Create the directory referenced by the variable without a local one.
|
||||
%_DIR:
|
||||
@: # do nothing
|
||||
|
||||
##
|
||||
## Install files present directly under data, program and recursive directories
|
||||
##
|
||||
|
||||
# $* : name of variable
|
||||
# $($*): value of variable
|
||||
%-instdata:
|
||||
$(call fc_install_file, $(INSTALL_DATA), $(subst _,/,$(subst _DATA_DIR,,$*)), $($*))
|
||||
|
||||
%-instprog:
|
||||
$(call fc_install_file, $(INSTALL_PROGRAM), $(subst _,/,$(subst _PROG_DIR,,$*)), $($*))
|
||||
|
||||
%-instrec:
|
||||
$(call fc_install_file, $(INSTALL_RECURSIVE), $(subst _,/,$(subst _REC_DIR,,$*)), $($*))
|
||||
|
||||
|
||||
# Use second expansion as variables may be created in included
|
||||
# Makefiles
|
||||
.SECONDEXPANSION:
|
||||
|
||||
# List of all directories
|
||||
installdirs_LIST = $(foreach V, $(filter %_DIR, $(.VARIABLES)), \
|
||||
$(if $(filter file, $(origin $(V))), \
|
||||
$(V)))
|
||||
# List of data directories
|
||||
installdata_LIST = $(filter %_DATA_DIR, $(installdirs_LIST))
|
||||
# List of program directories
|
||||
installprog_LIST = $(filter %_PROG_DIR, $(installdirs_LIST))
|
||||
# List of recursive directories
|
||||
installrec_LIST = $(filter %_REC_DIR, $(installdirs_LIST))
|
||||
|
||||
# Expand directories to create as dependency
|
||||
# Use double-colon to permit user to define additionnal install-dirs
|
||||
install-dirs:: $$(installdirs_LIST)
|
||||
|
||||
# Expand files to install as dependency
|
||||
# Use double-colon to permit user to define additionnal install-files
|
||||
install-files:: install-data-files install-prog-files install-rec-dirs
|
||||
|
||||
install-data-files: $$(patsubst %,%-instdata,$$(installdata_LIST))
|
||||
|
||||
install-prog-files: $$(patsubst %,%-instprog,$$(installprog_LIST))
|
||||
|
||||
install-rec-dirs: $$(patsubst %,%-instrec,$$(installrec_LIST))
|
||||
|
||||
# Installation of python modules
|
||||
ifeq ($(shell test -f setup.py && echo 0), 0)
|
||||
install-files::
|
||||
python setup.py install --no-compile --install-layout=deb $(PYTHON_OPTS)
|
||||
endif
|
||||
|
||||
.PHONY: install install-dirs install-files install-data-files install-prog-files install-rec-dirs
|
25
misc/docker/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
ARG NODE_VERSION=20.12.2
|
||||
FROM node:${NODE_VERSION}-alpine AS node
|
||||
|
||||
FROM reg.cadoles.com/envole/nineapache:7.4
|
||||
COPY ./misc/docker/apache.conf /etc/apache2/conf.d/zapp.conf
|
||||
|
||||
COPY --from=node /usr/lib /usr/lib
|
||||
COPY --from=node /usr/local/lib /usr/local/lib
|
||||
COPY --from=node /usr/local/include /usr/local/include
|
||||
COPY --from=node /usr/local/bin /usr/local/bin
|
||||
|
||||
RUN npm install -g yarn --force
|
||||
RUN composer self-update --1
|
||||
|
||||
RUN echo "* * * * * /app/bin/console app:Cron --env=prod" >> /var/spool/cron/crontabs/root
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
||||
RUN export NODE_OPTIONS=--openssl-legacy-provider && yarn install
|
||||
RUN export NODE_OPTIONS=--openssl-legacy-provider && yarn build
|
||||
RUN rm -rf node_modules
|
||||
RUN composer install
|
||||
|
||||
CMD /app/misc/script/reconfigure.sh && /etc/apache2/apache2.sh
|
19
misc/docker/apache.conf
Executable file
@@ -0,0 +1,19 @@
|
||||
LoadModule rewrite_module modules/mod_rewrite.so
|
||||
ServerName nineapache.local
|
||||
DocumentRoot "/app/public"
|
||||
Alias /schedule /app/public
|
||||
<Directory "/app/public">
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
|
||||
RewriteRule .* - [E=BASE:%1]
|
||||
RewriteCond %{HTTP:Authorization} .+
|
||||
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
|
||||
RewriteCond %{ENV:REDIRECT_STATUS} =""
|
||||
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ %{ENV:BASE}/index.php [L]
|
||||
</Directory>
|
28
misc/script/reconfigure.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
# Se positionner sur la racine du projet
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
cd ${DIR}
|
||||
cd ../..
|
||||
DIR=$(pwd)
|
||||
|
||||
mkdir -p public/uploads/avatar
|
||||
cp public/images/admin.jpg public/uploads/avatar/
|
||||
cp public/images/system.jpg public/uploads/avatar/
|
||||
cp public/images/noavatar.png public/uploads/avatar/
|
||||
chown -R apache:apache public/uploads
|
||||
|
||||
mkdir -p uploads
|
||||
chown -R apache:apache public/uploads
|
||||
|
||||
bin/console d:s:u --force --complete
|
||||
php bin/console app:AppInit --env=prod
|
||||
php bin/console app:CronInit --env=prod
|
||||
php bin/console app:Script --env=prod
|
||||
|
||||
crond -b
|
||||
|
||||
echo
|
||||
|
||||
exec $@
|
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
CreoleRun "/var/www/html/schedule/scripts/reconfigure.sh" web
|
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
CreoleRun "/var/www/html/schedule/scripts/genkey.sh" web
|
||||
exit 0
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 936 B After Width: | Height: | Size: 936 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
5
src/schedule-2.0/src/Command/AppInitCommand.php → src/Command/AppInitCommand.php
Normal file → Executable file
@@ -21,7 +21,6 @@ use App\Entity\Domaine;
|
||||
|
||||
class AppInitCommand extends Command
|
||||
{
|
||||
|
||||
private $container;
|
||||
private $em;
|
||||
private $output;
|
||||
@@ -68,7 +67,9 @@ class AppInitCommand extends Command
|
||||
|
||||
$output->writeln('');
|
||||
|
||||
return $this->em->flush();
|
||||
$this->em->flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected function insertNature($id,$name,$isvacation) {
|
13
src/schedule-2.0/src/Command/CronCommand.php → src/Command/CronCommand.php
Normal file → Executable file
@@ -103,7 +103,7 @@ class CronCommand extends Command
|
||||
$parameter = new ArrayInput($jsonparameter);
|
||||
|
||||
// Executer la commande
|
||||
$returnCode=false;
|
||||
$returnCode==1;
|
||||
try{
|
||||
$returnCode = $command->run($parameter, $output);
|
||||
|
||||
@@ -132,12 +132,9 @@ class CronCommand extends Command
|
||||
}
|
||||
|
||||
// Statut OK/KO/Retry
|
||||
if($returnCode!="retry"||!$returnCode) {
|
||||
$cron->setStatut(2);
|
||||
if($returnCode!=1) {
|
||||
$cron->setStatut(3);
|
||||
if($cron->getRepeatcall()>0) $cron->setRepeatexec($cron->getRepeatexec()+1);
|
||||
}
|
||||
if($returnCode==1) {
|
||||
$cron->setStatut(3);
|
||||
if($cron->getRepeatcall()>0) $cron->setRepeatexec($cron->getRepeatexec()+1);
|
||||
}
|
||||
|
||||
$this->em->persist($cron);
|
||||
@@ -151,7 +148,7 @@ class CronCommand extends Command
|
||||
$this->writelnred("");
|
||||
}
|
||||
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
private function writelnred($string) {
|
7
src/schedule-2.0/src/Command/CronInitCommand.php → src/Command/CronInitCommand.php
Normal file → Executable file
@@ -44,8 +44,7 @@ class CronInitCommand extends Command
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$appCron = $this->container->getParameter('appCron');
|
||||
if(!$appCron)
|
||||
return false;
|
||||
if(!$appCron) return 0;
|
||||
|
||||
$output->writeln('CRON = Default Data');
|
||||
|
||||
@@ -53,7 +52,9 @@ class CronInitCommand extends Command
|
||||
|
||||
$output->writeln('');
|
||||
|
||||
return $this->em->flush();
|
||||
$this->em->flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected function insertCron() {
|
2
src/schedule-2.0/src/Command/DumpBddCommand.php → src/Command/DumpBddCommand.php
Normal file → Executable file
@@ -68,7 +68,7 @@ class DumpBddCommand extends Command
|
||||
}
|
||||
|
||||
$this->writeln('');
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected function runCommand($command)
|
13
src/schedule-2.0/src/Command/ScriptCommand.php → src/Command/ScriptCommand.php
Normal file → Executable file
@@ -46,10 +46,11 @@ class ScriptCommand extends Command
|
||||
$output->writeln('APP = Scripts');
|
||||
|
||||
$this->callscript("initdomaine");
|
||||
$this->callscript("initofferservice");
|
||||
|
||||
$output->writeln('');
|
||||
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +78,16 @@ class ScriptCommand extends Command
|
||||
}
|
||||
}
|
||||
|
||||
private function initofferservice() {
|
||||
$offers=$this->em->getRepository("App:Offer")->findBy(["service"=>null]);
|
||||
foreach($offers as $offer) {
|
||||
$offer->setService($offer->getProject()->getService());
|
||||
$this->em->persist($offer);
|
||||
$this->em->flush();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function writelnred($string) {
|
||||
$this->output->writeln('<fg=red>'.$string.'</>');
|
||||
$this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n");
|
4
src/schedule-2.0/src/Command/SendMailCommand.php → src/Command/SendMailCommand.php
Normal file → Executable file
@@ -67,11 +67,11 @@ class SendMailCommand extends Command
|
||||
$this->writeln("");
|
||||
$this->writelnred("Impossible d'envoyer des mails");
|
||||
$this->writeln("");
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
$this->writeln("");
|
||||
|
||||
return 1;
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
2
src/schedule-2.0/src/Command/SetPasswordCommand.php → src/Command/SetPasswordCommand.php
Normal file → Executable file
@@ -65,7 +65,7 @@ class SetPasswordCommand extends Command
|
||||
}
|
||||
|
||||
$this->writeln('');
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
private function writelnred($string) {
|
2
src/schedule-2.0/src/Command/SetRolesCommand.php → src/Command/SetRolesCommand.php
Normal file → Executable file
@@ -66,7 +66,7 @@ class SetRolesCommand extends Command
|
||||
}
|
||||
|
||||
$this->writeln('');
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
private function writelnred($string) {
|