added container file and entrypoint scripts
This commit is contained in:
parent
9b0d8c081a
commit
3653946225
6 changed files with 29 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1 @@
|
|||
config/config.ini
|
||||
config/services.ini
|
||||
config
|
||||
|
|
|
@ -2,6 +2,14 @@ FROM php:7.4-apache
|
|||
|
||||
COPY src/ /var/www/html/
|
||||
|
||||
COPY ./entrypoint.sh /
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
# Use the default production configuration
|
||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||
|
||||
RUN a2enmod rewrite
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
|
9
compose.yml
Normal file
9
compose.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
version: '3.3'
|
||||
services:
|
||||
davdiscover:
|
||||
container_name: davdiscover
|
||||
ports:
|
||||
- '8010:80'
|
||||
volumes:
|
||||
- './config:/var/www/html/config'
|
||||
image: pswilde/davdiscover
|
6
docker-run.sh
Normal file
6
docker-run.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
podman run --name davdiscover \
|
||||
--rm \
|
||||
-p "8010:80" \
|
||||
-v ./config:/var/www/html/config \
|
||||
pswilde/davdiscover
|
3
entrypoint.sh
Normal file
3
entrypoint.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
cp /var/www/html/sample-config/* /var/www/html/config/
|
||||
exec apache2-foreground
|
|
@ -29,6 +29,7 @@ class Init {
|
|||
// YOU REALLY SHOULD HAVE YOUR OWN CONFIG FILE!!!
|
||||
|
||||
if (!file_exists($config)) {
|
||||
echo copy(Core::root_dir()."/sample-config/services.sample.ini", $config);
|
||||
$config = Core::root_dir()."/sample-config/config.sample.ini";
|
||||
}
|
||||
|
||||
|
@ -39,6 +40,7 @@ class Init {
|
|||
// YOU REALLY SHOULD HAVE YOUR OWN SERVICES FILE!!!
|
||||
|
||||
if (!file_exists($services)) {
|
||||
echo copy(Core::root_dir()."/sample-config/services.sample.ini", $services);
|
||||
$services = Core::root_dir()."/sample-config/services.sample.ini";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue