docker-odoo/9.0/entrypoint.sh

25 lines
455 B
Bash
Raw Normal View History

2015-10-08 05:21:13 -04:00
#!/bin/bash
set -e
# set odoo database host, port, user and password
: ${PGHOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
: ${PGPORT:=${DB_PORT_5432_TCP_PORT:=5432}}
: ${PGUSER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='postgres'}}}
: ${PGPASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=$POSTGRES_PASSWORD}}
2015-10-08 05:21:13 -04:00
export PGHOST PGPORT PGUSER PGPASSWORD
case "$1" in
--)
shift
exec openerp-server "$@"
;;
-*)
exec openerp-server "$@"
;;
*)
exec "$@"
esac
exit 1