Skip to content

Commit

Permalink
skiped pre-commit errors, removed setup files, added docker
Browse files Browse the repository at this point in the history
  • Loading branch information
davidvaldez89d committed Oct 12, 2023

Verified

This commit was signed with the committer’s verified signature.
sechkova Teodora Sechkova
1 parent d7ec794 commit 15b1d30
Showing 4 changed files with 43 additions and 6 deletions.
4 changes: 4 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM prefecthq/prefect:2.10.17-python3.11

COPY ./requirements.txt ./requirements.txt
RUN pip install -r requirements.txt
26 changes: 26 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: "3.1"

services:
data-db:
image: postgres:15.2-alpine
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=pass123
- POSTGRES_DB=data
expose:
- 5432

server:
build:
context: .
dockerfile: ./Dockerfile
restart: always
entrypoint: ["/opt/prefect/entrypoint.sh", "prefect", "server", "start"]
environment:
- PREFECT_UI_URL=http://127.0.0.0:4200/api
- PREFECT_API_URL=http://127.0.0.1:4200/api
- PREFECT_SERVER_API_HOST=0.0.0.0
- PREFECT_API_DATABASE_CONNECTION_URL=sqlite+aiosqlite:////opt/prefect/prefect.db
ports:
- 4200:4200
3 changes: 3 additions & 0 deletions docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dbt-postgres==1.6.5
prefect
prefect-dbt-flow
16 changes: 10 additions & 6 deletions prefect_dbt_flow/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
"""Prefect dbt flow initialization"""
# isort: skip_file
# ruff: noqa: F401
# fmt: off
from prefect_dbt_flow.dbt import (
DbtDagOptions,
DbtNode,
DbtProfile,
DbtProject,
) # ruff: skip
from prefect_dbt_flow.flow import dbt_flow # noqa: F401
DbtDagOptions,
DbtNode,
DbtProfile,
DbtProject
)
from prefect_dbt_flow.flow import dbt_flow
# fmt: on

0 comments on commit 15b1d30

Please sign in to comment.