I'm using the following Docker-compose.yaml file :
version: "3"
services:
myApp:
container_name: employeeApp
build:
context: ./emp
dockerfile: ./Dockerfile
ports:
- "4444:4444"
# PostgreSQL
postgres_svc:
container_name: PSQL
image: postgres
environment:
POSTGRES_USER: postgres_user
POSTGRES_PASSWORD: postgres_pass
POSTGRES_DB: EMP_DB
POSTGRES_HOST: postgres://postgres_user:[email protected]:5432/EMP_DB
ports:
- "5432:5432"
However when I make my SQL calls from inside the employeeApp
container , the commands are happening locally , and NOT in the cloud URL postgres://postgres:[email protected]:5432/EMP_DB
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…