mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Compare commits
9 Commits
0598a11d2e
...
developer
| Author | SHA1 | Date | |
|---|---|---|---|
| 444e2e0cd3 | |||
| cd902a0daa | |||
| 504fda9c38 | |||
| 40d852c6c1 | |||
| fd7e4a52a8 | |||
| 9010f8789c | |||
| fe2f74e2fa | |||
| b9c3164127 | |||
| 1429cc89c4 |
+3
-3
@@ -8,10 +8,10 @@ steps:
|
|||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.petermaquiran.xyz
|
registry: registry.petermaquiran.xyz
|
||||||
repo: registry.petermaquiran.xyz/tvone
|
repo: registry.petermaquiran.xyz/gabinete-web
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
dockerfile: Dockerfile
|
dockerfile: dockerfile
|
||||||
context: .
|
context: .
|
||||||
|
|
||||||
# 2. Trigger service update in Docker Swarm
|
# 2. Trigger service update in Docker Swarm
|
||||||
@@ -22,4 +22,4 @@ steps:
|
|||||||
curl -X POST https://docker-socket.petermaquiran.xyz/update-service
|
curl -X POST https://docker-socket.petermaquiran.xyz/update-service
|
||||||
-H "Authorization: Bearer 123"
|
-H "Authorization: Bearer 123"
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
-d "{\"service\":\"tvone_tvone\",\"image\":\"registry.petermaquiran.xyz/tvone:latest\"}"
|
-d "{\"service\":\"gabinete_gabinete-web\",\"image\":\"registry.petermaquiran.xyz/gabinete-web:latest\"}"
|
||||||
|
|||||||
+42
-12
@@ -1,15 +1,45 @@
|
|||||||
FROM node:14 as build
|
# =========================
|
||||||
WORKDIR /app
|
# BUILD STAGE
|
||||||
COPY ./package*.json /app/
|
# =========================
|
||||||
RUN npm config set unsafe-perm true
|
FROM node:16.20.2 AS build
|
||||||
RUN npm install -g ionic
|
|
||||||
RUN npm config set legacy-peer-deps true
|
|
||||||
RUN npm i -D typescript@4.3.5
|
|
||||||
RUN npm install --save --legacy-peer-deps
|
|
||||||
COPY ./ /app/
|
|
||||||
RUN ionic build --prod
|
|
||||||
|
|
||||||
FROM nginx:latest
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Avoid npm randomness
|
||||||
|
ENV NPM_CONFIG_LEGACY_PEER_DEPS=true
|
||||||
|
ENV NPM_CONFIG_AUDIT=false
|
||||||
|
ENV NPM_CONFIG_FUND=false
|
||||||
|
|
||||||
|
# Copy dependency files first (better caching)
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
# Clean install (IMPORTANT: single install only)
|
||||||
|
RUN npm cache clean --force
|
||||||
|
RUN npm install --legacy-peer-deps --no-audit --no-fund
|
||||||
|
|
||||||
|
# Copy full project
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Build Ionic Angular app
|
||||||
|
RUN npx ionic build --configuration production
|
||||||
|
|
||||||
|
|
||||||
|
# =========================
|
||||||
|
# PRODUCTION STAGE (NGINX)
|
||||||
|
# =========================
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
# Nginx config (optional but recommended for SPA routing)
|
||||||
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
|
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
# Clean default nginx files
|
||||||
RUN rm -rf /usr/share/nginx/html/*
|
RUN rm -rf /usr/share/nginx/html/*
|
||||||
COPY /www/ /usr/share/nginx/html/
|
|
||||||
|
# Copy build output from previous stage
|
||||||
|
COPY --from=build /app/www /usr/share/nginx/html
|
||||||
|
|
||||||
|
# Expose port
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
# Start nginx
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
Generated
-20
@@ -163,7 +163,6 @@
|
|||||||
"hammerjs": "^2.0.8",
|
"hammerjs": "^2.0.8",
|
||||||
"howler": "^2.2.3",
|
"howler": "^2.2.3",
|
||||||
"http-server": "^14.1.1",
|
"http-server": "^14.1.1",
|
||||||
"husky": "^8.0.3",
|
|
||||||
"ionic-angular": "^3.9.10",
|
"ionic-angular": "^3.9.10",
|
||||||
"ionic-image-loader": "^6.3.3",
|
"ionic-image-loader": "^6.3.3",
|
||||||
"ionic-image-loader-v5": "^1.0.2",
|
"ionic-image-loader-v5": "^1.0.2",
|
||||||
@@ -18633,20 +18632,6 @@
|
|||||||
"ms": "^2.0.0"
|
"ms": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/husky": {
|
|
||||||
"version": "8.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz",
|
|
||||||
"integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==",
|
|
||||||
"bin": {
|
|
||||||
"husky": "lib/bin.js"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/typicode"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/iconv-lite": {
|
"node_modules/iconv-lite": {
|
||||||
"version": "0.6.3",
|
"version": "0.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||||
@@ -58908,11 +58893,6 @@
|
|||||||
"ms": "^2.0.0"
|
"ms": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"husky": {
|
|
||||||
"version": "8.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz",
|
|
||||||
"integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg=="
|
|
||||||
},
|
|
||||||
"iconv-lite": {
|
"iconv-lite": {
|
||||||
"version": "0.6.3",
|
"version": "0.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||||
|
|||||||
@@ -182,7 +182,6 @@
|
|||||||
"hammerjs": "^2.0.8",
|
"hammerjs": "^2.0.8",
|
||||||
"howler": "^2.2.3",
|
"howler": "^2.2.3",
|
||||||
"http-server": "^14.1.1",
|
"http-server": "^14.1.1",
|
||||||
"husky": "^8.0.3",
|
|
||||||
"ionic-angular": "^3.9.10",
|
"ionic-angular": "^3.9.10",
|
||||||
"ionic-image-loader": "^6.3.3",
|
"ionic-image-loader": "^6.3.3",
|
||||||
"ionic-image-loader-v5": "^1.0.2",
|
"ionic-image-loader-v5": "^1.0.2",
|
||||||
|
|||||||
@@ -234,7 +234,7 @@
|
|||||||
|
|
||||||
<!-- most searched word-->
|
<!-- most searched word-->
|
||||||
<div class="most-searched-words d-md-flex flex-md-column">
|
<div class="most-searched-words d-md-flex flex-md-column">
|
||||||
<p class="title ion-text-center">{{searchResult}}</p>
|
<p *ngIf="showDocuments == false" class="title ion-text-center">{{searchResult}}</p>
|
||||||
<div class="most-searched-word-container height-100 overflow-y-auto">
|
<div class="most-searched-word-container height-100 overflow-y-auto">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -520,7 +520,7 @@ export class SearchPage implements OnInit {
|
|||||||
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
|
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
|
||||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
if (!res.Categories.length) {
|
||||||
this.searchResult = "Não encontramos o que procura";
|
this.searchResult = "Não encontramos o que procura";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -569,7 +569,7 @@ export class SearchPage implements OnInit {
|
|||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
|
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
|
||||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '361').subscribe(res => {
|
, this.searchOrganicEntiryCode, this.searchDocTypeId, '361').subscribe(res => {
|
||||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
if (!res.Categories.length) {
|
||||||
this.searchResult = "Não encontramos o que procura";
|
this.searchResult = "Não encontramos o que procura";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -622,7 +622,7 @@ export class SearchPage implements OnInit {
|
|||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
this.search.basicSearch(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
|
this.search.basicSearch(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
|
||||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
||||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
if (!res.Categories.length) {
|
||||||
this.searchResult = "Não encontramos o que procura";
|
this.searchResult = "Não encontramos o que procura";
|
||||||
}
|
}
|
||||||
res.Categories.forEach(e => {
|
res.Categories.forEach(e => {
|
||||||
@@ -671,7 +671,7 @@ export class SearchPage implements OnInit {
|
|||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
|
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
|
||||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '361').subscribe(res => {
|
, this.searchOrganicEntiryCode, this.searchDocTypeId, '361').subscribe(res => {
|
||||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
if (!res.Categories.length) {
|
||||||
this.searchResult = "Não encontramos o que procura";
|
this.searchResult = "Não encontramos o que procura";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -733,7 +733,7 @@ export class SearchPage implements OnInit {
|
|||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
|
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
|
||||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
||||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
if (!res.Categories.length) {
|
||||||
this.searchResult = "Não encontramos o que procura";
|
this.searchResult = "Não encontramos o que procura";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -780,7 +780,7 @@ export class SearchPage implements OnInit {
|
|||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
this.search.basicSearch(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
|
this.search.basicSearch(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
|
||||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
||||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
if (!res.Categories.length) {
|
||||||
this.searchResult = "Não encontramos o que procura";
|
this.searchResult = "Não encontramos o que procura";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -885,7 +885,7 @@ export class SearchPage implements OnInit {
|
|||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
this.search.basicSearchPublication(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
|
this.search.basicSearchPublication(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
|
||||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '386').subscribe(res => {
|
, this.searchOrganicEntiryCode, this.searchDocTypeId, '386').subscribe(res => {
|
||||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
if (!res.Categories.length) {
|
||||||
this.searchResult = "Não encontramos o que procura";
|
this.searchResult = "Não encontramos o que procura";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,19 @@ export class NewGroupPage implements OnInit{
|
|||||||
this.showDuration = event.detail.checked;
|
this.showDuration = event.detail.checked;
|
||||||
|
|
||||||
if(event.detail.checked) {
|
if(event.detail.checked) {
|
||||||
this.expirationDate = null;
|
// ✅ Set default 1 hour duration
|
||||||
|
const now = new Date();
|
||||||
|
this.expirationDate = new Date(
|
||||||
|
now.getFullYear(),
|
||||||
|
now.getMonth(),
|
||||||
|
now.getDate(),
|
||||||
|
now.getHours() + 1, // +1 hour
|
||||||
|
now.getMinutes(),
|
||||||
|
now.getSeconds(),
|
||||||
|
now.getMilliseconds()
|
||||||
|
);
|
||||||
|
|
||||||
|
this.displayDuration = this.formatDuration(0, 1, 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.expirationDate = null;
|
this.expirationDate = null;
|
||||||
@@ -348,4 +360,29 @@ export class NewGroupPage implements OnInit{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
formatDuration(days: number, hours: number, minutes: number): string {
|
||||||
|
if (days > 0) {
|
||||||
|
if (days === 1) {
|
||||||
|
if (hours === 1) {
|
||||||
|
return `${days} day ${hours} hora ${minutes} minutos`;
|
||||||
|
} else {
|
||||||
|
return `${days} day ${hours} horas ${minutes} minutos`;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (hours === 1) {
|
||||||
|
return `${days} days ${hours} hora ${minutes} minutos`;
|
||||||
|
} else {
|
||||||
|
return `${days} days ${hours} horas ${minutes} minutos`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (hours === 1) {
|
||||||
|
return `${hours} hora ${minutes} minutos`;
|
||||||
|
} else {
|
||||||
|
return `${hours} horas ${minutes} minutos`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user