add ninecompta

This commit is contained in:
afornerot 2024-12-26 19:02:09 +01:00
parent 5bce95543f
commit b4a318ae28
6 changed files with 79 additions and 4 deletions

6
env/.env vendored
View File

@ -185,6 +185,12 @@ NINEBOARD_ACTIVATE=1
NINEBOARD_LOCAL=1
NINEBOARD_URL=${PROTOCOLE}://${WEB_URL}/nineboard
# NINECOMPTA
NINECOMPTA_SERVICE_NAME=ninecompta
NINECOMPTA_ACTIVATE=0
NINECOMPTA_LOCAL=1
NINECOMPTA_URL=${PROTOCOLE}://${WEB_URL}/ninecompta
# NINEFOLIO
NINEFOLIO_SERVICE_NAME=ninefolio
NINEFOLIO_ACTIVATE=0

View File

@ -20,11 +20,12 @@ ProxyPreserveHost On
Require all granted
</Proxy>
RequestHeader set X-Forwarded-Host "%{HTTP_HOST}s"
RequestHeader set X-Forwarded-Server "%{HTTP_HOST}s"
RequestHeader set X-Forwarded-For "%{REMOTE_ADDR}s"
#RequestHeader unset X-Forwarded-Host
#RequestHeader set X-Forwarded-Host "%{HTTP_HOST}s"
#RequestHeader set X-Forwarded-Server "%{HTTP_HOST}s"
#RequestHeader set X-Forwarded-For "%{REMOTE_ADDR}s"
RequestHeader set Host "%{HTTP_HOST}s"
RequestHeader set X-Forwarded-Proto "http"
RequestHeader set X-Forwarded-Proto "https"
# Alias pour le répertoire de validation de Certbot
Alias /.well-known/acme-challenge /usr/local/apache2/htdocs/.well-known/acme-challenge

View File

@ -0,0 +1,4 @@
# Ninecompta
ProxyPass /ninecompta http://ninecompta/ninecompta retry=0 keepalive=On
ProxyPassReverse /ninecompta http://ninecompta/ninecompta retry=0

View File

@ -0,0 +1,13 @@
services:
# Ninecompta
# Petite comptabilité
# Port interne 80
ninecompta:
image: reg.cadoles.com/envole/ninecompta
container_name: nine-ninecompta
restart: unless-stopped
env_file: ./services/50-ninecompta/env/.env.merge
networks:
- nine-network
volumes:
- ./services/50-ninecompta/volume/data/public:/app/public/uploads

6
services/50-ninecompta/env/.env vendored Normal file
View File

@ -0,0 +1,6 @@
# == NINECOMPTA =============================================================================================================================
APP_SECRET=${ADMIN_PASSWORD}
DATABASE_URL="mysql://${MARIADB_USER}:${MARIADB_PASSWORD}@${MARIADB_SERVICE_NAME}:3306/ninecompta"

View File

@ -0,0 +1,45 @@
#!/bin/bash
function upninecompta {
if [[ $NINECOMPTA_ACTIVATE == 1 && $NINECOMPTA_LOCAL == 1 ]]
then
Title ${NINECOMPTA_SERVICE_NAME^^}
if [[ $MARIADB_ACTIVATE == 1 && $MARIADB_LOCAL == 1 ]]
then
EchoVert "DATABASE"
Echo ${NINECOMPTA_SERVICE_NAME^^}
docker-compose exec $MARIADB_SERVICE_NAME /nine/init.sh $NINECOMPTA_SERVICE_NAME
Echo
fi
EchoVert "CONTAINER"
upservice ${NINECOMPTA_SERVICE_NAME}
chmod -R a+wr ./services/50-ninecompta/volume/data
Echo
fi
}
function destroyninecompta {
if [[ $NINECOMPTA_LOCAL == 1 ]]
then
Title "DESTROY $NINECOMPTA_SERVICE_NAME"
stop $NINECOMPTA_SERVICE_NAME 1
docker-compose rm -s -v -f "$NINECOMPTA_SERVICE_NAME"
if [[ -z $1 ]]; then
Question_ouinon "Souhaitez-vous supprimer la BDD associé à $NINECOMPTA_SERVICE_NAME ?";
response=$?
fi
if [[ "$response" == 0 || ! -z $1 ]]
then
EchoRouge "Delete BDD = $NINECOMPTA_SERVICE_NAME"
docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $NINECOMPTA_SERVICE_NAME
rm -rf services/50-ninecompta/volume/data
fi
echo ""
fi
}