fix this thing, but db error on startup

This commit is contained in:
Afonso Franco 2023-11-06 20:04:20 +00:00
parent 367397f39c
commit 2e272eb147
Signed by: afonso
SSH key fingerprint: SHA256:JiuxZNdA5bRWXPMUJChI0AQ75yC+cXY4xM0IaVwEVys
13 changed files with 5 additions and 2 deletions

View file

@ -1,41 +0,0 @@
# Dockerfile for the laravel.io application
FROM ubuntu:22.04
ARG SEED_DATA="false"
RUN apt update
# install system dependencies
RUN apt install software-properties-common git -y
RUN git clone https://github.com/laravelio/laravel.io.git /app/laravel
WORKDIR /app/laravel
RUN mv .env.example .env
# add php apt repo
RUN add-apt-repository ppa:ondrej/php
RUN apt update
# install app dependencies
RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Lisbon apt install php8.2 php8.2-simplexml php8.2-curl php8.2-dom composer npm -y
ENV DB_CONNECTION=mysql
ENV DB_HOST=laraveldb
ENV DB_DATABASE=laravel
ENV DB_USERNAME=root
ENV DB_PASSWORD=password
RUN composer install
RUN php artisan key:generate
# seed data if build arg is provided
RUN if [ "$SEED_DATA" = true ]; then php artisan migrate --seed; fi
RUN npm install
RUN npm run build
EXPOSE 8000