From 08037d0a44d01d891735884cb8625b40f5a26c1c Mon Sep 17 00:00:00 2001 From: hoangvv Date: Mon, 6 Jan 2025 11:42:15 +0700 Subject: [PATCH] update make file --- Makefile | 8 ++++++-- odoo.conf.sample | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 odoo.conf.sample diff --git a/Makefile b/Makefile index 803ac1de0..2f00ced84 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ include deployment/.env PWD = $(shell pwd) UID = $(shell id -u) GID = $(shell id -g) -PYTHON=/root/.pyenv/shims/python +PYTHON=python DOCKERCMD=docker DOCKER_BUILD=$(DOCKERCMD) build DOCKER_PUSH=$(DOCKERCMD) push @@ -11,6 +11,10 @@ DOCKER_IMAGE=$(DOCKERCMD) image DEPLOY_PATH=${PWD}/deployment BRANCH := $(shell git rev-parse --abbrev-ref HEAD) HASH := $(shell git rev-parse HEAD) +CONFIG=odoo.conf +install: + sudo apt install python3-pip libldap2-dev libpq-dev libsasl2-dev && \ + pip install -r requirements.txt update_env: @awk '/^ODOO_TAG=/ { $$0 = "ODOO_TAG=${BRANCH}" } 1' ${DEPLOY_PATH}/.env > ${DEPLOY_PATH}/.env.tmp && mv ${DEPLOY_PATH}/.env.tmp ${DEPLOY_PATH}/.env build-image: update_tag @@ -18,4 +22,4 @@ build-image: update_tag push-image: $(DOCKERPUSH) ${ODOO_IMAGE} run-server: - ${PYTHON} odoo-bin + ${PYTHON} odoo-bin --config=${CONFIG} diff --git a/odoo.conf.sample b/odoo.conf.sample new file mode 100644 index 000000000..520ca483e --- /dev/null +++ b/odoo.conf.sample @@ -0,0 +1,6 @@ +[options] +db_host = localhost +db_port = 5432 +db_user = changeme +db_password = password +