28 lines
656 B
Docker
28 lines
656 B
Docker
FROM php:8.2-cli
|
|
|
|
# Set timezone
|
|
ENV TZ=UTC
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
|
|
# Install dependencies required by Laravel & Postgres
|
|
RUN apt-get update && apt-get install -y \
|
|
libpq-dev \
|
|
unzip \
|
|
git \
|
|
zip
|
|
|
|
# Install required PHP extensions
|
|
RUN docker-php-ext-install pdo pdo_pgsql
|
|
|
|
# Install Composer
|
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
|
|
|
# Set working directory
|
|
WORKDIR /var/www
|
|
|
|
# Expose port 8000 for artisan serve
|
|
EXPOSE 8000
|
|
|
|
# Default command to start the Laravel development server
|
|
CMD ["php", "apps/backend/artisan", "serve", "--host=0.0.0.0", "--port=8000"]
|