Compare commits

..

No commits in common. "3938429928467257f1c7b02703c15b0584b3e9bc" and "71188a33696b559e7837450c6e901917b6027b59" have entirely different histories.

5 changed files with 29 additions and 79 deletions

2
.env
View File

@ -15,5 +15,5 @@ PASSWORD="odoo"
ADDONS="--addons-path=/opt/odoo/addons/,/opt/odoo/customaddons/$CUSTOMADDONS_DIR"
# ARGS=""
# ARGS="-d bross"
#ARGS="-d cybro_hms -u bross_hms,exely_integration,bross_bank_management"
ARGS="-d cybro_hms -u bross_hms,exely_integration,bross_bank_management"
# DEBUG="-m debugpy --listen 0.0.0.0:5678 --wait-for-client"

View File

@ -14,10 +14,7 @@ jobs:
steps:
- name: Setup correct time in build container
run: ln -sf /usr/share/zoneinfo/Asia/Tbilisi /etc/localtime
- name: Install sshpass
run: apt update && apt install -y sshpass
- name: Checkout repository
uses: actions/checkout@v4
with:
@ -27,38 +24,29 @@ jobs:
path: .
fetch-depth: 0
# - name: Testing
# run: |
# modules_to_update=$(git diff --name-only ${{ gitea.event.before }}..${{ gitea.event.after }} | awk -F/ '{print $1}')
# echo $modules_to_update
# export SSHPASS=${{ secrets.SERVER_SSH_PASSWORD }}
# export STACK_PATH="/home/sysop/odoo18/customaddons/bross_hms"
# sshpass -e ssh -p ${{ secrets.SERVER_SSH_PORT }} -o StrictHostKeyChecking=no \
# ${{ secrets.SERVER_SSH_USER }}@${{ secrets.SERVER_SSH_HOST }} "echo $modules_to_update > testing_file"
- name: Deploy to dev environment
- name: Deploy to main environment
if: gitea.ref == 'refs/heads/dev'
run: |
export SSHPASS=${{ secrets.SERVER_SSH_PASSWORD }}
export STACK_PATH="/home/sysop/odoo18/customaddons/bross_hms"
### Get current commit
# commit_hash=$(git rev-parse --short HEAD)
### Update local repo
# cd /opt/odoo/extra-addons
# git pull
### Get modules list to update
modules_to_update=$(git diff --name-only ${{ gitea.event.before }}..${{ gitea.event.after }} | awk -F/ '{print $1}' | uniq | xargs -I {} sh -c 'find {} -type f -name "__manifest__.py" | grep -q "__manifest__.py" && echo {}' 2>/dev/null | sed -z 's/\n/,/g; s/,$/\n/')
echo $modules_to_update
### Generate update string
if [ -z "${modules_to_update}" ]; then
echo "No module to update"
else
echo "Modules to update set"
args="-d bross_hms_dev -u ${modules_to_update}"
sshpass -e ssh -p ${{ secrets.SERVER_SSH_PORT }} -o StrictHostKeyChecking=no \
${{ secrets.SERVER_SSH_USER }}@${{ secrets.SERVER_SSH_HOST }} \
"cd $STACK_PATH && git pull && docker compose -f docker-compose-dev.yml down && export ARGS='${args}' && docker compose -f docker-compose-dev.yml up -d"
fi
# if [ -z "${modules_to_update}" ]; then
# echo "No module to update"
# # args="-d fms"
# else
# echo "Modules to update set"
# args="-d fms_prod -u ${modules_to_update}"
# docker compose -f /opt/odoo/docker-compose.yml down
# export ADDONS="--addons-path=/opt/odoo/addons/,/mnt/extra-addons/" && export ARGS=${args} && docker compose -f /opt/odoo/docker-compose.yml up -d
# fi
- name: Install sshpass
run: apt update && apt install -y sshpass

@ -1 +1 @@
Subproject commit 026e86100527c2105c8c396d1b30bbdefd612fe6
Subproject commit 1b3fe48b826ce31d587b7062041d23a29d376944

View File

@ -5,23 +5,23 @@ services:
command: >
-c max_wal_size=4GB
env_file:
dev.env
.env
# ports:
# - 5433:5432
volumes:
- postgres_17_odoo_data:/var/lib/postgresql/data/
- postgres_17_data:/var/lib/postgresql/data/
odoo:
image: odoo-dev:18
restart: unless-stopped
env_file:
dev.env
.env
# ports:
# - 5678:5678
# - 8069:8069
volumes:
- /home/sysop/odoo18/:/opt/odoo/
- /home/sysop/odoo18/customaddons/${CUSTOMADDONS_DIR}/odoo-dev.conf:/etc/odoo.conf
- /home/sysop/odoo18/customaddons/${CUSTOMADDONS_DIR}/odoo.conf:/etc/odoo.conf
- odoo_18_filestore:/root/.local/share/Odoo/
depends_on:
- db
@ -32,6 +32,8 @@ services:
nginx:
image: nginx:1.27.0-alpine3.19-slim
restart: unless-stopped
env_file:
.env
ports:
- 3080:80
volumes:
@ -40,7 +42,7 @@ services:
- odoo
volumes:
postgres_17_odoo_data:
name: postgres_17_odoo_data
postgres_17_data:
name: postgres_17_data
odoo_18_filestore:
name: odoo_18_filestore

View File

@ -1,40 +0,0 @@
[options]
admin_passwd = $pbkdf2-sha512$25000$633v3ZuT0novhVAqhdDamw$fKiY4ilP5EF8xLv66kljQ1WWppTQgraLUMDANMT3rlx01C6luc27z3PPj.wbgTPy8VUvL6LPjLGSHdlqlHXn6A
;admin_passwd = admin
;addons_path = /mnt/extra-addons
;data_dir = /var/lib/odoo
;csv_internal_sep = ,
;db_maxconn = 64
;db_name = False
;db_template = template1
;dbfilter = .*
;debug_mode = False
;email_from = False
limit_memory_hard = 12684354560
limit_memory_soft = 12147483648
;limit_request = 8192
limit_time_cpu = 60000
limit_time_real = 120000
list_db = True
proxy_mode = True
http_enable = True
;log_db = False
;log_handler = [':INFO']
;log_level = info
;logfile = None
;longpolling_port = 8072
;max_cron_threads = 2
;osv_memory_age_limit = 1.0
;osv_memory_count_limit = False
;smtp_password = False
;smtp_port = 25
;smtp_server = localhost
;smtp_ssl = False
;smtp_user = False
;workers = 0
;xmlrpc = True
;xmlrpc_interface =
;xmlrpc_port = 8069
;xmlrpcs = True
;xmlrpcs_interface =
;xmlrpcs_port = 8071