Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. FROM composer:latest AS composer
  2.  
  3. # continue with the official PHP image
  4. FROM php:7.2-fpm-stretch
  5.  
  6. RUN apt-get update && apt-get install -y
  7. supervisor
  8. nginx
  9. zip
  10.  
  11. RUN docker-php-ext-install pdo pdo_mysql
  12.  
  13. ADD docker/nginx.conf /etc/nginx/nginx.conf
  14. ADD docker/virtualhost.conf /etc/nginx/conf.d/default.conf
  15. ADD docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
  16.  
  17. COPY --chown=root:www-data . /var/www/html/app
  18.  
  19. # copy the Composer PHAR from the Composer image into the PHP image
  20. COPY --from=composer /usr/bin/composer /usr/bin/composer
  21.  
  22. WORKDIR /var/www/html/app
  23.  
  24. COPY ./.env.local .env
  25.  
  26. RUN chmod -R g+w /var/www/html/app/storage
  27. RUN chmod -R g+w /var/www/html/app/bootstrap
  28. RUN composer install
  29. RUN php artisan key:generate
  30.  
  31. EXPOSE 80
  32.  
  33. CMD ["/usr/bin/supervisord"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement