52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
api:
|
|
# No Swarm, a imagem já deve estar no registry (10.1.1.124:8082)
|
|
image: 10.1.1.124:8082/library/controle-saida-loja-api:latest
|
|
ports:
|
|
- "3001:3001"
|
|
environment:
|
|
NODE_ENV: production
|
|
PORT: 3001
|
|
ORACLE_USER: SEVEN
|
|
ORACLE_PASSWORD: usr54sev
|
|
ORACLE_CONNECTION_STRING: 10.1.1.241:1521/WINT
|
|
ORACLE_LIB_DIR: /opt/oracle/instantclient
|
|
JWT_SECRET: 'Jurunense@Athentic@User'
|
|
|
|
env_file:
|
|
- .env
|
|
|
|
healthcheck:
|
|
test: [ "CMD", "node", "-e", "require('http').get('http://localhost:3001/', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})" ]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 4
|
|
restart_policy:
|
|
condition: on-failure
|
|
resources:
|
|
limits:
|
|
cpus: '0.30'
|
|
memory: 512M
|
|
reservations:
|
|
cpus: '0.10'
|
|
memory: 128M
|
|
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
networks:
|
|
- api-network
|
|
|
|
networks:
|
|
api-network:
|
|
driver: overlay |