ajout des fichiers pour la construction du package debian et la compilation de l'application angular
This commit is contained in:
@@ -40,8 +40,8 @@
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "500kb",
|
||||
"maximumError": "1mb"
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "3mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
|
||||
44
build.sh
Executable file
44
build.sh
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : vincent.benoit@benserv.fr
|
||||
# Date : Novembre 2022
|
||||
# Version : 1.0.0
|
||||
# Brief : création du package Debian ncessaire pour le Frontend du configurateur
|
||||
#
|
||||
################################################################################
|
||||
|
||||
create_deb() {
|
||||
dirname=configurateurfront-$1
|
||||
/usr/bin/mkdir -p "$2/bdist_deb/$dirname"
|
||||
cd "$2/bdist_deb/$dirname"
|
||||
debvers=`/usr/bin/cat /etc/debian_version`
|
||||
IFS='.'
|
||||
read -ra vers <<< "$debvers"
|
||||
if [ "$vers" == "10" ]; then
|
||||
# Write compat file to deb template for Debian 10.x
|
||||
cat > $2/misc/template/compat << EOF
|
||||
11
|
||||
EOF
|
||||
fi
|
||||
/usr/bin/dh_make -t $2/misc/template -n -y -i -d
|
||||
cd "$2"
|
||||
/usr/local/bin/ng build --configuration "production" --output-path "bdist_deb/$dirname/app-configurateur"
|
||||
cd "$2/bdist_deb/$dirname"
|
||||
/usr/bin/find $2/misc -type f -name "*.conf" -exec /usr/bin/cp -a {} . \;
|
||||
/usr/bin/dpkg-buildpackage -b -uc -us -rfakeroot
|
||||
/usr/bin/rm -f $2/misc/template/compat
|
||||
cd ..
|
||||
if [ ! -d "$2/dist" ]; then
|
||||
/usr/bin/mkdir -p $2/dist
|
||||
/usr/bin/find . -type f -name "*.deb" -exec /usr/bin/cp -a {} $2/dist \;
|
||||
fi
|
||||
}
|
||||
|
||||
echo "*** Remove old dirs ***"
|
||||
/usr/bin/rm -rf bdist_deb dist
|
||||
echo "*** read version ***"
|
||||
vers=`/usr/bin/cat VERSION`
|
||||
echo "VERSION => $vers"
|
||||
rootpath=`pwd`
|
||||
echo "*** Create Debian Misc Package ***"
|
||||
create_deb "$vers" "$rootpath"
|
||||
39
misc/010-configurateur.conf
Normal file
39
misc/010-configurateur.conf
Normal file
@@ -0,0 +1,39 @@
|
||||
Listen 80
|
||||
|
||||
<VirtualHost *:80>
|
||||
# The ServerName directive sets the request scheme, hostname and port that
|
||||
# the server uses to identify itself. This is used when creating
|
||||
# redirection URLs. In the context of virtual hosts, the ServerName
|
||||
# specifies what hostname must appear in the request's Host: header to
|
||||
# match this virtual host. For the default virtual host (this file) this
|
||||
# value is not decisive as it is used as a last resort host regardless.
|
||||
# However, you must set it for any further virtual host explicitly.
|
||||
#ServerName www.example.com
|
||||
|
||||
ServerAdmin vincent.benoit@benserv.fr
|
||||
DocumentRoot /var/www/app-configurateur
|
||||
<Directory /var/www/app-configurateur/*>
|
||||
Order Allow,Deny
|
||||
Allow from all
|
||||
AllowOverride none
|
||||
Require all granted
|
||||
Header always set Access-Control-Allow-Origin "*"
|
||||
Header always add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
|
||||
Header always add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
|
||||
Header always add Access-Control-Expose-Headers "Content-Security-Policy, Location"
|
||||
Header always add Access-Control-Max-Age "3600"
|
||||
</Directory>
|
||||
|
||||
<Location /api>
|
||||
ProxyPreserveHost On
|
||||
ProxyPass http://127.0.0.1:5000/api
|
||||
ProxyPassReverse http://127.0.0.1:5000/api
|
||||
</Location>
|
||||
|
||||
LogLevel info
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
|
||||
5
misc/template/changelog
Normal file
5
misc/template/changelog
Normal file
@@ -0,0 +1,5 @@
|
||||
#PACKAGE# (#VERSION#) stable; urgency=medium
|
||||
|
||||
* Initial release
|
||||
|
||||
-- #USERNAME# <#EMAIL#> #DATE#
|
||||
21
misc/template/configurateurfront.postinst
Normal file
21
misc/template/configurateurfront.postinst
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
# postinst script for sclesignrestfulmisc
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
user="root"
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
/usr/sbin/a2enmod headers > /dev/null 2>&1
|
||||
/usr/sbin/a2enmod proxy > /dev/null 2>&1
|
||||
/usr/sbin/a2enmod proxy_http > /dev/null 2>&1
|
||||
/usr/sbin/a2enmod rewrite > /dev/null 2>&1
|
||||
/usr/sbin/a2enmod ssl > /dev/null 2>&1
|
||||
/usr/sbin/a2ensite 010-configurateur.conf > /dev/null 2>&1
|
||||
|
||||
/usr/bin/systemctl restart apache2 > /dev/null 2>&1
|
||||
12
misc/template/control
Normal file
12
misc/template/control
Normal file
@@ -0,0 +1,12 @@
|
||||
Source: #PACKAGE#
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Maintainer: #USERNAME# <#EMAIL#>
|
||||
Build-Depends: #BUILD_DEPS#
|
||||
Standards-Version: #POLICY#
|
||||
Homepage: https://git.nas.benserv.fr/vincent/Kine-frontend
|
||||
|
||||
Package: #PACKAGE#
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, apache2
|
||||
Description: Installation des fichiers nécessaires au fonctionnement du Frontend Configurateur
|
||||
2
misc/template/install
Normal file
2
misc/template/install
Normal file
@@ -0,0 +1,2 @@
|
||||
app-configurateur /var/www/
|
||||
010-configurateur.conf /etc/apache2/sites-available
|
||||
12
misc/template/rules
Executable file
12
misc/template/rules
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/make -f
|
||||
# See debhelper(7) (uncomment to enable)
|
||||
# output every command that modifies files on the build system.
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
#RULES_START_TEXT#
|
||||
%:
|
||||
dh $@#DH_ADDON#
|
||||
|
||||
override_dh_auto_install:
|
||||
|
||||
#RULES_END_TEXT#
|
||||
@@ -1,3 +1,4 @@
|
||||
export const environment = {
|
||||
production: true
|
||||
production: true,
|
||||
host: ""
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user