Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kestra #1313

Merged
merged 1 commit into from
Mar 3, 2025
Merged
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
61 changes: 12 additions & 49 deletions apps/kestra/.env
Original file line number Diff line number Diff line change
@@ -1,53 +1,16 @@
W9_REPO="wordpress"
W9_DIST=community
W9_VERSION="latest"

W9_POWER_PASSWORD="1PrMxExC45LsCT"

# Environments which for user settings when create application
# Named expression: W9_xxx_xxx_SET, xxx refer to file fields
W9_HTTP_PORT_SET=9001
# W9_HTTPS_PORT_SET=9002
# W9_DB_PORT_SET=3306
# W9_SSH_PORT_SET=23
W9_KEY_SET="dfsjdkjf77xjxcjcj"

#### -- Not allowed to edit below environments when recreate app based on existing data -- ####

W9_ID=kestra

# W9_HTTP_PORT or W9_HTTPS_PORT is need at leaset and used for proxy for web application
# Some container (e.g teleport) need HTTPS access, then need to set this pra
W9_HTTP_PORT=80
W9_HTTPS_PORT=81

W9_LOGIN_USER=admin
# use https://1password.com/zh-cn/password-generator/ to genarate 14 bit password
# this password can also use password file
W9_LOGIN_PASSWORD=$W9_POWER_PASSWORD
W9_ADMIN_PATH="/wp-login"

W9_REPO="kestra/kestra"
W9_DIST='community'
W9_VERSION='latest'
W9_POWER_PASSWORD='t4cd0S#PGKN5ivQ2'
W9_HTTP_PORT_SET='9001'
W9_HTTP_PORT=8080
W9_ID='kestra'
# Container name's suffix must use one of the value
W9_DB_EXPOSE="mysql,postgresql,mariadb,mongodb,redis"

# It is used when the application APP needs to set an external URL, which can be IP(or domain), IP:PORT
# If have protocols, should be set it in the APP's ENV
W9_URL=internet_ip:$W9_HTTP_PORT_SET
# modifies W9_URL on init when it is true
W9_URL_REPLACE=true

W9_DB_EXPOSE="postgresql"
W9_DB_VERSION="latest"
[email protected]
W9_LOGIN_PASSWORD=$W9_POWER_PASSWORD
W9_URL='internet_ip:$W9_HTTP_PORT_SET'
W9_NETWORK=websoft9

#### ----------------------------------------------------------------------------------------- ####


# Below environment is created by this app

WORDPRESS_DB_HOST=$W9_ID-mariadb
WORDPRESS_DB_USER=wordpress #if use postgresql, it need set to postgres
WORDPRESS_DB_PASSWORD=$W9_POWER_PASSWORD
WORDPRESS_DB_NAME=wordpress


#W9_NAME=""
#W9_RCODE=""
21 changes: 0 additions & 21 deletions apps/kestra/Dockerfile

This file was deleted.

26 changes: 0 additions & 26 deletions apps/kestra/README.jinja2

This file was deleted.

96 changes: 61 additions & 35 deletions apps/kestra/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,74 @@
# image,docs: https://hub.docker.com/_/wordpress/
# image: https://hub.docker.com/r/kestra/kestra
# compose: https://github.com/kestra-io/kestra/blob/develop/docker-compose.yml
# docs: https://kestra.io/docs/getting-started

services:

wordpress:
image: $W9_REPO:$W9_VERSION
container_name: $W9_ID
postgres:
image: postgres:$W9_DB_VERSION
container_name: ${W9_ID}-postgresql
restart: unless-stopped
#This is for access host from container
# extra_hosts: ["host.docker.internal:host-gateway"]
# command: |
# /bin/bash -c "ping -c 3 host.docker.internal"
logging:
driver: "json-file"
options:
max-file: "5"
max-size: 10m
deploy:
resources:
limits:
memory: 5g
cpus: '0.7'
ports:
- $W9_HTTP_PORT_SET:80
env_file: .env
volumes:
- wordpress:/var/www/html
- ./src/php_exra.ini:/usr/local/etc/php/conf.d/php_exra.ini
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: kestra
POSTGRES_USER: kestra
POSTGRES_PASSWORD: $W9_POWER_PASSWORD
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 30s
timeout: 10s
retries: 10

mariadb:
image: mariadb:10.4
container_name: $W9_ID-mariadb
kestra:
image: ${W9_REPO}:${W9_VERSION}
env_file: .env
restart: unless-stopped
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb_log_buffer_size=30M
container_name: ${W9_ID}
# Note that this setup with a root user is intended for development purpose.
# Our base image runs without root, but the Docker Compose implementation needs root to access the Docker socket
# To run Kestra in a rootless mode in production, see: https://kestra.io/docs/installation/podman-compose
user: "root"
command: server standalone
volumes:
- mysql_data:/var/lib/mysql
- kestra-data:/app/storage
- /var/run/docker.sock:/var/run/docker.sock
- /tmp/kestra-wd:/tmp/kestra-wd
environment:
MYSQL_DATABASE: $WORDPRESS_DB_NAME
MYSQL_USER: $WORDPRESS_DB_USER
MYSQL_PASSWORD: $W9_POWER_PASSWORD
MYSQL_ROOT_PASSWORD: $W9_POWER_PASSWORD
KESTRA_CONFIGURATION: |
datasources:
postgres:
url: jdbc:postgresql://${W9_ID}-postgresql:5432/kestra
driverClassName: org.postgresql.Driver
username: kestra
password: $W9_POWER_PASSWORD
kestra:
server:
basicAuth:
enabled: true
username: "[email protected]" # it must be a valid email address
password: $W9_POWER_PASSWORD
repository:
type: postgres
storage:
type: local
local:
basePath: "/app/storage"
queue:
type: postgres
tasks:
tmpDir:
path: /tmp/kestra-wd/tmp
url: http://localhost:8080/
ports:
- "${W9_HTTP_PORT_SET}:8080"
#- "8081:8081"
depends_on:
postgres:
condition: service_started

volumes:
wordpress:
mysql_data:
postgres-data:
kestra-data:

networks:
default:
Expand Down
57 changes: 0 additions & 57 deletions apps/kestra/src/nginx-proxy.conf.template

This file was deleted.

8 changes: 0 additions & 8 deletions apps/kestra/src/php_exra.ini

This file was deleted.