Compare commits
No commits in common. "217329adefd99b6639531079fe216f33e3ef9da2" and "2b914491375529f994c6f0f8332fe3c1c807f45d" have entirely different histories.
217329adef
...
2b91449137
|
|
@ -14,14 +14,17 @@ jobs:
|
||||||
|
|
||||||
- name: Build e Push
|
- name: Build e Push
|
||||||
run: |
|
run: |
|
||||||
TAG=${{ gitea.sha }}
|
# Usando o short SHA para uma tag mais limpa
|
||||||
docker build -t 10.1.1.124:8082/library/vendaweb-api:$TAG .
|
TAG=$(echo ${{ gitea.sha }} | cut -c1-7)
|
||||||
docker tag 10.1.1.124:8082/library/vendaweb-api:$TAG 10.1.1.124:8082/library/vendaweb-api:latest
|
IMAGE_NAME="10.1.1.124:8082/library/vendaweb-api"
|
||||||
|
|
||||||
docker push 10.1.1.124:8082/library/vendaweb-api:$TAG
|
docker build -t $IMAGE_NAME:$TAG .
|
||||||
docker push 10.1.1.124:8082/library/vendaweb-api:latest
|
docker tag $IMAGE_NAME:$TAG $IMAGE_NAME:latest
|
||||||
|
|
||||||
|
docker push $IMAGE_NAME:$TAG
|
||||||
|
docker push $IMAGE_NAME:latest
|
||||||
|
|
||||||
- name: Notificar Portainer via Webhook
|
- name: Notificar Portainer via Webhook
|
||||||
run: |
|
run: |
|
||||||
# O Webhook avisa o Portainer para puxar a nova imagem imediatamente
|
# O segredo PORTAINER_WEBHOOK_VENDAWEBAPI deve conter a URL completa gerada na Stack
|
||||||
curl -X POST "${{ secrets.PORTAINER_WEBHOOK_VENDAWEBAPI }}"
|
curl -f -X POST "${{ secrets.PORTAINER_WEBHOOK_VENDAWEBAPI }}"
|
||||||
|
|
@ -20,5 +20,5 @@ COPY --from=builder /app/dist ./dist
|
||||||
COPY --from=builder /app/package*.json ./
|
COPY --from=builder /app/package*.json ./
|
||||||
COPY --from=builder /app/node_modules ./node_modules
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
|
|
||||||
EXPOSE 8068
|
EXPOSE 8066
|
||||||
CMD ["npm", "run", "start:prod"]
|
CMD ["npm", "run", "start:prod"]
|
||||||
|
|
@ -4,15 +4,20 @@ services:
|
||||||
vendaweb-api:
|
vendaweb-api:
|
||||||
image: 10.1.1.124:8082/library/vendaweb-api:latest
|
image: 10.1.1.124:8082/library/vendaweb-api:latest
|
||||||
ports:
|
ports:
|
||||||
- "8068:8068"
|
- target: 8066
|
||||||
|
published: 8066
|
||||||
|
protocol: tcp
|
||||||
|
mode: host
|
||||||
networks:
|
networks:
|
||||||
- simplifique-network
|
- juru-network
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 4
|
replicas: 1
|
||||||
update_config:
|
update_config:
|
||||||
order: start-first
|
order: stop-first
|
||||||
parallelism: 1
|
parallelism: 1
|
||||||
|
failure_action: rollback
|
||||||
|
delay: 5s
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
simplifique-network:
|
juru-network:
|
||||||
external: true
|
external: true
|
||||||
|
|
@ -14,7 +14,7 @@ export class AppController {
|
||||||
@Get('health')
|
@Get('health')
|
||||||
@ApiOperation({ summary: 'Health check' })
|
@ApiOperation({ summary: 'Health check' })
|
||||||
healthCheck() {
|
healthCheck() {
|
||||||
return { status: ':Jurunense homecenter ' };
|
return { status: 'JURUNENSE HOME CENTER BR V2' };
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@ export const typeOrmConfig: TypeOrmModuleOptions = {
|
||||||
// username: "LIVIA",
|
// username: "LIVIA",
|
||||||
// password: "LIVIA",
|
// password: "LIVIA",
|
||||||
host: "10.1.1.241",
|
host: "10.1.1.241",
|
||||||
username: "teste",
|
username: "SEVEN",
|
||||||
password: "teste",
|
password: "USR54SEV",
|
||||||
// username: "API",
|
// username: "API",
|
||||||
// password: "E05H5KIEQV3YKDJR",
|
// password: "E05H5KIEQV3YKDJR",
|
||||||
port: 1521,
|
port: 1521,
|
||||||
sid: "BDTESTE",
|
sid: "WINT",
|
||||||
synchronize: false,
|
synchronize: false,
|
||||||
logging: false,
|
logging: false,
|
||||||
entities: [__dirname + '/../**/*.entity.{js,ts}'],
|
entities: [__dirname + '/../**/*.entity.{js,ts}'],
|
||||||
|
|
@ -22,10 +22,10 @@ export const typeOrmConfig: TypeOrmModuleOptions = {
|
||||||
export const connectionOptions: ConnectionOptions = {
|
export const connectionOptions: ConnectionOptions = {
|
||||||
type: "oracle",
|
type: "oracle",
|
||||||
host: "10.1.1.241",
|
host: "10.1.1.241",
|
||||||
username: "teste",
|
username: "SEVEN",
|
||||||
password: "teste",
|
password: "USR54SEV",
|
||||||
port: 1521,
|
port: 1521,
|
||||||
sid: "BDTESTE",
|
sid: "WINT",
|
||||||
synchronize: false,
|
synchronize: false,
|
||||||
logging: false,
|
logging: false,
|
||||||
entities: [__dirname + '/../**/*.entity.{js,ts}'],
|
entities: [__dirname + '/../**/*.entity.{js,ts}'],
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,6 @@ async function bootstrap() {
|
||||||
.build();
|
.build();
|
||||||
const document = SwaggerModule.createDocument(app, options);
|
const document = SwaggerModule.createDocument(app, options);
|
||||||
SwaggerModule.setup("docs", app, document);
|
SwaggerModule.setup("docs", app, document);
|
||||||
await app.listen(8068, '0.0.0.0');}
|
await app.listen(8066, '0.0.0.0');}
|
||||||
console.log('API rodando na porta 8066 test 3');
|
console.log('API rodando na porta 8066 test 4');
|
||||||
bootstrap();
|
bootstrap();
|
||||||
|
|
|
||||||
|
|
@ -1503,7 +1503,6 @@ export class SalesService {
|
||||||
|
|
||||||
async calculateDeliveryTaxOrder(dataDeliveryTax: any) {
|
async calculateDeliveryTaxOrder(dataDeliveryTax: any) {
|
||||||
let cityId = await this.customerService.findCity(dataDeliveryTax.ibgeCode);
|
let cityId = await this.customerService.findCity(dataDeliveryTax.ibgeCode);
|
||||||
|
|
||||||
await this.updatePriorityDelivery(dataDeliveryTax.cartId, dataDeliveryTax.priorityDelivery);
|
await this.updatePriorityDelivery(dataDeliveryTax.cartId, dataDeliveryTax.priorityDelivery);
|
||||||
|
|
||||||
if (cityId == 0) {
|
if (cityId == 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue