Installing Press App - Frappe Cloud Local Setup

If you are get stuck somewhere you can connect with me,I can help you with.

1 Like

Hello, still facing TLS obtaining issues.

We are trying to set the proxy server using PRESS app. But we are getting following error

The task includes an option with an undefined variable. The error was: ‘agent_sentry_dsn’ is undefined

The error appears to be in ‘/home/erpadmin/frappe-bench/apps/press/press/playbooks/roles/agent/tasks/main.yml’: line 19, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  • name: Generate Agent Configuration File
    ^ here

I am not getting from where we will get the reference for the name in server.

The “agent_sentry_dsn” is referenced 3 lines further down in the file:

If the “and” construct tries to evaluate the undefined variable in the second branch of the “and”, then the construct seems to be wrong. It would only work correctly if it were built as a construct where the second part will not be evaluated if the variable is undefined, e.g. the second “and” condition should be inside a separate inner block after the first “and” condition.

This might be a bug, or something else could be wrong.

This needs precise knowledge of how ansible evaluates such expressions, and about the general construction of the yaml files of such playbooks.

Hi, Do you have detailed steps for process to set up the press.We are struggling in setting up the proxy server itself. The local development setup document is having high level process.

Anyone can help with more details?

Installing Press App - Frappe Cloud Local Setup

My bench is Stuck on the installing State Everything is Working Fine the Site is up and the Deploy Candinate is Also Working Fine. I have Deploy the Frappe App the Site is Up and the App is Up Using the Docker Container I am Attaching the Pictures So you can Over view the Complete Details
This the Picture of the Deploy Candidate Which is Active State

This is The Picture of the cloud Which Shows Deploy is Completed Successfully

This is the site i used To Deploy the Frappe App So its Already Active and The Containers Are Working Fine if i Visit this site I can See App is Working

But the Only Problem is Bench is Stuck in the Installing State How To resolve this


Althrough the Jobs of the Bench is Completed Success Fully


Can Anyone Guide me

Arun Mathai from our team has created a nice video on local/development press setup! :sparkles::sparkles:

8 Likes

So I guess your press workspace is broken, i.e. doesn’t show?
That’s because it hasn’t been upgraded since version-13 / Workspace v1
Press currently uses frappe version-15

Logged an issue here

Do you know if it is possible to put more than one component (proxy, db, app) on a single server? Is that what the ‘hybrid server’ is for?

Answered my own question. There’s a video explaining a hybrid server (app & db) here

There are also some documentation pages:
https://frappecloud.com/docs/hybrid-cloud-introduction
https://frappecloud.com/docs/hybrid-cloud-new
https://frappecloud.com/docs/hybrid-cloud-architecture

Edit:
Further to this it appears the hybrid feature has changed and still requires two servers, see below.
I have come to the conclusion it is possible to install everything on one server, you just have to create your own ansible playbook and Server action in press.

Screen Shot 2024-08-20 at 03.55.14

2 Likes

Hi! I have problems with the deployment of the press. What versions of components and Ubuntu are you using?

domain field must be filled.

Me too Proxy Server./ Setup Server / Status broken ,

1 Like

in my case the first time i build proxy server the internal IP not was requested and this give me the problem.

After that i fix and then the problem was with nginx config, in nginx config file search for someting like original or subnet network(i dont remember) put the ip of press server, try rebuild the server and voila!

if you can share the logs is better.
this was mine:

Understanding the set_real_ip_from Directive

The set_real_ip_from directive is used in Nginx to define trusted addresses from which it accepts X-Forwarded-For or X-Real-IP headers. This is typically used when Nginx is behind a reverse proxy or load balancer.

  • Valid Values: IP addresses or CIDR blocks (e.g., 192.168.1.0/24).
  • Purpose: It ensures that Nginx correctly logs the client’s real IP address rather than the proxy’s IP.

Security Note: Misconfiguring this directive can lead to security vulnerabilities, such as IP spoofing. Always ensure it’s set to trusted sources.

2 Likes

I have come to the conclusion it is possible to install everything on one server, you just have to create your own ansible playbook and Server action in press.

Can you please share your workflow for this?

I wouldn’t really call it a workflow. Press is impressive, poorly designed, overly complicated, inefficient and undocumented. So start reading and modifying the code to suit your needs.

4 Likes

Any idea why this error is occuring…

(I ignored the above error)
I couldn’t create a site from the Frappe dashboard, but I was able to create it successfully from the Press Console.

@casesolved-co-uk Mean you love it, right? :joy: :roll_eyes:

1 Like

Visit dashboard “https://press.metadaftr.com/dashboard/groups/bench-0001/deploys/deploy-0001-000006” from deploy candidate is throwing error

Traceback (most recent call last):
File “apps/frappe/frappe/website/serve.py”, line 20, in get_response
return renderer_instance.render()
File “apps/frappe/frappe/website/page_renderers/list_page.py”, line 12, in render
return super().render()
File “apps/frappe/frappe/website/page_renderers/template_page.py”, line 84, in render
html = self.get_html()
File “apps/frappe/frappe/website/utils.py”, line 534, in cache_html_decorator
html = func(*args, **kwargs)
File “apps/frappe/frappe/website/page_renderers/template_page.py”, line 95, in get_html
self.update_context()
File “apps/frappe/frappe/website/page_renderers/template_page.py”, line 163, in update_context
data = self.run_pymodule_method(“get_context”)
File “apps/frappe/frappe/website/page_renderers/template_page.py”, line 223, in run_pymodule_method
return method(self.context)
File “apps/frappe/frappe/www/list.py”, line 22, in get_context
context.update(get_list_context(context, doctype) or {})
File “apps/frappe/frappe/www/list.py”, line 183, in get_list_context
module = load_doctype_module(doctype)
File “apps/frappe/frappe/modules/utils.py”, line 247, in load_doctype_module
module = module or get_doctype_module(doctype)
File “apps/frappe/frappe/modules/utils.py”, line 238, in get_doctype_module
frappe.throw(_(“DocType {} not found”).format(doctype), exc=frappe.DoesNotExistError)
File “apps/frappe/frappe/init.py”, line 607, in throw
msgprint(
File “apps/frappe/frappe/init.py”, line 572, in msgprint
_raise_exception()
File “apps/frappe/frappe/init.py”, line 523, in _raise_exception
raise exc
frappe.exceptions.DoesNotExistError: DocType dashboard not found

Hey :wave:, well there is something really wrong with the bench hosting press.metadaftr.com for the /dashboard/… pages to not work.

What happens:

  • You go to a /dashboard/… page
  • For some reason, the website_route_rule hook is redirecting to the Frappe Press dashboard
  • So as a fallback, Frappe tries to show a doctype list (this is an old builtin feature).
  • And it fails, because there is no “dashboard” doctype.

What you need to do:

  • Check for anomalies in bench version -f table
  • Check that Press is correctly installed on your site
  • Explain the eventual modifications you did to the apps on your server, if any.

“The food at this restaurant is terrible. And the portions are so small!”

1 Like