update make file
This commit is contained in:
parent
ab34f3792e
commit
08037d0a44
8
Makefile
8
Makefile
@ -3,7 +3,7 @@ include deployment/.env
|
|||||||
PWD = $(shell pwd)
|
PWD = $(shell pwd)
|
||||||
UID = $(shell id -u)
|
UID = $(shell id -u)
|
||||||
GID = $(shell id -g)
|
GID = $(shell id -g)
|
||||||
PYTHON=/root/.pyenv/shims/python
|
PYTHON=python
|
||||||
DOCKERCMD=docker
|
DOCKERCMD=docker
|
||||||
DOCKER_BUILD=$(DOCKERCMD) build
|
DOCKER_BUILD=$(DOCKERCMD) build
|
||||||
DOCKER_PUSH=$(DOCKERCMD) push
|
DOCKER_PUSH=$(DOCKERCMD) push
|
||||||
@ -11,6 +11,10 @@ DOCKER_IMAGE=$(DOCKERCMD) image
|
|||||||
DEPLOY_PATH=${PWD}/deployment
|
DEPLOY_PATH=${PWD}/deployment
|
||||||
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
||||||
HASH := $(shell git rev-parse 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:
|
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
|
@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
|
build-image: update_tag
|
||||||
@ -18,4 +22,4 @@ build-image: update_tag
|
|||||||
push-image:
|
push-image:
|
||||||
$(DOCKERPUSH) ${ODOO_IMAGE}
|
$(DOCKERPUSH) ${ODOO_IMAGE}
|
||||||
run-server:
|
run-server:
|
||||||
${PYTHON} odoo-bin
|
${PYTHON} odoo-bin --config=${CONFIG}
|
||||||
|
6
odoo.conf.sample
Normal file
6
odoo.conf.sample
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[options]
|
||||||
|
db_host = localhost
|
||||||
|
db_port = 5432
|
||||||
|
db_user = changeme
|
||||||
|
db_password = password
|
||||||
|
|
Loading…
Reference in New Issue
Block a user