I have to do deploy of a software, I have WEB where FRONT , APISEG authentication and security of the software, API that makes all operations and the BANK with a sql server 2017 bank.
Every project was developed with angular and nodejs , the only problem is that APIS can not connect to the bank and return it to me. error connection is closed when I use the container, but when I upload the containers all start normally, if I upload the container without giving the command node app.js
and access it using docker exec -it id bash
, then run% within the container, everything works fine.
I'm new to docker and docker-compose so I guess I may have something wrong in my .yaml file .
I can make a node app.js
in every container normally.
version: "3"
services:
banco:
image: cont_banco
networks:
- rede
tty: true
depends_on:
- "api"
- "web"
deploy:
mode: global
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 30s
ports:
- 1433:1433
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=password
volumes:
- mssql-data:/var/opt/mssql
apiseg:
image: cont_apiseg
networks:
- rede
tty: true
depends_on:
- "api"
- "web"
deploy:
resources:
limits:
cpus: '1'
mode: global
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 30s
ports:
- 3001:3001
command: ["node", "app.js"]
api:
image: cont_api
networks:
- rede
tty: true
depends_on:
- "web"
deploy:
resources:
limits:
cpus: '1'
mode: global
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 30s
ports:
- 3002:3002
command: ["node", "app.js"]
web:
image: cont_web
networks:
- rede
tty: true
deploy:
resources:
limits:
cpus: '1'
mode: global
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 30s
ports:
- 3000:3000
networks:
rede:
driver: overlay
volumes:
mssql-data:
external: true