Обновить jeyerp-develop.yaml

This commit is contained in:
ali 2026-01-09 10:54:44 +00:00
parent 00f1f96d83
commit 8c2999e68a
1 changed files with 33 additions and 27 deletions

View File

@ -160,33 +160,33 @@ source:
wWTjkCHWgn4eQB2592RhhkLJIFmQxT+MWdw1lxUljD7rxI25lJ9sa4faGLI7Dhsv wWTjkCHWgn4eQB2592RhhkLJIFmQxT+MWdw1lxUljD7rxI25lJ9sa4faGLI7Dhsv
bcgRRcklNr8mTzJH bcgRRcklNr8mTzJH
=ckew =ckew
-----END PGP PUBLIC KEY BLOCK----- -----END PGP PUBLIC KEY BLOCK-----
targets: targets:
lxc: lxc:
create_message: | create_message: |
You just created an {{ image.description }} container. You just created an {{ image.description }} container.
config: config:
- type: all - type: all
before: 5 before: 5
content: |- content: |-
lxc.include = LXC_TEMPLATE_CONFIG/alpine.common.conf lxc.include = LXC_TEMPLATE_CONFIG/alpine.common.conf
- type: user - type: user
before: 5 before: 5
content: |- content: |-
lxc.include = LXC_TEMPLATE_CONFIG/alpine.userns.conf lxc.include = LXC_TEMPLATE_CONFIG/alpine.userns.conf
- type: all - type: all
after: 4 after: 4
content: |- content: |-
lxc.include = LXC_TEMPLATE_CONFIG/common.conf lxc.include = LXC_TEMPLATE_CONFIG/common.conf
- type: user - type: user
after: 4 after: 4
content: |- content: |-
lxc.include = LXC_TEMPLATE_CONFIG/userns.conf lxc.include = LXC_TEMPLATE_CONFIG/userns.conf
- type: all - type: all
content: |- content: |-
lxc.arch = {{ image.architecture_personality }} lxc.arch = {{ image.architecture_personality }}
incus: incus:
vm: vm:
filesystem: ext4 filesystem: ext4
@ -223,7 +223,7 @@ files:
GRUB_TERMINAL=console GRUB_TERMINAL=console
# Disable os-prober # Disable os-prober
GRUB_DISABLE_OS_PROBER=true GRUB_DISABLE_OS_PROBER=true
types: types:
- vm - vm
@ -232,7 +232,7 @@ files:
content: |- content: |-
auto eth0 auto eth0
iface eth0 inet dhcp iface eth0 inet dhcp
hostname $(hostname) hostname $(hostname)
- path: /etc/inittab - path: /etc/inittab
generator: dump generator: dump
@ -253,7 +253,7 @@ files:
::ctrlaltdel:/sbin/reboot ::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting # Stuff to do before rebooting
::shutdown:/sbin/openrc shutdown ::shutdown:/sbin/openrc shutdown
- path: /etc/inittab - path: /etc/inittab
generator: template generator: template
@ -271,7 +271,7 @@ files:
::ctrlaltdel:/sbin/reboot ::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting # Stuff to do before rebooting
::shutdown:/sbin/openrc shutdown ::shutdown:/sbin/openrc shutdown
- name: meta-data - name: meta-data
generator: cloud-init generator: cloud-init
@ -287,7 +287,7 @@ files:
name: eth0 name: eth0
subnets: subnets:
- type: dhcp - type: dhcp
control: auto control: auto
variants: variants:
- cloud - cloud
@ -360,6 +360,11 @@ packages:
# - redis # - redis
- packages: - packages:
- python3-dev
- py3-setuptools
- py3-pip
- py3-distutils-extra
- py3-virtualenv
- uv - uv
action: install action: install
# variants: # variants:
@ -399,7 +404,7 @@ actions:
#!/bin/sh #!/bin/sh
set -eux set -eux
rm -f /var/cache/apk/* rm -f /var/cache/apk/*
- trigger: post-packages - trigger: post-packages
action: |- action: |-
@ -419,7 +424,7 @@ actions:
for svc_name in networking crond; do for svc_name in networking crond; do
ln -s /etc/init.d/${svc_name} /etc/runlevels/default/${svc_name} ln -s /etc/init.d/${svc_name} /etc/runlevels/default/${svc_name}
done done
types: types:
- container - container
@ -428,7 +433,7 @@ actions:
#!/bin/sh #!/bin/sh
set -eux set -eux
setup-user frappe setup-user frappe
- trigger: post-packages - trigger: post-packages
action: |- action: |-
@ -544,7 +549,7 @@ actions:
EOF EOF
# Runlevel Nginx # Runlevel Nginx
rc-update add nginx rc-update add nginx
# variants: # variants:
# - nginx # - nginx
@ -593,7 +598,7 @@ actions:
EOF EOF
echo "MariaDB password is: $DISTROBUILDER_ROOT_UUID" echo "MariaDB password is: $DISTROBUILDER_ROOT_UUID"
# Runlevel MariaDB # Runlevel MariaDB
rc-update add mariadb default rc-update add mariadb default
# variants: # variants:
# - mariadb # - mariadb
@ -603,8 +608,8 @@ actions:
set -eux set -eux
# Install Frappe Bench # Install Frappe Bench
su frappe -c 'cd /home/frappe && uv python install'
su frappe -c 'cd /home/frappe && uv venv' su frappe -c 'cd /home/frappe && uv venv'
su frappe -c 'cd /home/frappe && uv python install'
su frappe -c 'cd /home/frappe && uv pip install frappe-bench' su frappe -c 'cd /home/frappe && uv pip install frappe-bench'
# Initialize Bench # Initialize Bench
su frappe -c 'uvx --from frappe-bench bench init --frappe-branch=develop --frappe-path=https://github.com/frappe/frappe --no-procfile --no-backups --skip-redis-config-generation --verbose /home/frappe/frappe-bench' su frappe -c 'uvx --from frappe-bench bench init --frappe-branch=develop --frappe-path=https://github.com/frappe/frappe --no-procfile --no-backups --skip-redis-config-generation --verbose /home/frappe/frappe-bench'
@ -641,10 +646,11 @@ actions:
# Install Jey ERP Subtabs App # Install Jey ERP Subtabs App
su frappe -c 'cd /home/frappe/frappe-bench && uvx --from frappe-bench bench install-app custom_subtabs' su frappe -c 'cd /home/frappe/frappe-bench && uvx --from frappe-bench bench install-app custom_subtabs'
su frappe -c 'cd /home/frappe/frappe-bench && uvx --from frappe-bench bench execute custom_subtabs.patches.add_parent_field.add_field_to_docfield_json' su frappe -c 'cd /home/frappe/frappe-bench && uvx --from frappe-bench bench execute custom_subtabs.patches.add_parent_field.add_field_to_docfield_json'
su frappe -c 'cd /home/frappe/frappe-bench && uvx --from frappe-bench bench execute jey_erp.custom.create_asset_categories.create_asset_categories'
# Install Jey ERP Apps # Install Jey ERP Apps
su frappe -c 'cd /home/frappe/frappe-bench && uvx --from frappe-bench bench install-app az_locale invoice_az taxes_az formula_editor jey_erp kapital_bank jey_theme' su frappe -c 'cd /home/frappe/frappe-bench && uvx --from frappe-bench bench install-app az_locale invoice_az taxes_az formula_editor jey_erp kapital_bank jey_theme'
# Builds JS and CSS, and then migrates # Builds JS and CSS, and then migrates
su frappe -c 'cd /home/frappe/frappe-bench && uvx --from frappe-bench bench build --force && uvx --from frappe-bench bench migrate' su frappe -c 'cd /home/frappe/frappe-bench && uvx --from frappe-bench bench build --force && uvx --from frappe-bench bench migrate'
- trigger: post-packages - trigger: post-packages
action: |- action: |-
@ -652,7 +658,7 @@ actions:
set -eux set -eux
# Runlevel Redis # Runlevel Redis
rc-update add redis default rc-update add redis default
variants: variants:
# - redis # - redis
@ -675,7 +681,7 @@ actions:
EOF EOF
chmod +x /etc/init.d/node chmod +x /etc/init.d/node
rc-update add node default rc-update add node default
# variants: # variants:
# - nodejs # - nodejs
@ -699,7 +705,7 @@ actions:
EOF EOF
chmod +x /etc/init.d/gunicorn chmod +x /etc/init.d/gunicorn
rc-update add gunicorn default rc-update add gunicorn default
# variants: # variants:
# - gunicorn # - gunicorn
@ -723,7 +729,7 @@ actions:
EOF EOF
chmod +x /etc/init.d/queue-long chmod +x /etc/init.d/queue-long
rc-update add queue-long default rc-update add queue-long default
- trigger: post-packages - trigger: post-packages
action: |- action: |-
@ -744,7 +750,7 @@ actions:
EOF EOF
chmod +x /etc/init.d/queue-short chmod +x /etc/init.d/queue-short
rc-update add queue-short default rc-update add queue-short default
- trigger: post-files - trigger: post-files
action: |- action: |-
@ -769,7 +775,7 @@ actions:
grub-install --target=${TARGET}-efi --no-nvram grub-install --target=${TARGET}-efi --no-nvram
# Attempt to correct errors in the installation of all packages. # Attempt to correct errors in the installation of all packages.
apk fix apk fix
types: types:
- vm - vm
@ -779,7 +785,7 @@ actions:
set -eux set -eux
# Tweak to prevent cloud-init from getting stuck. # Tweak to prevent cloud-init from getting stuck.
echo "datasource_list: ['NoCloud', 'ConfigDrive', 'LXD', 'None']" > /etc/cloud/cloud.cfg.d/99_lxc.cfg echo "datasource_list: ['NoCloud', 'ConfigDrive', 'LXD', 'None']" > /etc/cloud/cloud.cfg.d/99_lxc.cfg
types: types:
- vm - vm
variants: variants:
@ -790,7 +796,7 @@ actions:
#!/bin/sh #!/bin/sh
set -eux set -eux
setup-cloud-init setup-cloud-init
variants: variants:
- cloud - cloud