Skip to content

Commit a0834bc

Browse files
authored
Merge pull request #37 from flavienbwk/develop
#33 : Prefect 2.4.2 configuration
2 parents f6e6222 + 73b0c78 commit a0834bc

File tree

8 files changed

+13
-15
lines changed

8 files changed

+13
-15
lines changed

README.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Prefect - Docker Compose
22

3-
A simple guide to understand and make Prefect 2.x work with your own docker-compose configuration.
3+
A simple guide to understand and make Prefect **2.x** work with your own docker-compose configuration.
4+
5+
Interested about version **1.x** configuration ? Switch to the [last 1.x configuration branch](https://github.com/flavienbwk/prefect-docker-compose/tree/e758a498d5819550a9b926b0bf9bb4e9c85574d1).
46

57
This allows you to package your Prefect instance for fully-containerized environments (e.g: docker-compose, Kubernetes) or offline use.
68

@@ -18,8 +20,6 @@ This allows you to package your Prefect instance for fully-containerized environ
1820
- [Start the Docker in Docker agent](#start-the-docker-in-docker-agent)
1921
- [Registering the flow](#registering-the-flow)
2022

21-
Interested about version **1.x** configuration ? Switch to the [last 1.x configuration branch](https://github.com/flavienbwk/prefect-docker-compose/tree/e758a498d5819550a9b926b0bf9bb4e9c85574d1).
22-
2323
## Run the server
2424

2525
1. Optionally open and edit the [`server/.env`](./server/.env) file
@@ -92,8 +92,6 @@ This means the Prefect server never stores your code. It just orchestrates the r
9292

9393
### Flow with S3 Storage (recommended)
9494

95-
:warning: I don't recommend this method if you plan to schedule a lot of flows every minute. MinIO times out regurarly in that case (maybe AWS wouldn't).
96-
9795
<details>
9896
<summary>Tutorial for S3 Storage</summary>
9997
<br/>
@@ -175,13 +173,13 @@ We're going to push our Docker image with Python dependencies and register our f
175173
1. Build, tag and push the image
176174
177175
```bash
178-
docker build . -f ./client_docker/execution.Dockerfile -t 172.17.0.1:5000/weather/base_image
176+
docker build . -f ./client_docker/execution.Dockerfile -t 172.17.0.1:5000/weather/base_image:latest
179177
```
180178
181-
> You **must** prefix your image by the registry URI `172.17.0.1`
179+
> You **must** prefix your image with the registry URI `172.17.0.1:5000` to push it
182180
183181
```bash
184-
docker push 172.17.0.1:5000/weather/base_image
182+
docker push 172.17.0.1:5000/weather/base_image:latest
185183
```
186184
187185
2. Register the flow

agent/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
FROM python:3.10
22

33
RUN apt update && apt install uuid -y
4-
RUN pip install prefect==2.3.2 psycopg2-binary==2.9.3 s3fs==2022.8.2 minio==7.1.11
4+
RUN pip install prefect==2.4.2 psycopg2-binary==2.9.3 s3fs==2022.8.2 minio==7.1.11

agent_docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ ENV TZ="Europe/Paris"
44
USER root
55
RUN apk update && apk add build-base libffi-dev python3 python3-dev py3-pip gcc linux-headers musl-dev util-linux
66

7-
RUN pip3 install --upgrade pip && pip3 install prefect==2.3.2
7+
RUN pip3 install --upgrade pip && pip3 install prefect==2.4.2

client/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM python:3.10
22

33
RUN apt update && apt install uuid -y
4-
RUN pip install prefect==2.3.2
4+
RUN pip install prefect==2.4.2
55

66
WORKDIR /usr/app

client_docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ENV TZ="Europe/Paris"
44
USER root
55
RUN apk update && apk add build-base libffi-dev python3 python3-dev py3-pip gcc linux-headers musl-dev util-linux
66

7-
RUN pip3 install --upgrade pip && pip3 install prefect==2.3.2 docker==6.0.0
7+
RUN pip3 install --upgrade pip && pip3 install prefect==2.4.2 docker==6.0.0
88

99
COPY ./entrypoint.sh /entrypoint.sh
1010
ENTRYPOINT [ "sh", "/entrypoint.sh" ]

client_docker/execution.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
FROM python:3.10
22

33
RUN apt update && apt install uuid -y
4-
RUN pip install prefect==2.3.2
4+
RUN pip3 install --upgrade pip && pip3 install prefect==2.4.2

client_s3/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM python:3.10
22

33
RUN apt update && apt install uuid -y
4-
RUN pip install prefect==2.3.2 psycopg2-binary==2.9.3 s3fs==2022.8.2 minio==7.1.11
4+
RUN pip install prefect==2.4.2 psycopg2-binary==2.9.3 s3fs==2022.8.2 minio==7.1.11
55

66
WORKDIR /usr/app

server/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM prefecthq/prefect:2.3.2-python3.10
1+
FROM prefecthq/prefect:2.4.2-python3.10
22

33
RUN apt update && \
44
pip install psycopg2-binary==2.9.3 s3fs==2022.8.2

0 commit comments

Comments
 (0)