We will be getting up Postgres and a simple script to run as containers using docker compose.
cd Search-Workshop1
docker-compose up
- Login to database container.
docker exec -it ws1_db sh
- Login to postgres
psql -U postgres
- Create a database
CREATE DATABASE student;
\q
- Dump student.sql file to student database
psql -U postgres -d student < sql_file/student.sql
- Login to script container.
docker exec -it wk1_script sh
- Run script:
python3 script.py