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:
17
Dockerfile
17
Dockerfile
@@ -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"]
|
Reference in New Issue
Block a user