add
This commit is contained in:
22
Kestra/kestra-demo-1/config/config.yaml
Normal file
22
Kestra/kestra-demo-1/config/config.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
datasources:
|
||||
postgres:
|
||||
url: jdbc:postgresql://postgres-demo-1:5432/kestra
|
||||
driverClassName: org.postgresql.Driver
|
||||
username: kestra
|
||||
password: k3str4
|
||||
kestra:
|
||||
server:
|
||||
basic-auth:
|
||||
enabled: false
|
||||
repository:
|
||||
type: postgres
|
||||
storage:
|
||||
type: local
|
||||
local:
|
||||
base-path: "/app/storage"
|
||||
queue:
|
||||
type: postgres
|
||||
tasks:
|
||||
tmp-dir:
|
||||
path: /tmp/kestra-wd/tmp
|
||||
url: http://localhost:8080/
|
48
Kestra/kestra-demo-1/docker-compose.yaml
Normal file
48
Kestra/kestra-demo-1/docker-compose.yaml
Normal file
@ -0,0 +1,48 @@
|
||||
networks:
|
||||
frontend:
|
||||
external: true
|
||||
volumes:
|
||||
kestra-data:
|
||||
driver: local
|
||||
postgres-data:
|
||||
driver: local
|
||||
services:
|
||||
postgres:
|
||||
image: postgres
|
||||
container_name: postgres-demo-1
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
restart: unless-stopped
|
||||
kestra:
|
||||
image: kestra/kestra:latest-full
|
||||
container_name: kestra-demo-1
|
||||
pull_policy: always
|
||||
entrypoint: /bin/bash
|
||||
user: "root"
|
||||
command:
|
||||
- -c
|
||||
- /app/kestra server standalone --worker-thread=128 -c config.yaml
|
||||
volumes:
|
||||
- kestra-data:/app/storage
|
||||
- ./config/config.yaml:/app/config.yaml:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /tmp/kestra-wd:/tmp/kestra-wd
|
||||
environment:
|
||||
- KESTRA_DOCKERHUB_USERNAME=${KESTRA_DOCKERHUB_USERNAME}
|
||||
- KESTRA_DOCKERHUB_PASSWORD=${KESTRA_DOCKERHUB_PASSWORD}
|
||||
ports:
|
||||
- 8280:8080
|
||||
- 8281:8081
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_started
|
21
Kestra/pipelines/demo/build-docker-1.yaml
Normal file
21
Kestra/pipelines/demo/build-docker-1.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
id: build-docker-1
|
||||
namespace: demo
|
||||
|
||||
tasks:
|
||||
- id: git
|
||||
type: io.kestra.core.tasks.flows.WorkingDirectory
|
||||
tasks:
|
||||
- id: clone
|
||||
type: io.kestra.plugin.git.Clone
|
||||
url: https://github.com/christianlempa/hackbox
|
||||
branch: main
|
||||
|
||||
- id: build
|
||||
type: io.kestra.plugin.docker.Build
|
||||
dockerfile: "src/Dockerfile"
|
||||
tags:
|
||||
- registry.hub.docker.com/xcad2k/hackbox-test:latest
|
||||
push: true
|
||||
credentials:
|
||||
username: "{{ envs.dockerhub_username }}"
|
||||
password: "{{ envs.dockerhub_password }}"
|
30
Kestra/pipelines/demo/build-docker-2.yaml
Normal file
30
Kestra/pipelines/demo/build-docker-2.yaml
Normal file
@ -0,0 +1,30 @@
|
||||
id: build-docker-2
|
||||
namespace: demo
|
||||
|
||||
tasks:
|
||||
- id: directory
|
||||
type: io.kestra.core.tasks.flows.WorkingDirectory
|
||||
tasks:
|
||||
- id: createFiles
|
||||
type: io.kestra.core.tasks.storages.LocalFiles
|
||||
inputs:
|
||||
Dockerfile: |
|
||||
FROM alpine:latest
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN apk add --update python3
|
||||
CMD [ "python", "main.py"]
|
||||
main.py: |
|
||||
if __name__ == "__main__":
|
||||
print("Hello from Docker!")
|
||||
exit(0)
|
||||
|
||||
- id: build
|
||||
type: io.kestra.plugin.docker.Build
|
||||
dockerfile: "Dockerfile"
|
||||
tags:
|
||||
- registry.hub.docker.com/xcad2k/hello-docker:latest
|
||||
push: true
|
||||
credentials:
|
||||
username: "{{ envs.dockerhub_username }}"
|
||||
password: "{{ envs.dockerhub_password }}"
|
Reference in New Issue
Block a user