Update bug waiting laravel
This commit is contained in:
@@ -36,7 +36,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "8088:8080"
|
- "8088:8080"
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgresql
|
postgresql:
|
||||||
|
condition: service_healthy
|
||||||
command: php artisan serve --host=0.0.0.0 --port=8080
|
command: php artisan serve --host=0.0.0.0 --port=8080
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ WORKDIR /var/www/html
|
|||||||
# RUN composer create-project laravel/laravel:^10 /var/www/html
|
# RUN composer create-project laravel/laravel:^10 /var/www/html
|
||||||
|
|
||||||
# Set permission
|
# Set permission
|
||||||
RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
|
#RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
#CMD ["php-fpm"]
|
#CMD ["php-fpm"]
|
||||||
|
|||||||
@@ -11,13 +11,15 @@ return new class extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('samples', function (Blueprint $table) {
|
if (!Schema::hasTable('samples')) {
|
||||||
$table->id();
|
Schema::create('samples', function (Blueprint $table) {
|
||||||
$table->string('patient_name', 250)->nullable();
|
$table->id();
|
||||||
$table->string('test_details', 255)->nullable();
|
$table->string('patient_name', 250)->nullable();
|
||||||
$table->timestamp('created_at')->useCurrent();
|
$table->string('test_details', 255)->nullable();
|
||||||
$table->timestamp('updated_at')->useCurrent();
|
$table->timestamp('created_at')->useCurrent();
|
||||||
});
|
$table->timestamp('updated_at')->useCurrent();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -11,16 +11,18 @@ return new class extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('test_results', function (Blueprint $table) {
|
if (!Schema::hasTable('test_results')) {
|
||||||
$table->id(); // ID primary key
|
Schema::create('test_results', function (Blueprint $table) {
|
||||||
$table->unsignedBigInteger('sample_id'); // Kolom referensi
|
$table->id(); // ID primary key
|
||||||
$table->text('result'); // Kolom result
|
$table->unsignedBigInteger('sample_id'); // Kolom referensi
|
||||||
$table->string('status', 50); // Kolom status
|
$table->text('result'); // Kolom result
|
||||||
$table->timestamp('created_at')->useCurrent();
|
$table->string('status', 50); // Kolom status
|
||||||
$table->timestamp('updated_at')->useCurrent();
|
$table->timestamp('created_at')->useCurrent();
|
||||||
// Foreign key
|
$table->timestamp('updated_at')->useCurrent();
|
||||||
$table->foreign('sample_id')->references('id')->on('samples')->onDelete('cascade');
|
// Foreign key
|
||||||
});
|
$table->foreign('sample_id')->references('id')->on('samples')->onDelete('cascade');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ class DatabaseSeeder extends Seeder
|
|||||||
*/
|
*/
|
||||||
public function run(): void
|
public function run(): void
|
||||||
{
|
{
|
||||||
User::factory(10)->create();
|
User::create([
|
||||||
User::factory()->create([
|
|
||||||
'nama' => 'Administrator',
|
'nama' => 'Administrator',
|
||||||
'username' => 'admin',
|
'username' => 'admin',
|
||||||
'password' => bcrypt('semangat'),
|
'password' => bcrypt('semangat'),
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Tunggu database siap
|
|
||||||
until php artisan migrate:status > /dev/null 2>&1; do
|
|
||||||
echo "Waiting for database to be ready..."
|
|
||||||
sleep 3
|
|
||||||
done
|
|
||||||
|
|
||||||
# Cek apakah migration sudah pernah dijalankan
|
# Cek apakah migration sudah pernah dijalankan
|
||||||
if php artisan migrate:status | grep -q "| Y"; then
|
if php artisan migrate:status | grep -q "| Y"; then
|
||||||
|
|||||||
@@ -1590,3 +1590,43 @@ OBR|||1|TEST123^Exa
|
|||||||
2025-07-17 00:27:40,799 - ERROR - Failed to bind to port 6001: [Errno 98] Address already in use
|
2025-07-17 00:27:40,799 - ERROR - Failed to bind to port 6001: [Errno 98] Address already in use
|
||||||
2025-07-17 00:27:40,825 - WARNING - * Debugger is active!
|
2025-07-17 00:27:40,825 - WARNING - * Debugger is active!
|
||||||
2025-07-17 00:27:40,826 - INFO - * Debugger PIN: 139-464-079
|
2025-07-17 00:27:40,826 - INFO - * Debugger PIN: 139-464-079
|
||||||
|
2025-07-17 00:57:38,623 - INFO - Listening on TCP port 6001...
|
||||||
|
2025-07-17 00:57:38,798 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
|
||||||
|
* Running on all addresses (0.0.0.0)
|
||||||
|
* Running on http://127.0.0.1:5000
|
||||||
|
* Running on http://172.18.0.4:5000
|
||||||
|
2025-07-17 00:57:38,798 - INFO - [33mPress CTRL+C to quit[0m
|
||||||
|
2025-07-17 00:57:38,799 - INFO - * Restarting with stat
|
||||||
|
2025-07-17 00:57:42,059 - ERROR - Failed to bind to port 6001: [Errno 98] Address already in use
|
||||||
|
2025-07-17 00:57:42,102 - WARNING - * Debugger is active!
|
||||||
|
2025-07-17 00:57:42,111 - INFO - * Debugger PIN: 682-061-109
|
||||||
|
2025-07-17 01:07:55,681 - INFO - Listening on TCP port 6001...
|
||||||
|
2025-07-17 01:07:56,048 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
|
||||||
|
* Running on all addresses (0.0.0.0)
|
||||||
|
* Running on http://127.0.0.1:5000
|
||||||
|
* Running on http://172.18.0.3:5000
|
||||||
|
2025-07-17 01:07:56,048 - INFO - [33mPress CTRL+C to quit[0m
|
||||||
|
2025-07-17 01:07:56,050 - INFO - * Restarting with stat
|
||||||
|
2025-07-17 01:08:00,741 - ERROR - Failed to bind to port 6001: [Errno 98] Address already in use
|
||||||
|
2025-07-17 01:08:00,765 - WARNING - * Debugger is active!
|
||||||
|
2025-07-17 01:08:00,767 - INFO - * Debugger PIN: 455-916-409
|
||||||
|
2025-07-17 01:10:05,931 - INFO - Listening on TCP port 6001...
|
||||||
|
2025-07-17 01:10:06,006 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
|
||||||
|
* Running on all addresses (0.0.0.0)
|
||||||
|
* Running on http://127.0.0.1:5000
|
||||||
|
* Running on http://172.18.0.3:5000
|
||||||
|
2025-07-17 01:10:06,007 - INFO - [33mPress CTRL+C to quit[0m
|
||||||
|
2025-07-17 01:10:06,008 - INFO - * Restarting with stat
|
||||||
|
2025-07-17 01:10:10,441 - ERROR - Failed to bind to port 6001: [Errno 98] Address already in use
|
||||||
|
2025-07-17 01:10:10,464 - WARNING - * Debugger is active!
|
||||||
|
2025-07-17 01:10:10,465 - INFO - * Debugger PIN: 195-044-760
|
||||||
|
2025-07-17 01:11:48,115 - INFO - Listening on TCP port 6001...
|
||||||
|
2025-07-17 01:11:48,313 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
|
||||||
|
* Running on all addresses (0.0.0.0)
|
||||||
|
* Running on http://127.0.0.1:5000
|
||||||
|
* Running on http://172.18.0.3:5000
|
||||||
|
2025-07-17 01:11:48,314 - INFO - [33mPress CTRL+C to quit[0m
|
||||||
|
2025-07-17 01:11:48,316 - INFO - * Restarting with stat
|
||||||
|
2025-07-17 01:11:53,049 - ERROR - Failed to bind to port 6001: [Errno 98] Address already in use
|
||||||
|
2025-07-17 01:11:53,099 - WARNING - * Debugger is active!
|
||||||
|
2025-07-17 01:11:53,100 - INFO - * Debugger PIN: 804-449-067
|
||||||
|
|||||||
Reference in New Issue
Block a user