dockware: Error setting a different URL

Hi! Thanks for this epic project. It helps tremendously in day to day development.

Describe the bug We encounter a weird error when setting a custom URL. We adjusted the entrypoint.sh for our purpose and added: sudo echo "127.0.0.1 $2" >> /etc/hosts sudo mysql --user=root --password=root -e "use shopware; update sales_channel_domain set url='$1' where url='http://localhost';" After that we clear the cache with: rm -rf /var/www/html/var/cache/* /var/www/html/bin/console cache:clear

We also have our own .env where the APP_URL is replaced with the AWS URL.

Before we apply those changes a cURL call to localhost returns a 200. After that we get a 500 and we can not start the container. We want to use this within Lightsail from AWS to create test instances for our shopware app.

To Reproduce We create our own image using a custom entrypoint (which is copied from the current play version) and we added: sudo echo "127.0.0.1 $2" >> /etc/hosts export APP_URL=$1 sudo mysql --user=root --password=root -e "use shopware; select * from sales_channel_domain" sudo mysql --user=root --password=root -e "use shopware; update sales_channel_domain set url='$1' where url='http://localhost';" sudo mysql --user=root --password=root -e "use shopware; select * from sales_channel_domain" rm -rf /var/www/html/var/cache/* /var/www/html/bin/console cache:clear /var/www/html/bin/console dal:refresh:index

In this case $1 and $2 are the corresponding URL and Domain from AWS Lightsail Container Service.

Expected behavior Corresponding to the documentation and custom domains we should only update the sales_channel_domain table and the /etc/hosts. (https://dockware.io/docs#custom-domains)

Additional context We use the container service from AWS Lightsail and create our custom image which is pushed to lightsail.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15

Most upvoted comments

@casdep as i tryed to explain in the first repsonse, you have to create the docker-compose.yml by your self for evrey setup. The same as you have to with composer files.

so pls try this:

  1. stop your running containers
  2. copy the file from https://github.com/dockware/examples/blob/master/basic-dev-setup/docker-compose.yml
  3. locate it in your explorer in C:\my-setup or some other place
  4. open your cli and go to C:\my-setup
  5. type docker-compose up -d

@casdep you have to create the docker-compose.yml by your self per project. You can find great exmaples in our dockware/exmplaes repository.