docker-odoo/8.0/run.sh
Mike Dillon 6a6ceb5b10 [IMP] Allow PG* env vars to be set directly
Makes it possible to use a non-linked Postgres container without having
to fake $DB_* environment variables.
2015-03-17 16:02:53 +01:00

16 lines
385 B
Bash
Executable File

#!/bin/bash
set -e
# set odoo database host, port, user and password
: ${PGHOST:=$DB_PORT_5432_TCP_ADDR}
: ${PGPORT:=$DB_PORT_5432_TCP_PORT}
: ${PGUSER:=${DB_ENV_POSTGRES_USER:='postgres'}}
: ${PGPASSWORD:=$DB_ENV_POSTGRES_PASSWORD}
export PGHOST PGPORT PGUSER PGPASSWORD
[ "$1" != "--" ] && exec "$@"
shift
exec /usr/bin/openerp-server --config=/etc/odoo/openerp-server.conf "$@"