Skip to content
Merged

fix #311

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 23 additions & 22 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,43 @@ RUN apt-get update && \
libssl-dev \
zlib1g-dev \
libjpeg-dev \
libfreetype6-dev \
nodejs \
npm && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
libfreetype6-dev && \
apt-get clean

RUN docker-php-ext-install pdo pdo_mysql zip gd && \

RUN docker-php-ext-install \
pdo \
pdo_mysql \
zip \
gd && \
a2enmod rewrite

COPY ./docker/vhost.conf /etc/apache2/sites-available/000-default.conf
COPY ./ /var/www/html

COPY --from=composer /usr/bin/composer /usr/local/bin/composer

WORKDIR /var/www/html

COPY composer.json composer.lock ./
RUN composer install --prefer-dist --no-scripts --no-autoloader

COPY package.json package-lock.json ./

RUN npm install

COPY . .

COPY --from=composer /usr/bin/composer /usr/bin/composer

RUN composer dump-autoload --optimize
RUN chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache /var/www/html/public \
&& chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache /var/www/html/public

RUN composer install --prefer-dist --optimize-autoloader

RUN npm run production

COPY ./docker/vhost.conf /etc/apache2/sites-available/000-default.conf
RUN php artisan l5-swagger:generate


RUN mkdir -p storage/framework/sessions \
storage/framework/views \
storage/framework/cache \
&& chown -R www-data:www-data storage bootstrap/cache \
&& chmod -R 775 storage bootstrap/cache
&& chmod -R 775 storage bootstrap/cache \
&& chown -R www-data:www-data storage bootstrap/cache

RUN php artisan l5-swagger:generate

RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y nodejs && \
node -v && npm -v

RUN npm install && npm run production
Loading