mirror of
https://github.com/standardebooks/web.git
synced 2025-07-13 18:11:52 -04:00
Fix key generation in Docker
We were generating the key in the Dockerfile, but then mounting the host’s web directory, which “obscured” (to quote the Docker docs) the directory in the container. We can move key generation to the container entrypoint, but only call it if the key doesn’t already exist to save time on container teardown / restart.
This commit is contained in:
parent
c36fde5c8c
commit
c606dea993
2 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ ! -f /standardebooks.org/web/config/ssl/standardebooks.test.crt ]; then
|
||||
openssl req -x509 -nodes -days 99999 -newkey rsa:4096 -subj "/CN=standardebooks.test" -keyout /standardebooks.org/web/config/ssl/standardebooks.test.key -sha256 -out /standardebooks.org/web/config/ssl/standardebooks.test.crt
|
||||
fi
|
||||
|
||||
cd /standardebooks.org/web
|
||||
composer install
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue