feat: Update Docker Compose configuration for API service with registry image, environment variables, and resource limits
Deploy api-controle-saida-loja / build-and-push-deploy (push) Successful in 25s
Details
Deploy api-controle-saida-loja / build-and-push-deploy (push) Successful in 25s
Details
This commit is contained in:
parent
998f290b85
commit
da106e6695
|
|
@ -2,25 +2,18 @@ version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
api:
|
api:
|
||||||
build:
|
# No Swarm, a imagem já deve estar no registry (10.1.1.124:8082)
|
||||||
context: .
|
image: 10.1.1.124:8082/library/controle-saida-loja-api:latest
|
||||||
dockerfile: Dockerfile
|
|
||||||
target: production
|
|
||||||
image: api-controle-saida-loja:latest
|
|
||||||
container_name: api-controle-saida-loja
|
|
||||||
restart: unless-stopped
|
|
||||||
ports:
|
ports:
|
||||||
- "3001:3001"
|
- "3001:3001"
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
PORT: 3001
|
PORT: 3001
|
||||||
|
ORACLE_USER: SEVEN
|
||||||
ORACLE_USER: ${ORACLE_USER}
|
ORACLE_PASSWORD: usr54sev
|
||||||
ORACLE_PASSWORD: ${ORACLE_PASSWORD}
|
ORACLE_CONNECTION_STRING: 10.1.1.241:1521/WINT
|
||||||
ORACLE_CONNECTION_STRING: ${ORACLE_CONNECTION_STRING}
|
|
||||||
ORACLE_LIB_DIR: /opt/oracle/instantclient
|
ORACLE_LIB_DIR: /opt/oracle/instantclient
|
||||||
|
JWT_SECRET: 'Jurunense@Athentic@User'
|
||||||
JWT_SECRET: ${JWT_SECRET}
|
|
||||||
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
|
@ -33,13 +26,17 @@ services:
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
mode: replicated
|
||||||
|
replicas: 4
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpus: '1'
|
cpus: '0.30'
|
||||||
memory: 512M
|
memory: 512M
|
||||||
reservations:
|
reservations:
|
||||||
cpus: '0.5'
|
cpus: '0.10'
|
||||||
memory: 256M
|
memory: 128M
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
driver: "json-file"
|
driver: "json-file"
|
||||||
|
|
@ -52,4 +49,4 @@ services:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
api-network:
|
api-network:
|
||||||
driver: bridge
|
driver: overlay
|
||||||
|
|
@ -23,7 +23,7 @@ async function bootstrap() {
|
||||||
// Configuração do Swagger
|
// Configuração do Swagger
|
||||||
const config = new DocumentBuilder()
|
const config = new DocumentBuilder()
|
||||||
.setTitle('Controle Saída Loja API')
|
.setTitle('Controle Saída Loja API')
|
||||||
.setDescription('API para controle de saída de loja com autenticação JWT')
|
.setDescription('API para controle de saída de loja com autenticação JWTWWWWWWWW')
|
||||||
.setVersion('1.0')
|
.setVersion('1.0')
|
||||||
.addTag('auth', 'Endpoints de autenticação')
|
.addTag('auth', 'Endpoints de autenticação')
|
||||||
.addTag('user', 'Endpoints de usuário')
|
.addTag('user', 'Endpoints de usuário')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue