Skip to content
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

Demo project images in docker #920

Closed
wants to merge 5 commits into from
Closed

Conversation

todomagichere
Copy link

No description provided.

@todomagichere todomagichere requested a review from a team as a code owner June 6, 2023 13:21
@probot-autolabeler probot-autolabeler bot added the Docker Docker-related issues and PRs. label Jun 6, 2023
@umpirsky
Copy link

umpirsky commented Jun 6, 2023

Thanks for the effort!

With config as is, I'm still having issues with images, same as before.

If I switch to bind-mounted host directory:

--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -14,13 +14,13 @@ services:
       - MAILER_DSN=smtp://mailhog:1025
       - PHP_DATE_TIMEZONE=${PHP_DATE_TIMEZONE:-UTC}
     volumes:
-      - .:/srv/sylius:rw,cached
+      # - .:/srv/sylius:rw,cached
       # if you develop on Linux, you may use a bind-mounted host directory instead
-      # - ./var:/srv/sylius/var:rw
+      - ./var:/srv/sylius/var:rw
       - ./public:/srv/sylius/public:rw,delegated
       # if you develop on Linux, you may use a bind-mounted host directory instead
-      # - ./public/media:/srv/sylius/public/media:rw
-      - public-media:/srv/sylius/public/media:rw
+      - ./public/media:/srv/sylius/public/media:rw
+      # - public-media:/srv/sylius/public/media:rw
 
   migrations:
     container_name: migrations
@@ -37,13 +37,13 @@ services:
       - LOAD_FIXTURES=0
       - PHP_DATE_TIMEZONE=${PHP_DATE_TIMEZONE:-UTC}
     volumes:
-      - .:/srv/sylius:rw,cached
+      # - .:/srv/sylius:rw,cached
       # if you develop on Linux, you may use a bind-mounted host directory instead
-      # - ./var:/srv/sylius/var:rw
+      - ./var:/srv/sylius/var:rw
       - ./public:/srv/sylius/public:rw,delegated
       # if you develop on Linux, you may use a bind-mounted host directory instead
-      # - ./public/media:/srv/sylius/public/media:rw
-      - public-media:/srv/sylius/public/media:rw
+      - ./public/media:/srv/sylius/public/media:rw
+      # - public-media:/srv/sylius/public/media:rw

I get:

Doctrine\DBAL\Exception\ConnectionException:
An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused

  at /srv/sylius/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:112

for some reason.

@todomagichere
Copy link
Author

In fact this is a try to merge the solution implemented in #887, but the PR is not merged yet, @vvasiloi do you know anything about that?

@todomagichere
Copy link
Author

Duplicated PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docker Docker-related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants