Compare commits
14 Commits
71188a3369
...
3938429928
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3938429928 | ||
|
|
47aee5c6fc | ||
|
|
60f7a00813 | ||
|
|
aad19bc7f3 | ||
|
|
59fe076ed8 | ||
|
|
b87c76a732 | ||
|
|
8619e7908e | ||
|
|
731853ced4 | ||
|
|
3f9f40304b | ||
|
|
140bf1aaad | ||
|
|
4952a1b76b | ||
|
|
34122cf317 | ||
|
|
f281ce399a | ||
|
|
3e77f7282a |
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"
|
||||||
|
|||||||
@ -15,6 +15,9 @@ jobs:
|
|||||||
- 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:
|
||||||
@ -24,29 +27,38 @@ jobs:
|
|||||||
path: .
|
path: .
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Deploy to main environment
|
# - 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
|
||||||
if: gitea.ref == 'refs/heads/dev'
|
if: gitea.ref == 'refs/heads/dev'
|
||||||
run: |
|
run: |
|
||||||
### Get current commit
|
export SSHPASS=${{ secrets.SERVER_SSH_PASSWORD }}
|
||||||
# commit_hash=$(git rev-parse --short HEAD)
|
export STACK_PATH="/home/sysop/odoo18/customaddons/bross_hms"
|
||||||
|
|
||||||
### 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
|
|
||||||
# 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
|
### Generate update string
|
||||||
run: apt update && apt install -y sshpass
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 1b3fe48b826ce31d587b7062041d23a29d376944
|
Subproject commit 026e86100527c2105c8c396d1b30bbdefd612fe6
|
||||||
@ -5,23 +5,23 @@ services:
|
|||||||
command: >
|
command: >
|
||||||
-c max_wal_size=4GB
|
-c max_wal_size=4GB
|
||||||
env_file:
|
env_file:
|
||||||
.env
|
dev.env
|
||||||
# ports:
|
# ports:
|
||||||
# - 5433:5432
|
# - 5433:5432
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_17_data:/var/lib/postgresql/data/
|
- postgres_17_odoo_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:
|
||||||
.env
|
dev.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.conf:/etc/odoo.conf
|
- /home/sysop/odoo18/customaddons/${CUSTOMADDONS_DIR}/odoo-dev.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,8 +32,6 @@ 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:
|
||||||
@ -42,7 +40,7 @@ services:
|
|||||||
- odoo
|
- odoo
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_17_data:
|
postgres_17_odoo_data:
|
||||||
name: postgres_17_data
|
name: postgres_17_odoo_data
|
||||||
odoo_18_filestore:
|
odoo_18_filestore:
|
||||||
name: odoo_18_filestore
|
name: odoo_18_filestore
|
||||||
|
|||||||
40
odoo-dev.conf
Normal file
40
odoo-dev.conf
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
[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