Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'

services:
source_postgres:
image: postgres:latest
image: postgres:16.2
ports:
- "5433:5432"
networks:
Expand All @@ -15,7 +15,7 @@ services:
- ./source_db_init/init.sql:/docker-entrypoint-initdb.d/init.sql

destination_postgres:
image: postgres:latest
image: postgres:16.2
ports:
- "5434:5432"
networks:
Expand Down
13 changes: 10 additions & 3 deletions elt_script/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
FROM python:3.8-slim

# Install PostgreSQL command-line tools
RUN apt-get update && apt-get install -y postgresql-client
# Install the dependencies for the PostgreSQL repository
RUN apt-get update && apt-get install -y wget gnupg

# Add the PostgreSQL repository to get the latest PostgreSQL client
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ $(. /etc/os-release; echo $VERSION_CODENAME)-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -

# Install PostgreSQL client version 16
RUN apt-get update && apt-get install -y postgresql-client-16

# Copy the ELT script
COPY elt_script.py .

# Set the default command to run the ELT script
CMD ["python", "elt_script.py"]
CMD ["python", "elt_script.py"]