Odoo18-Base/Makefile

34 lines
1006 B
Makefile
Raw Normal View History

2025-01-06 10:57:38 +07:00
.SHELLFLAGS += ${SHELLFLAGS} -e
PWD = $(shell pwd)
UID = $(shell id -u)
GID = $(shell id -g)
2025-01-06 11:42:15 +07:00
PYTHON=python
2025-01-06 10:57:38 +07:00
DOCKERCMD=docker
DOCKER_BUILD=$(DOCKERCMD) build
DOCKER_PUSH=$(DOCKERCMD) push
DOCKER_IMAGE=$(DOCKERCMD) image
DEPLOY_PATH=${PWD}/deployment
2025-01-07 12:20:00 +07:00
SETUP_PATH=${PWD}/setup
2025-01-06 11:11:20 +07:00
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
HASH := $(shell git rev-parse HEAD)
2025-01-06 11:42:15 +07:00
CONFIG=odoo.conf
install:
2025-01-07 14:49:23 +07:00
export DEBIAN_FRONTEND=noninteractive && \
2025-01-07 14:51:42 +07:00
sudo apt -y update && \
2025-01-07 14:54:51 +07:00
sudo apt install -y python3.12-full python3-pip libldap2-dev libpq-dev libsasl2-dev && \
2025-01-06 11:42:15 +07:00
pip install -r requirements.txt
2025-01-07 12:20:00 +07:00
gen_test_config:
${PWD}/setup/init_conf.sh
run_test:
${PYTHON} odoo-bin -i all_modules --log-level=test --test-enable -d testdb --stop-after-init --config=${CONFIG}
clean_test:
${PWD}/setup/clean_up.sh
2025-01-07 09:34:26 +07:00
gen_env:
${PWD}/setup/init_env.sh
2025-01-07 12:20:00 +07:00
build-image: gen_env
2025-01-06 10:57:38 +07:00
DOCKER_BUILDKIT=1 ${DOCKER_BUILD} . --progress plain --tag ${ODOO_IMAGE}
push-image:
$(DOCKERPUSH) ${ODOO_IMAGE}
run-server:
2025-01-06 11:42:15 +07:00
${PYTHON} odoo-bin --config=${CONFIG}