minor changes

This commit is contained in:
Tiago Sousa 2023-10-31 13:47:04 +00:00
parent deb800348f
commit e4287b20f0

View file

@ -1,8 +1,9 @@
# Dockerfile for the laravel.io application # Dockerfile for the laravel.io application
ARG SEED_DATA=false
FROM ubuntu:22.04 FROM ubuntu:22.04
ARG SEED_DATA="false"
RUN apt update RUN apt update
# install system dependencies # install system dependencies
RUN apt install software-properties-common git -y RUN apt install software-properties-common git -y
@ -11,6 +12,8 @@ RUN git clone https://github.com/laravelio/laravel.io.git /app/laravel
WORKDIR /app/laravel WORKDIR /app/laravel
RUN mv .env.example .env
# add php apt repo # add php apt repo
RUN add-apt-repository ppa:ondrej/php RUN add-apt-repository ppa:ondrej/php
@ -27,11 +30,10 @@ ENV DB_PASSWORD=password
RUN composer install RUN composer install
RUN mv .env.example .env
RUN php artisan key:generate RUN php artisan key:generate
# seed data if build arg is provided # seed data if build arg is provided
RUN if [ $SEED_DATA = true ]; then php artisan migrate --seed; fi RUN if [ "$SEED_DATA" = true ]; then php artisan migrate --seed; fi
RUN npm install RUN npm install
RUN npm run build RUN npm run build