Skip to content

Commit

Permalink
Improving Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
axeloz committed Jul 5, 2023
1 parent f31e5e3 commit 3504b0a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ RUN apt-get update && apt-get install -y yarn
# SETTING WORKDIR AND ENV
ENV WEB_DOCUMENT_ROOT /app/public
ENV APP_ENV production
COPY . /app
WORKDIR /app

# DOWNLOADING LATEST PACKAGE OF FILESHARING
RUN curl -stdout "https://api.github.com/repos/axeloz/filesharing/releases/latest" | grep -E -o '[^"]+tarball[^"]+' | xargs wget -O latest.tar -q
RUN tar zxvf latest.tar --strip-components=1


# INSTALLING THE CRONTAB
RUN { echo "* * * * * php /app/artisan schedule:run >> /dev/null 2>&1"; } | crontab -
Expand All @@ -43,9 +42,8 @@ RUN composer install --no-interaction --optimize-autoloader --no-dev
RUN chown -R www-data:www-data /app

# SETUP OF FILESHARING
RUN cp -n .env.example .env
RUN php artisan key:generate
RUN php artisan config:cache
RUN cp .docker/.env .
RUN php artisan key:generate --force
RUN php artisan route:cache
RUN php artisan view:cache
RUN php artisan orbit:clear
Expand Down

0 comments on commit 3504b0a

Please sign in to comment.