mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 21:13:16 +00:00
Handle storage folder creation properly
This commit is contained in:
parent
ecd867fa30
commit
964b8e5d63
2 changed files with 8 additions and 8 deletions
|
@ -5,7 +5,7 @@ ARG COMPOSER_CHECKSUM="67bebe9df9866a795078bb2cf21798d8b0214f2e0b2fd81f2e907a8ef
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends libmagickwand-dev git \
|
&& apt-get install -y --no-install-recommends libmagickwand-dev git \
|
||||||
&& docker-php-ext-install pdo_mysql pcntl \
|
&& docker-php-ext-install pdo_mysql pcntl gd \
|
||||||
&& pecl install imagick \
|
&& pecl install imagick \
|
||||||
&& docker-php-ext-enable imagick pcntl imagick \
|
&& docker-php-ext-enable imagick pcntl imagick \
|
||||||
&& a2enmod rewrite \
|
&& a2enmod rewrite \
|
||||||
|
@ -15,6 +15,8 @@ RUN apt-get update \
|
||||||
&& ln -sf /usr/bin/composer.phar /usr/bin/composer \
|
&& ln -sf /usr/bin/composer.phar /usr/bin/composer \
|
||||||
&& rm /tmp/composer.phar
|
&& rm /tmp/composer.phar
|
||||||
|
|
||||||
|
ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"
|
||||||
|
|
||||||
COPY . /var/www/
|
COPY . /var/www/
|
||||||
|
|
||||||
WORKDIR /var/www/
|
WORKDIR /var/www/
|
||||||
|
@ -25,11 +27,11 @@ RUN install -d -m0755 -o www-data -g www-data \
|
||||||
/var/www/storage/framework/sessions \
|
/var/www/storage/framework/sessions \
|
||||||
/var/www/storage/framework/views \
|
/var/www/storage/framework/views \
|
||||||
/var/www/storage/framework/cache \
|
/var/www/storage/framework/cache \
|
||||||
|
&& cp -r storage storage.skel \
|
||||||
|
&& cp docker/env .env \
|
||||||
&& composer install --prefer-source --no-interaction \
|
&& composer install --prefer-source --no-interaction \
|
||||||
&& rm -rf html && ln -s public html
|
&& rm -rf html && ln -s public html
|
||||||
|
|
||||||
VOLUME ["/var/www/storage"]
|
VOLUME ["/var/www/storage"]
|
||||||
|
|
||||||
ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"
|
|
||||||
|
|
||||||
CMD /var/www/docker/start.sh
|
CMD /var/www/docker/start.sh
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
mkdir -p storage/app/public/avatars
|
cp -r storage.skel/* storage/
|
||||||
mkdir -p storage/{debugbar,logs}
|
php artisan migrate --force
|
||||||
mkdir -p storage/framework/{cache,sessions,views,testing}
|
|
||||||
php artisan migrate
|
|
||||||
|
|
||||||
exec apache2-foreground
|
exec apache2-foreground
|
||||||
|
|
Loading…
Reference in a new issue