carlasouza / docker-onetimesecret

Run One-Time Secret in a Docker container
7 stars 9 forks source link

"localhost" instead of the server ip #3

Open mitrasero opened 7 years ago

mitrasero commented 7 years ago

hi first thank you for your work !

the link generated has the word "localhost" instead of the server ip, or domain. http://localhost/secret/7m9sl2grvldolaA49slg57bdtsx90vno4

how do i change that behavior ?

adrianhalid commented 5 years ago

Have you tried to configure the site host and domain option?

adrianhalid commented 5 years ago

https://github.com/carlasouza/docker-onetimesecret/blob/master/config/config

SterlingAAA commented 5 years ago

I have this same issue. I have configured both the site host and domain options with :site: :host: onetime.ourdomain.com :domain: ourdomain.com :ssl: false

adrianhalid commented 5 years ago

I set the host and domain to be the same value. For Example

:host: onetime.ourdomain.com :domain: onetime.ourdomain.com

I had to make sure these values were set in the config before I performed the docker-compose up command.

If I left these values as localhost and performed the docker-compose up then no matter what I changed the configuration to be later it would always just stay as localhost. I did this the first time I set it up.

I then had to completely remove the docker container and perform a build or rebuild of the container for it to use the configured host values. I can't remember the exact command but it think it was the docker-compose down. Then used some of the docker prune commands to make sure they were deleted. Then used something like docker-compose build --no-cache to force a new build. But it was a while ago and I can't remember the exact commands.

The next time I set up one time secret I just made sure I had the config file correct before I ran the docker-compose up command.