master
VANNEAU 3 years ago
commit fe44396aa6
  1. 119
      docker-compose.yml
  2. 7
      nginx/hosts
  3. 55
      nginx/nginx.conf
  4. 21
      nginx/ssl/www.epa.apside.com.crt
  5. 28
      nginx/ssl/www.epa.apside.com.key
  6. 2165
      realm-export.json
  7. 3
      scripts/restart.sh
  8. 4
      scripts/restart.txt
  9. 286
      sql/init-sql.sql

@ -0,0 +1,119 @@
version: "3.8"
networks:
epa-networks:
services:
digitepa_proxy:
hostname: digitepa_proxy
container_name: "digitepa_proxy"
image: nginx:1.21.3
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./nginx/hosts:/etc/hosts
#- ./nginx/ssl/www.epa.apside.com.crt:/etc/nginx/ssl/www.epa.apside.com.crt
#- ./nginx/ssl/www.epa.apside.com.key:/etc/nginx/ssl/www.epa.apside.com.key
ports:
- "80:80"
- "443:443"
links:
- digitepa_front
- digitepa_back
networks:
- epa-networks
keycloak:
hostname: digitepa_keycloak
container_name: "digitepa_keycloak"
image: jboss/keycloak:15.0.2
environment:
- KEYCLOAK_USER=${LOGIN_KEYCLOAK:-admin}
- KEYCLOAK_PASSWORD=${PASS_KEYCLOAK:-admin}
- KEYCLOAK_IMPORT=/tmp/EPA-realm.json
- PROXY_ADDRESS_FORWARDING=true
volumes:
- ./realm-export.json:/tmp/EPA-realm.json
#expose:
# - "8080"
ports:
- "8080:8080"
networks:
- epa-networks
digitepa_front:
hostname: digitepa_front
container_name: "digitepa_front"
build:
context: ${PATH_SRC_FRONT}
ports:
- "4200:4200"
networks:
- epa-networks
digitepa_back:
hostname: digitepa_back
container_name: "digitepa_back"
build:
context: ${PATH_SRC_BACK}
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+:44393;http://+:44394
- ASPNETCORE_Kestrel__Certificates__Default__Password=Epa@digit852
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx
expose:
- "44393"
- "44394"
ports:
- "44393:44393"
- "44394:44394"
networks:
- epa-networks
links:
- digitepa_db
volumes:
- ${PATH_SRC_BACK}/digitepa_cert.pfx:/https/aspnetapp.pfx
digitepa_collab:
hostname: digitepa_collab
container_name: "digitepa_collab"
build:
context: ${PATH_SRC_COLL}
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:44318
#- ASPNETCORE_Kestrel__Certificates__Default__Password=Epa@digit852
#- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx
expose:
- "44318"
ports:
- "44318:44318"
networks:
- epa-networks
digitepa_db:
hostname: digitepa_db
container_name: "digitepa_db"
image: mysql:8.0.27
environment:
MYSQL_USER: ${LOGIN_DB:-dev}
MYSQL_PASSWORD: ${PASS_DB:-dev}
MYSQL_ROOT_PASSWORD: ${PASS_DB_ROOT:-passwd}
MYSQL_DATABASE: ${DATABASE:-database_ep}
expose:
- "3306"
ports:
- "3306:3306"
networks:
- epa-networks
volumes:
- ep-db:/var/lib/mysql
- ./sql/init-sql.sql:/docker-entrypoint-initdb.d/init.sql
restart: always
volumes:
ep-db:

@ -0,0 +1,7 @@
127.0.0.1 www.epa.apside.com
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.29.0.4 digitepa_proxy

@ -0,0 +1,55 @@
worker_processes auto;
events { worker_connections 1024; }
http {
upstream digitepa_front_up {
server digitepa_front:4200;
}
upstream digitepa_back_up {
server digitepa_back:44393;
}
#upstream digitepa_keycloak_up {
# server digitepa_keycloak:8080;
#}
#server {
# listen 80 default_server;
# server_name www.epa.apside.com;
#location / {
# return 301 https://$host$request_uri;
#}
#}
server {
#listen 443 ssl;
listen 80;
server_name www.epa.apside.com;
index index.html index.htm;
#ssl_certificate /etc/nginx/ssl/www.epa.apside.com.crt;
#ssl_certificate_key /etc/nginx/ssl/www.epa.apside.com.key;
location / {
proxy_pass http://digitepa_front_up/;
}
location /api {
proxy_pass https://digitepa_back_up/api;
}
location /auth {
proxy_pass http://digitepa_keycloak:8080/auth;
}
}
}

@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDYzCCAkugAwIBAgIUa7TK6w3fGjR66Yy3SHEYHnwiPR4wDQYJKoZIhvcNAQEL
BQAwQTELMAkGA1UEBhMCRlIxDzANBgNVBAgMBkZyYW5jZTEQMA4GA1UEBwwHT3Js
ZWFuczEPMA0GA1UECgwGQXBzaWRlMB4XDTIxMTExNzExMjI0NloXDTIyMTExNzEx
MjI0NlowQTELMAkGA1UEBhMCRlIxDzANBgNVBAgMBkZyYW5jZTEQMA4GA1UEBwwH
T3JsZWFuczEPMA0GA1UECgwGQXBzaWRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAt3kqsTKUAo8wdEIMnsV2QwlTc69OryxD23g56l8k/aVi76FXbxzk
V6gVCgfOQb0JXWH8OGi4gfWdzFy6XJ2JMPxvKvcXvECvZbQj5owt335ifTSw+aX9
pkSiulOOzl3F/MSghfUc5TEdlwB3S6zofYcDEVOgE/yu7Ruc07rOwa3s7laBs8Ek
N+bp/+rki55DdZF4DGGQNdN6DlTYSgudJ3X3PSpVMaY08lI+DHGd5Wt/cv9eYWrk
p5qW4KXfaUK9XA+Gm7vMM52vBv9Illdw7/xXLrQcwuBUBD86E5Pwr60Ve/5pRVGd
3hgKvbd+ioFTjVHbaVvLd0KY8XrOEyGmxQIDAQABo1MwUTAdBgNVHQ4EFgQUjqlT
IlV9f7stl4GjXMykWp7lSqIwHwYDVR0jBBgwFoAUjqlTIlV9f7stl4GjXMykWp7l
SqIwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAnof3oRTKNRzU
dbAY2iEFh0xAQRcoraYAHOXe8h76cxFnMSmdscKl50h6JFAssfBjjjdKrdy0KjHd
0FQuqPHkVcYIE2w1H/+jYjGAzpkAW90f0rNO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8NK6Xih9ITUjg38sMqKsWydBZrB/EgHkIZrLdW
DeyFXMcf/e/bkDr0VaPxcXDx/AoybSvh6CqnJ3toPII6L9OP4dMsXJ74lKqkbJGV
P2w9Km0qQCfZa0cZCqlSBpteeOkCgYEA10otWzsSRhGwdGa1mLIqtzAdVMs/nPw0
5GsAUo3Fy31WE5YN9n4i69p6WKr17z+i0rBeT0k4FzVtT4ra4QtnpRPcYMYm1TRf
EtLSzUj2x+CzL6fDi9OKtZt8KXeM3eqE7tTqL+kfMUlqGD/07P2CFZXP2bWVytX6
KFs4qkf5lX0CgYEAt/j7UOlz03TNFAg4HsKIKMrTmYF/Jau+K5Lrot9Wpio2EAWe
BozHUEEqJOQhDdqSxsQU06ipPfrdrcEYpzs5pugf+UKn83NTkVhjhRcKaFCs/1TO
9rnpJSky2Du1F5mfLn6mXSCNXMidSRRnOAltdvaBd4JjHMziuBPaoMmqG+kCgYBv
OiiSwMMhJlR23vWlTS9ac2ZD/7n+3iJpfIqvHAX7quaEufq+xc4+8iJRmwnysHrr
xSkEZ3yuKPEvrjqFGEJU/BzYdqdrcWJJNFiqrK6q94E79r3FiOZaC1mrhtNld5t0
VNYlKJjv+tDwdGKS6iqCAmNfRDx+jexvWym8d/EPdQKBgQCRY9HXQOGcVhUMuh/8
KH1VHjiV6DBnEDPlbTQP6k6c8wfpSFlHy2Yh87a2lQicyN1nO4cR8Rtsc6h4xoFP
49PHbvi2SoqOdsFoBtb/e1rR5zYXA01jHeB82Ebludou8wv0EcLIVIaVue7M1+wu
AFQ2r0jRhiYycr/sFwCvSCxVwA==
-----END PRIVATE KEY-----

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
docker stop digitepa_front
docker rm digitepa_front
docker-compose up -d

@ -0,0 +1,4 @@
docker stop digitepa_front
docker rm digitepa_front
docker volume rm 2-env_dev_ep-db
docker-compose up -d

@ -0,0 +1,286 @@
CREATE TABLE Ep(
IdEP INT,
IdCollaborateur VARCHAR(500) NOT NULL,
IdReferent VARCHAR(500) NOT NULL,
IdAgence INT,
IdBU INT,
Fonction VARCHAR(50),
TypeEp VARCHAR(3) NOT NULL,
NumeroEp INT,
Obligatoire BOOL,
Statut VARCHAR(50) NOT NULL,
CV VARCHAR(50),
DateCreation DATETIME NOT NULL,
DatePrevisionnelle DATE,
DateDisponibilite DATE,
DateSaisie DATETIME,
DateMiseAJour DATETIME,
DateSignatureCollaborateur DATETIME,
DateSignatureReferent DATETIME,
DemandeEPI INT NOT NULL,
AugmentationSalaire INT NOT NULL,
DemandeDelegation INT NOT NULL,
RdvEntretien INT NOT NULL,
PRIMARY KEY(IdEP)
);
CREATE TABLE Engagement(
IdEngagement BIGINT,
Action VARCHAR(500) NOT NULL,
Dispositif VARCHAR(50) NOT NULL,
Modalite VARCHAR(50),
DateLimite DATE,
EtatEngagement INT NOT NULL,
RaisonNonRealisable VARCHAR(50),
Id_1 INT NOT NULL,
PRIMARY KEY(Id),
FOREIGN KEY(Id_1) REFERENCES Ep(IdEP)
FOREIGN KEY(Id_1) REFERENCES Ep(EtatEngagement)
);
CREATE TABLE Note(
Id INT,
Titre VARCHAR(50),
Texte VARCHAR(500),
IdAuteur VARCHAR(50) NOT NULL,
IdCollaborateur VARCHAR(500) NOT NULL,
PRIMARY KEY(Id)
);
CREATE TABLE ParticipationEp(
Id VARCHAR(50),
IdPersonne VARCHAR(50),
Id_1 INT NOT NULL,
PRIMARY KEY(Id),
FOREIGN KEY(Id_1) REFERENCES Ep(IdEP)
);
CREATE TABLE Theme(
Id INT,
Nom VARCHAR(50) NOT NULL,
PRIMARY KEY(Id)
);
CREATE TABLE AugmentationSalaire(
IdAugmentationSalaire INT,
Augmentation DECIMAL(15,2) NOT NULL,
PrimeMission DECIMAL(15,2),
Message VARCHAR(50),
Id_1 INT NOT NULL,
PRIMARY KEY(IdAugmentationSalaire),
UNIQUE(Id_1),
FOREIGN KEY(Id_1) REFERENCES Ep(IdEP)
);
CREATE TABLE Champ(
Id INT,
Texte VARCHAR(100) NOT NULL,
Section VARCHAR(100) NOT NULL,
SousSection VARCHAR(50),
Ordre VARCHAR(100) NOT NULL,
TypeChamp INT NOT NULL,
TypeSaisie VARCHAR(50) NOT NULL,
PRIMARY KEY(Id)
);
CREATE TABLE Document(
IdDocument INT,
TypeDocument VARCHAR(50) NOT NULL,
Id_1 INT NOT NULL,
PRIMARY KEY(IdDocument),
FOREIGN KEY(Id_1) REFERENCES Ep(IdEP)
);
CREATE TABLE DemandeDelegation(
IdDemandeDelegation INT,
IdReferent VARCHAR(500) NOT NULL,
DateDemande DATETIME NOT NULL,
RaisonDemande VARCHAR(50),
Reponse BOOL,
DateReponse DATETIME,
RaisonRefus VARCHAR(500),
EpIdEP INT NOT NULL,
PRIMARY KEY(IdDemandeDelegation),
UNIQUE(EpIdEP),
FOREIGN KEY(EpIdEP) REFERENCES Ep(IdEP)
);
CREATE TABLE StatutFormation(
IdStatutFormation INT,
Libelle VARCHAR(50) NOT NULL,
PRIMARY KEY(IdStatutFormation),
UNIQUE(Libelle)
);
CREATE TABLE TypeEntretien(
IdTypeEntretien INT,
Libelle VARCHAR(50),
PRIMARY KEY(IdTypeEntretien),
UNIQUE(Libelle)
);
CREATE TABLE ObjectifPrecedent(
IdObjectif INT,
Libelle VARCHAR(50),
Atteint VARCHAR(50),
Commentaire VARCHAR(50),
EpIdEP INT NOT NULL,
PRIMARY KEY(IdObjectif),
FOREIGN KEY(EpIdEP) REFERENCES Ep(IdEP)
);
CREATE TABLE Objectif(
IdObjectif INT,
Libelle VARCHAR(50),
EpIdEP INT NOT NULL,
PRIMARY KEY(Id),
FOREIGN KEY(EpIdEP) REFERENCES Ep(IdEP)
);
CREATE TABLE OrigineFormation(
IdOrigineFormation INT,
Libelle VARCHAR(50) NOT NULL,
PRIMARY KEY(IdOrigineFormation),
UNIQUE(Libelle)
);
CREATE TABLE OrigineDemande(
IdOrigineDemande INT,
Libelle VARCHAR(50) NOT NULL,
PRIMARY KEY(IdOrigineDemande),
UNIQUE(Libelle)
);
CREATE TABLE TypeFormation(
IdTypeFormation VARCHAR(50),
Libelle VARCHAR(50) NOT NULL,
PRIMARY KEY(IdTypeFormation),
UNIQUE(Libelle)
);
CREATE TABLE ModeFormation(
IdModeFormation INT,
Libelle VARCHAR(50) NOT NULL,
PRIMARY KEY(IdModeFormation),
UNIQUE(Libelle)
);
CREATE TABLE DemandeEpI(
IdDemandeEPI INT,
IdCollaborateur VARCHAR(50) NOT NULL,
IdReferent VARCHAR(50) NOT NULL,
DateDemande DATETIME,
RaisonRefus VARCHAR(50),
DateReponse DATETIME,
Etat INT,
Reponse BOOL,
EpIdEP INT,
PRIMARY KEY(IdDemandeEPI),
UNIQUE(EpIdEP),
FOREIGN KEY(EpIdEP) REFERENCES Ep(IdEP)
);
CREATE TABLE CommentaireAssistante(
IdCommentaireAssistant INT,
idAssistante VARCHAR(50) NOT NULL,
dateCommentaire DATETIME NOT NULL,
commentaire VARCHAR(50) NOT NULL,
EpIdEP INT NOT NULL,
PRIMARY KEY(IdCommentaireAssistant),
FOREIGN KEY(EpIdEP) REFERENCES Ep(IdEP)
);
CREATE TABLE RdvEntretien(
IdRdvEntretien INT,
DateEntretien DATETIME NOT NULL,
EpIdEP INT NOT NULL,
TypeEntretienIdTypeEntretien INT NOT NULL,
EpIdEP INT NOT NULL,
PRIMARY KEY(IdRdvEntretien),
UNIQUE(EpIdEP),
FOREIGN KEY(EpIdEP) REFERENCES Ep(IdEP),
FOREIGN KEY(TypeEntretienIdTypeEntretien) REFERENCES TypeEntretien(IdTypeEntretien),
FOREIGN KEY(EpIdEP) REFERENCES Ep(IdEP)
);
CREATE TABLE Formation(
IdFormation INT,
Intitule VARCHAR(50),
DateDebut DATETIME,
DateFin DATETIME,
IdAgence INT NOT NULL,
Heure INT,
Jour INT NOT NULL,
Organisme VARCHAR(50),
EstCertifiee BOOL NOT NULL,
EstRealisee BOOL NOT NULL,
ModeFormationIdModeFormation INT NOT NULL,
TypeFormationIdTypeFormation VARCHAR(50) NOT NULL,
OrigineIdOrigineFormation INT NOT NULL,
StatutIdStatutFormation INT NOT NULL,
PRIMARY KEY(IdFormation),
FOREIGN KEY(ModeFormationIdModeFormation) REFERENCES ModeFormation(IdModeFormation),
FOREIGN KEY(TypeFormationIdTypeFormation) REFERENCES TypeFormation(IdTypeFormation),
FOREIGN KEY(OrigineIdOrigineFormation) REFERENCES OrigineFormation(IdOrigineFormation),
FOREIGN KEY(StatutIdStatutFormation) REFERENCES StatutFormation(IdStatutFormation)
);
CREATE TABLE DemandeFormation(
IdDemandeFormation INT,
Libelle VARCHAR(50) NOT NULL,
Description VARCHAR(50),
DemandeRH BOOL,
DateDemande VARCHAR(50),
Etat INT,
CommentaireRefus VARCHAR(50),
DateDerniereReponse DATETIME,
OrigineDemandeIdOrigineDemande INT NOT NULL,
EpIdEP INT NOT NULL,
PRIMARY KEY(IdDemandeFormation),
FOREIGN KEY(OrigineDemandeIdOrigineDemande) REFERENCES OrigineDemande(Id),
FOREIGN KEY(EpIdEP) REFERENCES Ep(IdEP)
);
CREATE TABLE ParticipationFormation(
IdParticipationFormation INT,
DateCreation DATETIME NOT NULL,
EstEvaluee BOOL NOT NULL,
IdDemandeFormation INT NOT NULL,
FormationIdFormation INT NOT NULL,
PRIMARY KEY(IdParticipationFormation),
UNIQUE(IdParticipationFormation),
FOREIGN KEY(IdDemandeFormation) REFERENCES DemandeFormation(IdDemandeFormation),
FOREIGN KEY(FormationIdFormation) REFERENCES Formation(IdFormation)
);
CREATE TABLE Saisie(
IdSaisie INT,
Note INT,
Texte VARCHAR(50),
Texte2 VARCHAR(50),
Niveau VARCHAR(50),
TypeSaisie INT NOT NULL,
ParticipationFormationIdParticipationFormation INT,
DocumentIdDocument INT,
ChampIdChamp INT NOT NULL,
PRIMARY KEY(IdSaisie),
FOREIGN KEY(ParticipationFormationIdParticipationFormation) REFERENCES ParticipationFormation(IdParticipationFormation),
FOREIGN KEY(DocumentIdDocument) REFERENCES Document(IdDocument),
FOREIGN KEY(ChampIdChamp) REFERENCES Champ(IdChamp)
);
CREATE TABLE ChoisirTypeEntretien(
IdChoixTypeEntretien INT,
EpIdEP INT,
Ordre INT NOT NULL,
TypeEntretienIdTypeEntretien INT NOT NULL;
PRIMARY KEY(IdChoixTypeEntretien, EpIdEP),
FOREIGN KEY(EpIdEP) REFERENCES Ep(IdEP),
FOREIGN KEY(TypeEntretienIdTypeEntretien) REFERENCES TypeEntretien(IdTypeEntretien)
);
ALTER TABLE Ep ADD FOREIGN KEY(DemandeEPIIdDemandeEPI) REFERENCES DemandeEpI(IdDemandeEPI);
ALTER TABLE Ep ADD FOREIGN KEY(AugmentationSalaireIdAugmentationSalaire) REFERENCES AugmentationSalaire(IdAugmentationSalaire);
ALTER TABLE Ep ADD FOREIGN KEY(DemandeDelegationIdDemandeDelegation) REFERENCES DemandeDelegation(IdDemandeDelegation);
ALTER TABLE Ep ADD FOREIGN KEY(RdvEntretienIdRdvEntretien) REFERENCES RdvEntretien(IdRdvEntretien);
ALTER TABLE Ep ADD FOREIGN KEY(DemandeDelegation) REFERENCES RdvEntretien(IdRdvEntretien);
Loading…
Cancel
Save