mirror of
https://github.com/Dokploy/templates.git
synced 2026-07-08 15:35:24 +02:00
feat: add Prefect template (#930)
* feat: add Prefect template * fix: tighten Prefect template routing --------- Co-authored-by: Rohit Mulani <289630555+rohitmulani63-ops@users.noreply.github.com> Co-authored-by: Mauricio Siu <siumauricio@icloud.com>
This commit is contained in:
90
blueprints/prefect/docker-compose.yml
Normal file
90
blueprints/prefect/docker-compose.yml
Normal file
@@ -0,0 +1,90 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
prefect:
|
||||
image: prefecthq/prefect:3.7.5-python3.12
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
prefect-postgres:
|
||||
condition: service_healthy
|
||||
prefect-redis:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- PREFECT_API_DATABASE_CONNECTION_URL=postgresql+asyncpg://prefect:${POSTGRES_PASSWORD}@prefect-postgres:5432/prefect
|
||||
- PREFECT_SERVER_API_HOST=0.0.0.0
|
||||
- PREFECT_SERVER_UI_API_URL=https://${PREFECT_DOMAIN}/api
|
||||
- PREFECT_MESSAGING_BROKER=prefect_redis.messaging
|
||||
- PREFECT_MESSAGING_CACHE=prefect_redis.messaging
|
||||
- PREFECT_REDIS_MESSAGING_HOST=prefect-redis
|
||||
- PREFECT_REDIS_MESSAGING_PORT=6379
|
||||
- PREFECT_REDIS_MESSAGING_DB=0
|
||||
command: prefect server start --no-services
|
||||
expose:
|
||||
- 4200
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"python",
|
||||
"-c",
|
||||
"import urllib.request as u; u.urlopen('http://localhost:4200/api/health', timeout=1)",
|
||||
]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
|
||||
prefect-services:
|
||||
image: prefecthq/prefect:3.7.5-python3.12
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
prefect:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- PREFECT_API_DATABASE_CONNECTION_URL=postgresql+asyncpg://prefect:${POSTGRES_PASSWORD}@prefect-postgres:5432/prefect
|
||||
- PREFECT_MESSAGING_BROKER=prefect_redis.messaging
|
||||
- PREFECT_MESSAGING_CACHE=prefect_redis.messaging
|
||||
- PREFECT_REDIS_MESSAGING_HOST=prefect-redis
|
||||
- PREFECT_REDIS_MESSAGING_PORT=6379
|
||||
- PREFECT_REDIS_MESSAGING_DB=0
|
||||
command: prefect server services start
|
||||
|
||||
prefect-worker:
|
||||
image: prefecthq/prefect:3.7.5-python3.12
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
prefect:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- PREFECT_API_URL=http://prefect:4200/api
|
||||
command: prefect worker start --pool local-pool
|
||||
|
||||
prefect-postgres:
|
||||
image: postgres:14-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- POSTGRES_USER=prefect
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_DB=prefect
|
||||
volumes:
|
||||
- prefect-postgres-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U prefect -d prefect"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
prefect-redis:
|
||||
image: redis:7.2-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- prefect-redis-data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
prefect-postgres-data:
|
||||
prefect-redis-data:
|
||||
7
blueprints/prefect/prefect.svg
Normal file
7
blueprints/prefect/prefect.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" role="img" aria-labelledby="title desc">
|
||||
<title id="title">Prefect</title>
|
||||
<desc id="desc">Prefect template icon</desc>
|
||||
<rect width="256" height="256" rx="56" fill="#070f2b"/>
|
||||
<path d="M64 61h74c32 0 56 22 56 52s-24 53-56 53H98v45H64V61Zm34 31v43h36c15 0 25-9 25-22s-10-21-25-21H98Z" fill="#3d73ff"/>
|
||||
<path d="M101 135h37c15 0 25-9 25-22 0-6-2-11-6-15 17 6 28 21 28 40 0 26-21 46-51 46h-33v-49Z" fill="#16d6ff" opacity="0.88"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 507 B |
15
blueprints/prefect/template.toml
Normal file
15
blueprints/prefect/template.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
[variables]
|
||||
main_domain = "${domain}"
|
||||
postgres_password = "${password:32}"
|
||||
|
||||
[config]
|
||||
env = [
|
||||
"PREFECT_DOMAIN=${main_domain}",
|
||||
"POSTGRES_PASSWORD=${postgres_password}",
|
||||
]
|
||||
mounts = []
|
||||
|
||||
[[config.domains]]
|
||||
serviceName = "prefect"
|
||||
port = 4200
|
||||
host = "${main_domain}"
|
||||
17
meta.json
17
meta.json
@@ -5689,6 +5689,23 @@
|
||||
],
|
||||
"dokploy_version": "<0.22.5"
|
||||
},
|
||||
{
|
||||
"id": "prefect",
|
||||
"name": "Prefect",
|
||||
"version": "3.7.5-python3.12",
|
||||
"description": "Prefect is an open-source workflow orchestration platform for building, scheduling, monitoring, and managing data pipelines and Python workflows.",
|
||||
"logo": "prefect.svg",
|
||||
"links": {
|
||||
"github": "https://github.com/PrefectHQ/prefect",
|
||||
"website": "https://www.prefect.io/",
|
||||
"docs": "https://docs.prefect.io/"
|
||||
},
|
||||
"tags": [
|
||||
"automation",
|
||||
"workflow",
|
||||
"data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "privatebin",
|
||||
"name": "PrivateBin",
|
||||
|
||||
Reference in New Issue
Block a user