When i try to run the container with:
docker compose up
All my script files run fine, but the installation of pandas module was not going well. The interpreter raises an error specifying that pandas module was not found, but, i already created a file “requirements.txt” with pandas line in there, and that’s my docker-compose.yaml file:
Then my scrip run and is not waiting till the databases services start first.
version: '2'
services:
source_db:
image: postgres
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
networks:
- etl_network
ports:
- 5555:5554
destination_db:
image: postgres
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
networks:
- etl_network
ports:
- 5556:5554
elt_script:
build:
context: ./scripts
dockerfile: Dockerfile
command: ["python", "elt_script.py"]
networks:
- etl_network
restart: on-failure
depends_on:
- source_db
- destination_db
networks:
etl_network:
driver: bridge
I tried everything i know
1