mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 09:32:24 -04:00
Amend dockerfile to work with a bind mount
This will mount the current directory as the code for the site in the container.
This commit is contained in:
parent
0ffcb889e9
commit
39d21db8c7
3 changed files with 6 additions and 5 deletions
|
@ -6,11 +6,9 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|||
|
||||
RUN mkdir /standardebooks.org
|
||||
RUN mkdir /standardebooks.org/web
|
||||
RUN mkdir /standardebooks.org/web/config
|
||||
RUN mkdir /standardebooks.org/web/config/ssl
|
||||
RUN mkdir /var/log/local
|
||||
COPY . /standardebooks.org/web
|
||||
|
||||
WORKDIR /standardebooks.org/web
|
||||
RUN composer install
|
||||
|
||||
RUN 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
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ docker build . -t standardebooks
|
|||
Then run the built image with:
|
||||
|
||||
```shell
|
||||
docker run -dp 443:443 standardebooks:latest
|
||||
docker run -dp 443:443 -v "$(pwd):/standardebooks.org/web" standardebooks:latest
|
||||
```
|
||||
|
||||
The site will now be available at `https://localhost/`, although as it’s a self-signed certificate you’ll need to accept whatever browser security warnings come up.
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd /standardebooks.org/web
|
||||
composer install
|
||||
|
||||
ln -s /standardebooks.org/web/config/apache/standardebooks.test.conf /etc/apache2/sites-available/
|
||||
ln -s /standardebooks.org/web/config/php/fpm/standardebooks.org.ini /etc/php/*/cli/conf.d/
|
||||
ln -s /standardebooks.org/web/config/php/fpm/standardebooks.org.ini /etc/php/*/fpm/conf.d/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue