Skip to content

Commit

Permalink
再次变更
Browse files Browse the repository at this point in the history
  • Loading branch information
AkarinLiu committed Mar 25, 2024
1 parent e472660 commit e639e95
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@ RUN a2enmod rewrite
COPY php.ini /etc/php/8.2/apache2/php.ini
COPY 000-default.conf /etc/apache2/sites-available/000-default.conf
RUN composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
RUN composer create-project flarum/flarum /flarum
RUN chown -R www-data:www-data /flarum
RUN chmod -R 755 /flarum
ENTRYPOINT if [ -f /var/www/html/site.php ]; then \
echo 'skipping...'; \
else \
echo 'Copying Flarum...'; \
cp -r /flarum/* /var/www/html/; \
chown -R $(id -u www-data):$(id -g www-data) /var/www/html/; \
chmod -R 755 /var/www/html/; \
echo 'Flarum installed.'; \
echo 'Downloading Flarum...'; \
rm -rf /var/www/html/* ; \
composer create-project flarum/flarum /var/www/html ; \
chown -R www-data:www-data /var/www/html/ ; \
chmod -R 755 /var/www/html/ ; \
echo 'Flarum installed.' \
fi

VOLUME [ "/var/www/html" ]
EXPOSE 80
CMD ["apache2ctl", "-D", "FOREGROUND"]

0 comments on commit e639e95

Please sign in to comment.