diff --git a/dev-scripts/simulate-cloudron.sh b/dev-scripts/simulate-cloudron.sh index e364ea8..abaf874 100644 --- a/dev-scripts/simulate-cloudron.sh +++ b/dev-scripts/simulate-cloudron.sh @@ -2,7 +2,7 @@ if [[ -z "${CLOUDRON+x}" ]]; then echo "Not Cloudron. Setting testing vars..." export CLOUDRON_POSTGRESQL_PORT=5432 export CLOUDRON_POSTGRESQL_HOST=172.17.0.1 - export CLOUDRON_POSTGRESQL_DATABASE=odoo + export CLOUDRON_POSTGRESQL_DATABASE=odootest export CLOUDRON_POSTGRESQL_USERNAME=odoo_user export CLOUDRON_POSTGRESQL_PASSWORD=odoo_password diff --git a/nginx.conf b/nginx.conf index 772cba0..297cde6 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,7 +1,7 @@ # Based on https://git.cloudron.io/cloudron/taiga-app/-/raw/master/nginx.conf daemon off; worker_processes auto; -pid /run/nginx/nginx.pid; +pid /run/nginx.pid; error_log stderr; events { @@ -50,9 +50,10 @@ http { } server { - listen 8000; + listen 8000 default_server; + + include /app/data/nginx-custom-locations.conf; - server_name __REPLACE_WITH_CLOUDRON_APP_DOMAIN__; proxy_read_timeout 720s; proxy_connect_timeout 720s; proxy_send_timeout 720s; diff --git a/start.sh b/start.sh index 1f5e8b5..363a41b 100755 --- a/start.sh +++ b/start.sh @@ -32,7 +32,7 @@ if [[ ! -f /app/data/odoo.conf ]]; then pg_cli "INSERT INTO public.ir_config_parameter (key, value, create_uid, create_date, write_uid, write_date) VALUES ('mail.catchall.domain', '$CLOUDRON_APP_DOMAIN', 2, 'NOW()', 2, 'NOW()');" echo "Disabling public sign-up..." - pg_cli "UPDATE public.ir_config_parameter SET value='b2b' WHERE key='auth_signup.invitation_scope';"; + pg_cli "UPDATE public.ir_config_parameter SET value='b2b' WHERE key='auth_signup.invitation_scope';" echo "Copying default configuration file to /app/data/odoo.conf..." cp /app/pkg/odoo.conf.sample /app/data/odoo.conf @@ -108,10 +108,18 @@ fi # Start nginx process sed -e "s,__REPLACE_WITH_CLOUDRON_APP_DOMAIN__,${CLOUDRON_APP_DOMAIN}," /app/pkg/nginx.conf >/run/nginx/nginx.conf +if [[ ! -f /app/data/nginx-custom-locations.conf ]]; then + cat >/app/data/nginx-custom-locations.conf < Start nginx" -rm -f /run/nginx/nginx.pid +rm -f /run/nginx.pid nginx -c /run/nginx/nginx.conf & # Done nginx