Skip to content

Commit

Permalink
Merge pull request #271 from handhikadj/dev_for_new_features
Browse files Browse the repository at this point in the history
propose better docker setup
  • Loading branch information
changeweb authored Oct 24, 2020
2 parents 37421b3 + 38ef46d commit d6eccec
Show file tree
Hide file tree
Showing 521 changed files with 650 additions and 140 deletions.
Empty file modified .editorconfig
100644 → 100755
Empty file.
Empty file modified .env.dusk.example
100644 → 100755
Empty file.
9 changes: 6 additions & 3 deletions .env.example
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ APP_LOG_LEVEL=debug
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_HOST=db
DB_PORT=3306
DB_DATABASE=school
DB_USERNAME=root
DB_PASSWORD=
DB_PASSWORD=schoolapp

DOCKER_WEBSERVER_HOST=4049
DOCKER_PHPMYADMIN_HOST=5051

BROADCAST_DRIVER=log
CACHE_DRIVER=file
Expand All @@ -35,4 +38,4 @@ PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

STRIPE_KEY=
STRIPE_SECRET=
STRIPE_SECRET=
Empty file modified .gitattributes
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/bug_report.md
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/custom.md
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/feature_request.md
100644 → 100755
Empty file.
Empty file modified .github/workflows/greetings.yml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .php_cs
100644 → 100755
Empty file.
Empty file modified .phpunit.result.cache
100644 → 100755
Empty file.
Empty file modified .travis.yml
100644 → 100755
Empty file.
Empty file modified .vscode/launch.json
100644 → 100755
Empty file.
Empty file modified .vscode/settings.json
100644 → 100755
Empty file.
Empty file modified CODE_OF_CONDUCT.md
100644 → 100755
Empty file.
Empty file modified CONTRIBUTING.md
100644 → 100755
Empty file.
53 changes: 0 additions & 53 deletions Dockerfile

This file was deleted.

Empty file modified FUNDING.yml
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified _config.yml
100644 → 100755
Empty file.
Empty file modified app/Account.php
100644 → 100755
Empty file.
Empty file modified app/AccountSector.php
100644 → 100755
Empty file.
Empty file modified app/Attendance.php
100644 → 100755
Empty file.
Empty file modified app/Book.php
100644 → 100755
Empty file.
Empty file modified app/Certificate.php
100644 → 100755
Empty file.
Empty file modified app/Console/Kernel.php
100644 → 100755
Empty file.
Empty file modified app/Course.php
100644 → 100755
Empty file.
Empty file modified app/Department.php
100644 → 100755
Empty file.
Empty file modified app/Event.php
100644 → 100755
Empty file.
Empty file modified app/Events/StudentInfoUpdateRequested.php
100644 → 100755
Empty file.
Empty file modified app/Events/UserRegistered.php
100644 → 100755
Empty file.
Empty file modified app/Exam.php
100644 → 100755
Empty file.
Empty file modified app/ExamForClass.php
100644 → 100755
Empty file.
Empty file modified app/Exceptions/Handler.php
100644 → 100755
Empty file.
Empty file modified app/Exports/StudentsExport.php
100644 → 100755
Empty file.
Empty file modified app/Exports/TeachersExport.php
100644 → 100755
Empty file.
Empty file modified app/Faq.php
100644 → 100755
Empty file.
Empty file modified app/Fee.php
100644 → 100755
Empty file.
Empty file modified app/Feedback.php
100644 → 100755
Empty file.
Empty file modified app/Form.php
100644 → 100755
Empty file.
Empty file modified app/Grade.php
100644 → 100755
Empty file.
Empty file modified app/Gradesystem.php
100644 → 100755
Empty file.
Empty file modified app/Homework.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/AccountController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/AttendanceController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Auth/ForgotPasswordController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Auth/LoginController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Auth/RegisterController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Auth/ResetPasswordController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/CashierController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/CertificateController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Controller.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/CourseController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/EventController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/ExamController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/FaqController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/FeeController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/FeedbackController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/FormController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/GradeController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/GradesystemController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/HomeController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/HomeworkController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/IssuedbookController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Library/BookController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/MasterController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/MessageController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/MyclassController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/NoticeController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/NotificationController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/PaymentController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/RoutineController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/SchoolController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/SectionController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/SettingController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/SyllabusController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/UploadController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/UploadHandler.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/UserController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Kernel.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/CheckAccountant.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/CheckAdmin.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/CheckLibrarian.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/CheckMaster.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/CheckMasterOrAdmin.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/CheckStudent.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/CheckTeacher.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/CheckTeacherOrStudent.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/EncryptCookies.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/RedirectIfAuthenticated.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/TrimStrings.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/TrustProxies.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/VerifyCsrfToken.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/Account/StoreAccountRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/Account/StoreSectorRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/Account/UpdateAccountRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/Attendance/StoreAttendanceRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/Course/SaveConfigurationRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/Exam/CreateExamRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/Grade/CalculateMarksRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/Library/BookRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/SchoolRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/User/ChangePasswordRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/User/CreateAccountantRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/User/CreateAdminRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/User/CreateLibrarianRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/User/CreateTeacherRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/User/CreateUserRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/User/ImpersonateUserRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/User/UpdateUserRequest.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/AttendanceResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/BookResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/ClassResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/CourseResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/EventResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/FaqResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/FeedbackResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/FormResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/GradeResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/HomeworkResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/MessageResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/NoticeResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/NotificationResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/RoutineResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/SchoolResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/SectionResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/SyllabusResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Resources/UserResource.php
100644 → 100755
Empty file.
Empty file modified app/Http/Traits/GradeTrait.php
100644 → 100755
Empty file.
Empty file modified app/Imports/FirstStudentSheetImport.php
100644 → 100755
Empty file.
Empty file modified app/Imports/FirstTeacherSheetImport.php
100644 → 100755
Empty file.
Empty file modified app/Imports/StudentsImport.php
100644 → 100755
Empty file.
Empty file modified app/Imports/TeachersImport.php
100644 → 100755
Empty file.
Empty file modified app/Issuedbook.php
100644 → 100755
Empty file.
Empty file modified app/Listeners/SendWelcomeEmail.php
100644 → 100755
Empty file.
Empty file modified app/Listeners/UpdateStudentInfo.php
100644 → 100755
Empty file.
Empty file modified app/Mail/SendWelcomeEmailToUser.php
100644 → 100755
Empty file.
Empty file modified app/Message.php
100644 → 100755
Empty file.
Empty file modified app/Model.php
100644 → 100755
Empty file.
Empty file modified app/Myclass.php
100644 → 100755
Empty file.
Empty file modified app/Notice.php
100644 → 100755
Empty file.
Empty file modified app/Notification.php
100644 → 100755
Empty file.
Empty file modified app/Payment.php
100644 → 100755
Empty file.
Empty file modified app/Providers/AppServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/Providers/AuthServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/Providers/BroadcastServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/Providers/EventServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/Providers/RouteServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/Routine.php
100644 → 100755
Empty file.
Empty file modified app/School.php
100644 → 100755
Empty file.
Empty file modified app/Section.php
100644 → 100755
Empty file.
Empty file modified app/Services/Account/AccountService.php
100644 → 100755
Empty file.
Empty file modified app/Services/Attendance/AttendanceService.php
100644 → 100755
Empty file.
Empty file modified app/Services/Course/CourseService.php
100644 → 100755
Empty file.
Empty file modified app/Services/Exam/ExamService.php
100644 → 100755
Empty file.
Empty file modified app/Services/Grade/GradeService.php
100644 → 100755
Empty file.
Empty file modified app/Services/IssueBook/IssuedBookService.php
100644 → 100755
Empty file.
Empty file modified app/Services/User/UserService.php
100644 → 100755
Empty file.
Empty file modified app/StudentBoardExam.php
100644 → 100755
Empty file.
Empty file modified app/StudentInfo.php
100644 → 100755
Empty file.
Empty file modified app/Syllabus.php
100644 → 100755
Empty file.
Empty file modified app/User.php
100644 → 100755
Empty file.
Empty file modified artisan
100644 → 100755
Empty file.
Empty file modified bootstrap/app.php
100644 → 100755
Empty file.
Empty file modified bootstrap/cache/.gitignore
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions composer.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"@php artisan key:generate"
],
"post-install-cmd": [
"@php artisan key:generate",
"@php artisan passport:keys"
],
"post-autoload-dump": [
Expand Down
Empty file modified composer.lock
100644 → 100755
Empty file.
Empty file modified config/app.php
100644 → 100755
Empty file.
Empty file modified config/auth.php
100644 → 100755
Empty file.
Empty file modified config/broadcasting.php
100644 → 100755
Empty file.
Empty file modified config/cache.php
100644 → 100755
Empty file.
Empty file modified config/database.php
100644 → 100755
Empty file.
Empty file modified config/filesystems.php
100644 → 100755
Empty file.
Empty file modified config/mail.php
100644 → 100755
Empty file.
Empty file modified config/queue.php
100644 → 100755
Empty file.
Empty file modified config/services.php
100644 → 100755
Empty file.
Empty file modified config/session.php
100644 → 100755
Empty file.
Empty file modified config/view.php
100644 → 100755
Empty file.
Empty file modified database/.gitignore
100644 → 100755
Empty file.
Empty file modified database/factories/AccountFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/AccountSectorFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/AttendanceFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/BookFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/CertificateFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/CourseFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/DepartmentFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/EventFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/ExamFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/ExamForClassFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/FaqFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/FeeFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/FeedbackFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/FormFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/GradeFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/GradesystemFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/HomeworkFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/IssuedbooksFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/MessageFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/MyclassFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/NoticeFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/NotificationFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/PaymentFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/RoutineFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/SchoolFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/SectionFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/StudentboardexamFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/StudentinfoFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/SyllabusFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/UserFactory.php
100644 → 100755
Empty file.
Empty file modified database/migrations/2014_10_12_000000_create_schools_table.php
100644 → 100755
Empty file.
Empty file modified database/migrations/2014_10_12_100000_create_users_table.php
100644 → 100755
Empty file.
Empty file modified database/migrations/2017_12_21_065735_create_exams_table.php
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified database/migrations/2017_12_27_025413_create_classes_table.php
100644 → 100755
Empty file.
Empty file modified database/migrations/2017_12_27_025427_create_sections_table.php
100644 → 100755
Empty file.
Empty file.
Empty file modified database/migrations/2017_12_27_025503_create_notices_table.php
100644 → 100755
Empty file.
Empty file modified database/migrations/2017_12_27_025512_create_events_table.php
100644 → 100755
Empty file.
Empty file.
Empty file modified database/migrations/2017_12_27_025542_create_routines_table.php
100644 → 100755
Empty file.
Empty file modified database/migrations/2017_12_27_025556_create_grades_table.php
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified database/migrations/2017_12_27_025644_create_books_table.php
100644 → 100755
Empty file.
Empty file modified database/migrations/2017_12_27_025727_create_courses_table.php
100644 → 100755
Empty file.
Empty file modified database/migrations/2017_12_27_025738_create_forms_table.php
100644 → 100755
Empty file.
Empty file modified database/migrations/2017_12_27_025751_create_messages_table.php
100644 → 100755
Empty file.
Empty file modified database/migrations/2017_12_27_025806_create_faqs_table.php
100644 → 100755
Empty file.
Empty file modified database/migrations/2018_02_06_161642_create_fees_table.php
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified database/migrations/2018_04_01_195635_create_accounts_table.php
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified database/migrations/2019_05_10_193135_create_payments_table.php
100644 → 100755
Empty file.
Empty file.
Empty file modified database/seeds/AccountSectorsTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/AccountsTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/AttendancesTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/BooksTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/CertificateTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/ClassesTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/CoursesTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/DatabaseSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/DepartmentTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/EventsTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/ExamForClassesTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/ExamsTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/FaqsTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/FeedbacksTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/FeesTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/FormsTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/GradesTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/GradesystemsTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/HomeworksTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/IssuedbooksTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/MessagesTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/NoticesTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/NotificationsTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/RoutinesTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/SchoolsTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/SectionsTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/StudentboardexamsTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/StudentinfosTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/SyllabusesTableSeeder.php
100644 → 100755
Empty file.
Empty file modified database/seeds/UsersTableSeeder.php
100644 → 100755
Empty file.
127 changes: 85 additions & 42 deletions docker-compose.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,66 +1,109 @@
version: '3'

#Docker Networks
networks:
app-network:
driver: bridge

#Volumes
volumes:
dbdata:
driver: local

services:

#PHP Service
app:
#Nginx Service
nginx:
build:
context: .
dockerfile: Dockerfile
image: digitalocean.com/php
container_name: app
restart: unless-stopped
tty: true
environment:
SERVICE_NAME: app
SERVICE_TAGS: dev
working_dir: /var/www
volumes:
- ./:/var/www
- ./php/local.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- app-network

#Nginx Service
webserver:
image: nginx:alpine
container_name: webserver
restart: unless-stopped
tty: true
dockerfile: ./docker/nginx.dockerfile
container_name: nginx
ports:
- "80:80"
- "443:443"
- "${DOCKER_WEBSERVER_HOST}:80"
volumes:
- ./:/var/www
- ./nginx/conf.d/:/etc/nginx/conf.d/
- .:/var/www/html
depends_on:
- php
- db
networks:
- app-network

#MySQL Service
db:
image: mysql:5.7.22
image: mysql:latest
container_name: db
restart: unless-stopped
tty: true
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: school
MYSQL_ROOT_PASSWORD: x12345678y
MYSQL_USER: root
MYSQL_PASSWORD: x12345678y
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
SERVICE_TAGS: dev
SERVICE_NAME: mysql
volumes:
- dbdata:/var/lib/mysql/
- ./mysql/my.cnf:/etc/mysql/my.cnf
- dbdata:/var/lib/mysql
networks:
- app-network

#Docker Networks
networks:
app-network:
driver: bridge
#Volumes
volumes:
dbdata:
driver: local
#PHP Service
php:
build:
context: .
dockerfile: ./docker/php.dockerfile
container_name: php
volumes:
- .:/var/www/html
ports:
- "9000:9000"
networks:
- app-network

#Composer Service
composer:
build:
context: .
dockerfile: ./docker/composer.dockerfile
container_name: composer
volumes:
- .:/var/www/html
working_dir: /var/www/html
depends_on:
- php
user: laravel
networks:
- app-network
entrypoint: [ 'composer', '--ignore-platform-reqs' ]

#Artisan Service
artisan:
build:
context: .
dockerfile: ./docker/php.dockerfile
container_name: artisan
volumes:
- .:/var/www/html
depends_on:
- db
working_dir: /var/www/html
user: laravel
entrypoint: [ 'php', '/var/www/html/artisan' ]
networks:
- app-network

#PHPMyAdmin Service
phpmyadmin:
depends_on:
- db
image: phpmyadmin/phpmyadmin:latest
container_name: phpmyadmin
restart: always
ports:
- '${DOCKER_PHPMYADMIN_HOST}:80'
environment:
PMA_HOST: db
UPLOAD_LIMIT: 3000000000
networks:
- app-network
15 changes: 15 additions & 0 deletions docker-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
if ! [ -x "$(command -v docker-compose)" ]; then
echo 'docker-compose is not installed thus cannot scaffold your app. Sorry, bud...' >&2
sleep 1
exit 1
fi

echo "Scaffolding your app using Docker... This will take a while..."
sleep 1
sudo docker-compose up -d
sudo docker-compose run --rm composer install
sudo docker-compose run --rm artisan migrate:fresh

export $(grep -v '#.*' .env | xargs)
echo "\nUnifiedtransform is ready on localhost:$DOCKER_WEBSERVER_HOST and localhost:$DOCKER_PHPMYADMIN_HOST for the PHPMyAdmin\n"
sleep 1
5 changes: 5 additions & 0 deletions docker/composer.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM composer:latest

RUN addgroup -g 1000 laravel && adduser -G laravel -g laravel -s /bin/sh -D laravel

WORKDIR /var/www/html
10 changes: 10 additions & 0 deletions docker/nginx.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM nginx:stable-alpine

ADD ./docker/nginx/nginx.conf /etc/nginx/nginx.conf
ADD ./docker/nginx/default.conf /etc/nginx/conf.d/default.conf

RUN mkdir -p /var/www/html

RUN addgroup -g 1000 laravel && adduser -G laravel -g laravel -s /bin/sh -D laravel

RUN chown laravel:laravel /var/www/html
18 changes: 10 additions & 8 deletions nginx/conf.d/app.conf → docker/nginx/default.conf
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
server {
listen 80;
index index.php index.html;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www/public;
server_name localhost;
root /var/www/html/public;

location / {
root /var/www/html/public;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php$is_args$args;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass app:9000;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
gzip_static on;
}
}
29 changes: 29 additions & 0 deletions docker/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
user laravel;
worker_processes auto;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

include /etc/nginx/conf.d/*.conf;
}
14 changes: 14 additions & 0 deletions docker/php.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM php:7.4-fpm-alpine

ADD ./docker/php/www.conf /usr/local/etc/php-fpm.d/www.conf
ADD ./docker/php/php.ini /usr/local/etc/php/php.ini

RUN addgroup -g 1000 laravel && adduser -G laravel -g laravel -s /bin/sh -D laravel

RUN mkdir -p /var/www/html

RUN chown laravel:laravel /var/www/html

WORKDIR /var/www/html

RUN docker-php-ext-install pdo pdo_mysql
4 changes: 4 additions & 0 deletions docker/php/php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
memory_limit = 64M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 90
Loading

0 comments on commit d6eccec

Please sign in to comment.