docker fix

This commit is contained in:
Milos Stojanovic
2021-07-28 16:05:34 +02:00
parent 247b047845
commit 8db4098f7e
2 changed files with 6 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
FROM php:7-apache-buster FROM php:7-apache-buster
ENV APACHE_DOCUMENT_ROOT /var/www/filegator/ ENV APACHE_DOCUMENT_ROOT=/var/www/filegator/
RUN apt-get update > /dev/null && \ RUN apt-get update > /dev/null && \
# Install and enable php zip extension # Install and enable php zip extension
@@ -18,14 +18,15 @@ RUN apt-get update > /dev/null && \
<VirtualHost *:80> \n\ <VirtualHost *:80> \n\
DocumentRoot /var/www/filegator/dist\n\ DocumentRoot /var/www/filegator/dist\n\
</VirtualHost>\n\ </VirtualHost>\n\
' >> /etc/apache2/sites-available/filegator.conf && \ ' > /etc/apache2/sites-enabled/000-default.conf && \
# configure php # configure php
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" && \ mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" && \
# cleanup apt # cleanup apt
apt-get purge -y wget unzip && \ apt-get purge -y wget unzip && \
apt-get autoclean -y && \ apt-get autoclean -y && \
rm -Rf /var/lib/apt/lists/* rm -Rf /var/lib/apt/lists/* && \
service apache2 restart
EXPOSE 80 EXPOSE 80
VOLUME /var/www/filegator/repository VOLUME /var/www/filegator/repository

View File

@@ -5,7 +5,7 @@ services:
image: filegator:latest image: filegator:latest
restart: always restart: always
ports: ports:
- "80:80" - "8080:80"
volumes: volumes:
- repository:/var/www/filegator/repository - repository:/var/www/filegator/repository
- private:/var/www/filegator/private - private:/var/www/filegator/private