1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-16 19:14:18 +02:00

Add basic documentation to docker installation + initialize empty folders for themes and content

This commit is contained in:
matbgn
2022-05-19 00:55:08 +02:00
parent 2932b457e9
commit 505f36b0b9
3 changed files with 54 additions and 3 deletions

View File

@@ -10,19 +10,30 @@ RUN a2enmod rewrite \
# Install PHP ext-gd
RUN docker-php-ext-install gd
# Copy app content
# Use the .dockerignore file to control what ends up inside the image!
WORKDIR /var/www/html
COPY . .
# Install server dependencies
RUN chmod +x /var/www/html/docker-utils/install-composer && \
/var/www/html/docker-utils/install-composer && \
./composer.phar update && \
chmod +x /var/www/html/docker-utils/init-server
# Expose useful volumes (see documentation)
VOLUME /var/www/html/settings
VOLUME /var/www/html/content
VOLUME /var/www/html/media
VOLUME /var/www/html/themes
VOLUME /var/www/html/cache
# Run the server
# Create a default copy of content and theme in case of empty directories binding
RUN mkdir -p /var/www/html/content.default/ && \
cp -R /var/www/html/content/* /var/www/html/content.default/ && \
mkdir -p /var/www/html/themes.default/ && \
cp -R /var/www/html/themes/* /var/www/html/themes.default/
VOLUME /var/www/html/content
VOLUME /var/www/html/themes
# Inject default values if content and themes are mounted with empty directories, adjust rights and start the server
CMD ["/var/www/html/docker-utils/init-server"]