Compare commits
No commits in common. "3938429928467257f1c7b02703c15b0584b3e9bc" and "71188a33696b559e7837450c6e901917b6027b59" have entirely different histories.
3938429928
...
71188a3369
2
.env
2
.env
@ -15,5 +15,5 @@ PASSWORD="odoo"
|
|||||||
ADDONS="--addons-path=/opt/odoo/addons/,/opt/odoo/customaddons/$CUSTOMADDONS_DIR"
|
ADDONS="--addons-path=/opt/odoo/addons/,/opt/odoo/customaddons/$CUSTOMADDONS_DIR"
|
||||||
# ARGS=""
|
# ARGS=""
|
||||||
# ARGS="-d bross"
|
# 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"
|
# DEBUG="-m debugpy --listen 0.0.0.0:5678 --wait-for-client"
|
||||||
|
|||||||
@ -14,10 +14,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Setup correct time in build container
|
- name: Setup correct time in build container
|
||||||
run: ln -sf /usr/share/zoneinfo/Asia/Tbilisi /etc/localtime
|
run: ln -sf /usr/share/zoneinfo/Asia/Tbilisi /etc/localtime
|
||||||
|
|
||||||
- name: Install sshpass
|
|
||||||
run: apt update && apt install -y sshpass
|
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -27,38 +24,29 @@ jobs:
|
|||||||
path: .
|
path: .
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# - name: Testing
|
- name: Deploy to main environment
|
||||||
# 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
|
|
||||||
if: gitea.ref == 'refs/heads/dev'
|
if: gitea.ref == 'refs/heads/dev'
|
||||||
run: |
|
run: |
|
||||||
export SSHPASS=${{ secrets.SERVER_SSH_PASSWORD }}
|
### Get current commit
|
||||||
export STACK_PATH="/home/sysop/odoo18/customaddons/bross_hms"
|
# commit_hash=$(git rev-parse --short HEAD)
|
||||||
|
|
||||||
|
### Update local repo
|
||||||
|
# cd /opt/odoo/extra-addons
|
||||||
|
# git pull
|
||||||
|
|
||||||
### Get modules list to update
|
### 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/')
|
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
|
echo $modules_to_update
|
||||||
|
|
||||||
### Generate update string
|
### Generate update string
|
||||||
if [ -z "${modules_to_update}" ]; then
|
# if [ -z "${modules_to_update}" ]; then
|
||||||
echo "No module to update"
|
# echo "No module to update"
|
||||||
else
|
# # args="-d fms"
|
||||||
echo "Modules to update set"
|
# else
|
||||||
args="-d bross_hms_dev -u ${modules_to_update}"
|
# echo "Modules to update set"
|
||||||
sshpass -e ssh -p ${{ secrets.SERVER_SSH_PORT }} -o StrictHostKeyChecking=no \
|
# args="-d fms_prod -u ${modules_to_update}"
|
||||||
${{ secrets.SERVER_SSH_USER }}@${{ secrets.SERVER_SSH_HOST }} \
|
# docker compose -f /opt/odoo/docker-compose.yml down
|
||||||
"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"
|
# export ADDONS="--addons-path=/opt/odoo/addons/,/mnt/extra-addons/" && export ARGS=${args} && docker compose -f /opt/odoo/docker-compose.yml up -d
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
|
- name: Install sshpass
|
||||||
|
run: apt update && apt install -y sshpass
|
||||||
|
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 026e86100527c2105c8c396d1b30bbdefd612fe6
|
Subproject commit 1b3fe48b826ce31d587b7062041d23a29d376944
|
||||||
@ -5,23 +5,23 @@ services:
|
|||||||
command: >
|
command: >
|
||||||
-c max_wal_size=4GB
|
-c max_wal_size=4GB
|
||||||
env_file:
|
env_file:
|
||||||
dev.env
|
.env
|
||||||
# ports:
|
# ports:
|
||||||
# - 5433:5432
|
# - 5433:5432
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_17_odoo_data:/var/lib/postgresql/data/
|
- postgres_17_data:/var/lib/postgresql/data/
|
||||||
|
|
||||||
odoo:
|
odoo:
|
||||||
image: odoo-dev:18
|
image: odoo-dev:18
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
dev.env
|
.env
|
||||||
# ports:
|
# ports:
|
||||||
# - 5678:5678
|
# - 5678:5678
|
||||||
# - 8069:8069
|
# - 8069:8069
|
||||||
volumes:
|
volumes:
|
||||||
- /home/sysop/odoo18/:/opt/odoo/
|
- /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/
|
- odoo_18_filestore:/root/.local/share/Odoo/
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -32,6 +32,8 @@ services:
|
|||||||
nginx:
|
nginx:
|
||||||
image: nginx:1.27.0-alpine3.19-slim
|
image: nginx:1.27.0-alpine3.19-slim
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
.env
|
||||||
ports:
|
ports:
|
||||||
- 3080:80
|
- 3080:80
|
||||||
volumes:
|
volumes:
|
||||||
@ -40,7 +42,7 @@ services:
|
|||||||
- odoo
|
- odoo
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_17_odoo_data:
|
postgres_17_data:
|
||||||
name: postgres_17_odoo_data
|
name: postgres_17_data
|
||||||
odoo_18_filestore:
|
odoo_18_filestore:
|
||||||
name: odoo_18_filestore
|
name: odoo_18_filestore
|
||||||
|
|||||||
@ -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
|
|
||||||
Loading…
Reference in New Issue
Block a user