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

error by ssl letsencrypt #23

Closed
hermersnana opened this issue Apr 9, 2020 · 8 comments
Closed

error by ssl letsencrypt #23

hermersnana opened this issue Apr 9, 2020 · 8 comments

Comments

@hermersnana
Copy link

Describe the bug
sudo docker-compose run --rm letsencrypt letsencrypt certonly --webroot --email admin@admin.com --agree-tos -w /var/www/letsencrypt -d nanamarkt.de
WARNING: The PWD variable is not set. Defaulting to a blank string.
ERROR: Configuration for volume app_data specifies "device" driver_opt /htdocs, but a volume with the same name uses a different "device" driver_opt (/www/wwwroot/nanamarkt/htdocs). If you wish to use the new configuration, please remove the existing volume "nanamarkt_app_data" first:
$ docker volume rm nanamarkt_app_data

To Reproduce
Steps to reproduce the behavior:

  1. after install , i try to web nanamarkt.de, but i got page 404, und without SSL.
  2. i try use , sudo docker-compose run --rm letsencrypt letsencrypt certonly --webroot --email admin@admin.com --agree-tos -w /var/www/letsencrypt -d nanamarkt.de
    i got the error
    WARNING: The PWD variable is not set. Defaulting to a blank string.
    ERROR: Configuration for volume app_data specifies "device" driver_opt /htdocs, but a volume with the same name uses a different "device" driver_opt (/www/wwwroot/nanamarkt/htdocs). If you wish to use the new configuration, please remove the existing volume "nanamarkt_app_data" first:
    $ docker volume rm nanamarkt_app_data
    ps. i used the default.conf und default_ssl.conf for the nginx.

Desktop (please complete the following information):

  • OS: [Ubuntu 18.04]
  • Browser [chrome and safari]

Additional context
if i used

  1. sudo docker-compose down -v
    2.sudo docker-compose up -d
    i will got the error from php container
    ERROR: for nanamarkt_php_7.3 Cannot create container for service php: failed toCreating nanamarkt_redis_pagespeed ... done
    ata, flags: 0x1000: no such file or directory

ERROR: for php Cannot create container for service php: failed to mount local volume: mount /htdocs:/var/lib/docker/volumes/nanamarkt_app_data/_data, flags: 0x1000: no such file or directory
ERROR: Encountered errors while bringing up the project.

thank you very much

best regards
lee

@aliuosio
Copy link
Owner

aliuosio commented Apr 9, 2020

Do docker volume rm nanamarkt_app_data before as described in the error message you sent.

nanamarkt.de leads to mage2.localhost.
Set the Var in .env and do a docker-compose up -d

Then The LetsEncrypt Container should have the right doman name

@hermersnana
Copy link
Author

thanks, but i have seted in the .env ,hier ist mein .env.

used on docker-compose up -d

COMPOSE_HTTP_TIMEOUT=1800
DUMP_FOLDER=.db_dump/
INSTALL_POST=install_post.sql
WORKDIR=${PWD}/htdocs
SSL=true
TZ=Europe/Berlin

7.1, 7.2, 7.3, 7.4

PHP_VERSION_SET=7.3
SHOP_URI=nanamarkt.de
NAMESPACE=nanamarkt
MAILHOG_EXTERNAL_PORT=8025
MAILHOG_PORT=1025
MYSQL_DATABASE=nanamarkt
MYSQL_USER=nanamarkt
thanks

@aliuosio
Copy link
Owner

@hermersnana
okay, we have the following problem with the SHOP_URI at the moment:
if you run install.sh the file .env.template is copied to .env
if you run docker-compose up -d the values from .env are used.
But during the installation process with .env the SHOP_URI has already been written to the database table core_config_data setting the rows for shop url and cookie name .

so two tasks come to my mind.

  1. install.sh has to check if .env is already there and not overwrite it if so.
  2. on docker-compose up -d the docker-entrypoint script has to write the SHOP_URI and cookie name to the database again.

i will write a quick script and inform you over this ticket.
Should be fast :-)

@hermersnana
Copy link
Author

thank you very much, it is better for me, that i wait for you update.:-)

@aliuosio
Copy link
Owner

aliuosio commented Apr 10, 2020

@hermersnana
Now .env is not overwritten if it exists.

  1. get the latest sources git fetch && git pull
  2. delete rm -rf htdocs/* # OPTIONAL if you don't want to use sampledata again
  3. run ./install.sh again

then try letsencrypt...
if there is a problem with the letysencrypt i would look at it next week 😞

if SHOP_URI is changed in .env.
It has no affect on docker-compose -up d
i will add this to the TODO list in README.md

@hermersnana
Copy link
Author

done

@hermersnana hermersnana reopened this Apr 17, 2020
@aliuosio
Copy link
Owner

@hermersnana
get yourself the latest version and just run install.sh.
Takes care of all configs.

The one for Lets Encrypt ist still in work but should come out End of Next week.
Till then Use the Instructions for that in the README.

@hermersnana
Copy link
Author

ok, thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants