-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Docker install process does not work #15916
Comments
Following on from this... I think its working for me OK when I use Saleor Platform, and I expected something visible to happen when I typed "docker compose build" but nothing did. But if I proceed with the instructions it seems work then. I guess the issue above was I was only using Saleor Core but expected the database to be setup inside also? Maybe its not. Although its working, during the build there are more errors now. Issues with the database tables?
|
We've abandoned Saleor now. I'm a web developer and its crazy the amount of time I spent trying to fix issues, or figure out the correct documentation etc. I switched to something else in a couple of days and all works fine now so I can get onto actually building the website. |
Works fine for me. |
Dont want to waste any more time setting something up that has so many issues when other systems exist that do the exact same thing. |
@faizan2700, thanks for providing your support! @amityweb Thanks for the feedback; we will continue making our Docker setup bullet-proof and effortless for local Saleor development. There are systems with a lower entry threshold, for sure, and if you don't really aim for tech-agnostic, API-based extensibility, and your use case is fairly regular, Saleor may not be the first choice. In any case, keep us posted if you continue exploring it. |
What does "lower entry threshold" even mean?! You mean systems that are easier to deply? What does "tech-agnostic, API-based extensibility" even mean? You mean less technical than other systems, and that has an API? That statement is not true. If using impressive non-layman terms gets companies to sign up to your expensive monthly fee then good on you! But ultimately, all the features Saleor has, can be done in many other common eCommerce systems. We need a backend solution for customers to take orders of products on a website. It must have standard features like stock control, variation's etc. Due to Saleor being such a PITA to setup, and the fact it is a backend system that no end user sees, and because we just need to build the website and not faff about with making systems work and struggling with documentation, we switched to WooCommerce for now nd it just works out of the box. I'd rather use something else but we can switch again in the future, but only to something that can be setup in an hour or two, not days or weeks. Customers dont really care what systems they use, as long as it works. Developers want something easy to build. Thank you. |
It would be great to know if you encountered issues with the database migrations (as Faizan suggested above) or if there was something else that posed a challenge.
I'm not sure which statement you're referring to as untrue. What we mean by "tech-agnostic, API-based extensibility" is that Saleor allows you to extend its capabilities and execution flows using publicly available APIs in any language and stack of your choice, rather than relying on a plugin architecture. You can read more about the benefits (and disadvantages) of this approach here: Benefits of extending commerce via API over plugins
I understand some things may look like unnecessary jargon. We use the term internally to differentiate our extensibility model (more in the link above). Anyway, feedback taken. Saleor is fully open source. Companies (and individuals) use it for free and without limitation whenever and however they want. We don't discriminate between our open source API and Cloud version. Organizations can choose what works best for them: either investing in their own operations or opting for our Cloud service to focus on their customers instead of platform maintenance and reliability. In the case of Saleor, the evaluation is typically done by larger technical teams, and I believe marketing plays a minimal role in their decision.
That’s most probably true. Most features found in Saleor can be implemented in other ecommerce systems as well, just as they have been in the past. While we aim for Saleor to be the best choice for development teams dealing with all sorts of commerce complexities, we always advocate for finding the best fit for your specific requirements. E-commerce companies differ greatly in complexity and needs. |
About "tech-agnostic, API-based extensibility" not being true, sorry I should have explained more. The statement implies if you want that then you use Saleor. But what I mean is, other systems have that too. Including "any language and stack of your choice, rather than relying on a plugin architecture". So its "untrue" to claim you use Saleor if you need a "tech-agnostic, API-based extensibility" system. I am using WooCommerce and use its API which allows me to build a website in Next.js. Its API and documentation and support is far better than Saleors! I would have used Saleor if the installation and documentation was straight forward, but its not. I am not interested in wasting all the setup time, when I can have another system installed and working within an hour, and have the same features. If you want to expand your customer base you need to sort that out. My customer is a very large international agency and maybe we could have switched to your paid version but I told them to abandon Saleor because its too difficult to work with and provides no added benefits to other systems. Ultimately we have the same functionality now without Saleor. I have had other issues, I have posted other GitHub topics and requested support over the past year or so on a couple of places, but no replies come, so support is also not good. I am using the free version not paid one, but if a company release a free/community one I expect them to support it and have good documentation, otherwise just dont provide it. |
By the way, we did start with Saleor over a year ago, when the deploy process was via GitHub to Heroku. That just worked. I now have all these issues since your switch to Docker. So we switched eCommerce system and I just needed to update all my GraphQL queries to get data from elsewhere. Now I dont have the headaches of Docker. |
Thank you for the additional context! On the extensibility model – we don't mean API and async webhooks only. It's true that creating a storefront with Next.js should be possible with nearly any e-commerce API. This part is not always straightforward, but all you need is an API from which you can pull your data, plus all the basic cart and checkout mutations. By extensibility, in a nutshell, we mean the number of standard execution flows that you can influence in Saleor with our sync webhooks: Payment events, Shipping events, Tax events, Transaction events, Stored payment method events. This enables developers to plug into all standard execution flows in Saleor. This approach is crucial when you need to integrate and stitch together various systems, such as third-party SaaS solutions (PIM, ERP, OMS, etc.), custom back-office applications, and other services in your e-commerce operation. |
What are you trying to achieve?
Install Saleor using the documentation here https://docs.saleor.io/docs/3.x/setup/docker-compose
The first hurdle is that "docker compose build" throws a version error and stops. Removing the version line then it just does nothing. Absolutely nothing.
Verbose output just says:
DEBU[0000] Enabled Docker Desktop integration (experimental) @ unix:///Users/me/Library/Containers/com.docker.docker/Data/docker-cli.sock
So instead of building from the files from Github, within Docker I search for Saleor in the repos there and find the mirumee/saleor one and it does download and builds the image OK. I do have to specify a port when I run it, else there is no port assigned and localhost does not work. When I assign a custom port it works.
But when i run it, the webpage and logs show the following error in that it cannot connect to port 5432 (I think postgres)
The logs show this:
Steps to reproduce the problem
The steps as per the steps here https://docs.saleor.io/docs/3.x/setup/docker-compose
What did you expect to happen?
Install Saleor and get a working Saleor install at the localhost:8000 or whatever port used
Logs
OperationalError at /
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
Request Method: GET
Request URL: http://localhost:8080/
Django Version: 3.2.7
Exception Type: OperationalError
Exception Value:
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
Exception Location: /usr/local/lib/python3.9/site-packages/psycopg2/init.py, line 122, in connect
Python Executable: /usr/local/bin/python
Python Version: 3.9.7
Python Path:
['/app',
'/app',
'/usr/local/bin',
'/usr/local/lib/python39.zip',
'/usr/local/lib/python3.9',
'/usr/local/lib/python3.9/lib-dynload',
'/usr/local/lib/python3.9/site-packages']
Server time: Wed, 01 May 2024 01:50:16 +0000
2024-05-01 02:50:16 ERROR django.request Internal Server Error: /favicon.ico [PID:9:ThreadPoolExecutor-8_0]
2024-05-01 02:50:16 Traceback (most recent call last):
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
2024-05-01 02:50:16 self.connect()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 200, in connect
2024-05-01 02:50:16 self.connection = self.get_new_connection(conn_params)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
2024-05-01 02:50:16 connection = Database.connect(**conn_params)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/psycopg2/init.py", line 122, in connect
2024-05-01 02:50:16 conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
2024-05-01 02:50:16 psycopg2.OperationalError: could not connect to server: Connection refused
2024-05-01 02:50:16 Is the server running on host "localhost" (::1) and accepting
2024-05-01 02:50:16 TCP/IP connections on port 5432?
2024-05-01 02:50:16 could not connect to server: Connection refused
2024-05-01 02:50:16 Is the server running on host "localhost" (127.0.0.1) and accepting
2024-05-01 02:50:16 TCP/IP connections on port 5432?
2024-05-01 02:50:16
2024-05-01 02:50:16
2024-05-01 02:50:16 The above exception was the direct cause of the following exception:
2024-05-01 02:50:16
2024-05-01 02:50:16 Traceback (most recent call last):
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/asgiref/sync.py", line 482, in thread_handler
2024-05-01 02:50:16 raise exc_info[1]
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 38, in inner
2024-05-01 02:50:16 response = await get_response(request)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 263, in _get_response_async
2024-05-01 02:50:16 response = await sync_to_async(response.render, thread_sensitive=True)()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/asgiref/sync.py", line 444, in call
2024-05-01 02:50:16 ret = await asyncio.wait_for(future, timeout=None)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
2024-05-01 02:50:16 return await fut
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 22, in run
2024-05-01 02:50:16 result = self.fn(*self.args, **self.kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/template/response.py", line 105, in render
2024-05-01 02:50:16 self.content = self.rendered_content
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/template/response.py", line 83, in rendered_content
2024-05-01 02:50:16 return template.render(context, self._request)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/template/backends/django.py", line 61, in render
2024-05-01 02:50:16 return self.template.render(context)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/template/base.py", line 168, in render
2024-05-01 02:50:16 with context.bind_template(self):
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/contextlib.py", line 119, in enter
2024-05-01 02:50:16 return next(self.gen)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/debug_toolbar/panels/templates/panel.py", line 46, in _request_context_bind_template
2024-05-01 02:50:16 context = processor(self.request)
2024-05-01 02:50:16 File "/app/saleor/site/context_processors.py", line 13, in site
2024-05-01 02:50:16 site = get_current_site(request)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/contrib/sites/shortcuts.py", line 13, in get_current_site
2024-05-01 02:50:16 return Site.objects.get_current(request)
2024-05-01 02:50:16 File "/app/saleor/site/patch_sites.py", line 25, in new_get_current
2024-05-01 02:50:16 site = self.prefetch_related("settings").filter(pk=site_id)[0]
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 317, in getitem
2024-05-01 02:50:16 qs._fetch_all()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1324, in _fetch_all
2024-05-01 02:50:16 self._result_cache = list(self._iterable_class(self))
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 51, in iter
2024-05-01 02:50:16 results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1173, in execute_sql
2024-05-01 02:50:16 cursor = self.connection.cursor()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 259, in cursor
2024-05-01 02:50:16 return self._cursor()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 235, in _cursor
2024-05-01 02:50:16 self.ensure_connection()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
2024-05-01 02:50:16 self.connect()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in exit
2024-05-01 02:50:16 raise dj_exc_value.with_traceback(traceback) from exc_value
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
2024-05-01 02:50:16 self.connect()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 200, in connect
2024-05-01 02:50:16 self.connection = self.get_new_connection(conn_params)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
2024-05-01 02:50:16 connection = Database.connect(**conn_params)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/psycopg2/init.py", line 122, in connect
2024-05-01 02:50:16 conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
2024-05-01 02:50:16 django.db.utils.OperationalError: could not connect to server: Connection refused
2024-05-01 02:50:16 Is the server running on host "localhost" (::1) and accepting
2024-05-01 02:50:16 TCP/IP connections on port 5432?
2024-05-01 02:50:16 could not connect to server: Connection refused
2024-05-01 02:50:16 Is the server running on host "localhost" (127.0.0.1) and accepting
2024-05-01 02:50:16 TCP/IP connections on port 5432?
Environment
The text was updated successfully, but these errors were encountered: