Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #22

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Binary file added .DS_Store
Binary file not shown.
36 changes: 0 additions & 36 deletions .env.example

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.vercel
52 changes: 52 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Use the official PHP image with Apache
FROM php:8.2-apache

# Install dependencies and PHP extensions in smaller steps with error logs
RUN apt-get update || tail -n 100 /var/log/apt/term.log
RUN apt-get install -y apt-utils || tail -n 100 /var/log/apt/term.log
RUN apt-get install -y libzip-dev zip unzip libonig-dev libxml2-dev libicu-dev default-mysql-client || tail -n 100 /var/log/apt/term.log

# Install additional common libraries required for PHP extensions
RUN apt-get install -y libpng-dev libjpeg62-turbo-dev libfreetype6-dev || tail -n 100 /var/log/apt/term.log

# Install and configure PHP extensions one by one
RUN docker-php-ext-install pdo pdo_mysql || tail -n 100 /var/log/apt/term.log
RUN docker-php-ext-install mbstring || tail -n 100 /var/log/apt/term.log
RUN docker-php-ext-install zip || tail -n 100 /var/log/apt/term.log
RUN docker-php-ext-install bcmath || tail -n 100 /var/log/apt/term.log
RUN docker-php-ext-install tokenizer || tail -n 100 /var/log/apt/term.log

# Configure and install the intl extension separately
RUN apt-get install -y libicu-dev || tail -n 100 /var/log/apt/term.log
RUN docker-php-ext-configure intl || tail -n 100 /var/log/apt/term.log
RUN docker-php-ext-install intl || tail -n 100 /var/log/apt/term.log

# Enable Apache rewrite module
RUN a2enmod rewrite

# Install Composer
COPY --from=composer:2.6 /usr/bin/composer /usr/local/bin/composer

# Copy the Laravel app into the container
COPY . /var/www/html

# Set the working directory
WORKDIR /var/www/html

# Install Laravel dependencies using Composer
RUN composer install --no-dev --optimize-autoloader || tail -n 100 /var/log/apt/term.log

# Set correct permissions for Laravel
RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
RUN chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache

# Expose port 80 for Apache
EXPOSE 80

# Clean up apt cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# Configure Apache to serve the public directory
COPY ./docker/000-default.conf /etc/apache2/sites-available/000-default.conf


1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: vendor/bin/heroku-php-apache2 public/
5 changes: 5 additions & 0 deletions api/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
// api/index.php

// Point to the Laravel entry point
require __DIR__ . '/../public/index.php';
Binary file added app/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion app/Http/Livewire/Auth/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function mount() {
if(auth()->user()){
redirect('/dashboard');
}
$this->fill(['email' => 'admin@softui.com', 'password' => 'secret']);
$this->fill(['email' => 'amirihsan7@gmail.com', 'password' => 'secret']);
}

public function login() {
Expand Down
Binary file added bootstrap/.DS_Store
Binary file not shown.
Loading