Compare commits

..

2 Commits

Author SHA1 Message Date
joelson 217329adef Merge branch 'main' of https://git.jurunense.com/joelson/vendaweb-api
Deploy NestJS API / build-and-push-deploy (push) Has been cancelled Details
2026-01-06 12:22:29 -03:00
joelson f55d0da72d refactor: update port mappings to 8068, enhance deployment configurations, and modify health check response 2026-01-06 12:20:43 -03:00
7 changed files with 23 additions and 30 deletions

View File

@ -14,17 +14,14 @@ jobs:
- name: Build e Push
run: |
# Usando o short SHA para uma tag mais limpa
TAG=$(echo ${{ gitea.sha }} | cut -c1-7)
IMAGE_NAME="10.1.1.124:8082/library/vendaweb-api"
TAG=${{ gitea.sha }}
docker build -t 10.1.1.124:8082/library/vendaweb-api:$TAG .
docker tag 10.1.1.124:8082/library/vendaweb-api:$TAG 10.1.1.124:8082/library/vendaweb-api:latest
docker build -t $IMAGE_NAME:$TAG .
docker tag $IMAGE_NAME:$TAG $IMAGE_NAME:latest
docker push $IMAGE_NAME:$TAG
docker push $IMAGE_NAME:latest
docker push 10.1.1.124:8082/library/vendaweb-api:$TAG
docker push 10.1.1.124:8082/library/vendaweb-api:latest
- name: Notificar Portainer via Webhook
run: |
# O segredo PORTAINER_WEBHOOK_VENDAWEBAPI deve conter a URL completa gerada na Stack
curl -f -X POST "${{ secrets.PORTAINER_WEBHOOK_VENDAWEBAPI }}"
# O Webhook avisa o Portainer para puxar a nova imagem imediatamente
curl -X POST "${{ secrets.PORTAINER_WEBHOOK_VENDAWEBAPI }}"

View File

@ -20,5 +20,5 @@ COPY --from=builder /app/dist ./dist
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/node_modules ./node_modules
EXPOSE 8066
EXPOSE 8068
CMD ["npm", "run", "start:prod"]

View File

@ -4,20 +4,15 @@ services:
vendaweb-api:
image: 10.1.1.124:8082/library/vendaweb-api:latest
ports:
- target: 8066
published: 8066
protocol: tcp
mode: host
- "8068:8068"
networks:
- juru-network
- simplifique-network
deploy:
replicas: 1
replicas: 4
update_config:
order: stop-first
order: start-first
parallelism: 1
failure_action: rollback
delay: 5s
networks:
juru-network:
simplifique-network:
external: true

View File

@ -14,7 +14,7 @@ export class AppController {
@Get('health')
@ApiOperation({ summary: 'Health check' })
healthCheck() {
return { status: 'JURUNENSE HOME CENTER BR V2' };
return { status: ':Jurunense homecenter ' };
}
}

View File

@ -7,12 +7,12 @@ export const typeOrmConfig: TypeOrmModuleOptions = {
// username: "LIVIA",
// password: "LIVIA",
host: "10.1.1.241",
username: "SEVEN",
password: "USR54SEV",
username: "teste",
password: "teste",
// username: "API",
// password: "E05H5KIEQV3YKDJR",
port: 1521,
sid: "WINT",
sid: "BDTESTE",
synchronize: false,
logging: false,
entities: [__dirname + '/../**/*.entity.{js,ts}'],
@ -22,10 +22,10 @@ export const typeOrmConfig: TypeOrmModuleOptions = {
export const connectionOptions: ConnectionOptions = {
type: "oracle",
host: "10.1.1.241",
username: "SEVEN",
password: "USR54SEV",
username: "teste",
password: "teste",
port: 1521,
sid: "WINT",
sid: "BDTESTE",
synchronize: false,
logging: false,
entities: [__dirname + '/../**/*.entity.{js,ts}'],

View File

@ -20,6 +20,6 @@ async function bootstrap() {
.build();
const document = SwaggerModule.createDocument(app, options);
SwaggerModule.setup("docs", app, document);
await app.listen(8066, '0.0.0.0');}
console.log('API rodando na porta 8066 test 4');
await app.listen(8068, '0.0.0.0');}
console.log('API rodando na porta 8066 test 3');
bootstrap();

View File

@ -1503,6 +1503,7 @@ export class SalesService {
async calculateDeliveryTaxOrder(dataDeliveryTax: any) {
let cityId = await this.customerService.findCity(dataDeliveryTax.ibgeCode);
await this.updatePriorityDelivery(dataDeliveryTax.cartId, dataDeliveryTax.priorityDelivery);
if (cityId == 0) {