From 178c09c3c49ac3887b7791fa493ba6299d1c490f Mon Sep 17 00:00:00 2001 From: Baghaztra Date: Tue, 21 Oct 2025 17:38:56 +0700 Subject: [PATCH 1/5] ... --- .env.docker | 79 +++++++++++++++++----------------------------- docker-compose.yml | 8 ++--- 2 files changed, 33 insertions(+), 54 deletions(-) diff --git a/.env.docker b/.env.docker index bb7d1c4..bcc56d1 100644 --- a/.env.docker +++ b/.env.docker @@ -1,86 +1,65 @@ -# ======================================== -# Abbauf Kasir - Docker Environment Configuration -# ======================================== -# Copy file ini ke .env sebelum deployment -# Ganti semua placeholder dengan nilai yang sesuai - -# Application APP_NAME=Abbauf-Kasir -APP_ENV=production -APP_KEY= # Generate dengan: php artisan key:generate -APP_DEBUG=false -APP_URL=http://localhost # Ganti dengan domain production +APP_ENV=local +APP_KEY= +APP_DEBUG=true +APP_URL=http://localhost -APP_LOCALE=id +APP_LOCALE=en APP_FALLBACK_LOCALE=en -APP_FAKER_LOCALE=id_ID +APP_FAKER_LOCALE=en_US APP_MAINTENANCE_DRIVER=file +# APP_MAINTENANCE_STORE=database + PHP_CLI_SERVER_WORKERS=4 BCRYPT_ROUNDS=12 -# Logging LOG_CHANNEL=stack -LOG_STACK=daily +LOG_STACK=single LOG_DEPRECATIONS_CHANNEL=null -LOG_LEVEL=error +LOG_LEVEL=debug -# Database Configuration -DB_CONNECTION=mysql -DB_HOST=mysql # Nama service di docker-compose -DB_PORT=3306 -DB_DATABASE=kasir_db # Nama database -DB_USERNAME=kasir_user # Username database -DB_PASSWORD=strong_password_here # GANTI dengan password kuat! +DB_CONNECTION=sqlite +# DB_HOST=127.0.0.1 +# DB_PORT=3306 +# DB_DATABASE=laravel +# DB_USERNAME=root +# DB_PASSWORD= -# MySQL Root Password (untuk docker-compose) -MYSQL_ROOT_PASSWORD=root_strong_password # GANTI dengan password root yang kuat! - -# Cache & Session -CACHE_STORE=redis -SESSION_DRIVER=redis +SESSION_DRIVER=database SESSION_LIFETIME=120 SESSION_ENCRYPT=false SESSION_PATH=/ SESSION_DOMAIN=null -# Redis Configuration +BROADCAST_CONNECTION=log +FILESYSTEM_DISK=local +QUEUE_CONNECTION=database + +CACHE_STORE=database +# CACHE_PREFIX= + +MEMCACHED_HOST=127.0.0.1 + REDIS_CLIENT=phpredis -REDIS_HOST=redis +REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 -# Queue -QUEUE_CONNECTION=redis - -# Broadcasting -BROADCAST_CONNECTION=log - -# Filesystem -FILESYSTEM_DISK=local - -# Mail Configuration (opsional) MAIL_MAILER=log MAIL_SCHEME=null MAIL_HOST=127.0.0.1 MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null -MAIL_FROM_ADDRESS="noreply@abbauf-kasir.local" +MAIL_FROM_ADDRESS="hello@example.com" MAIL_FROM_NAME="${APP_NAME}" -# AWS (jika menggunakan S3 untuk storage) AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_DEFAULT_REGION=us-east-1 AWS_BUCKET= AWS_USE_PATH_STYLE_ENDPOINT=false -# Ports (untuk docker-compose) -APP_PORT=80 # Port untuk akses aplikasi -# DB_PORT=3306 # Uncomment jika ingin expose DB port -# REDIS_PORT=6379 # Uncomment jika ingin expose Redis port - -# Vite -VITE_APP_NAME="${APP_NAME}" +VITE_APP_NAME="${APP_NAME}" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 0f4b723..ae2b302 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: working_dir: /var/www/html volumes: # Mount storage untuk uploads dan logs (persistent) - - ./storage:/var/www/html/storage + - ./storage/app/public:/var/www/html/storage # Mount public build assets (read-only) - ./public/build:/var/www/html/public/build:ro environment: @@ -64,11 +64,11 @@ services: - "${APP_PORT:-80}:80" volumes: # Nginx configuration - - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro + - ./nginx.conf:/etc/nginx/conf.d/default.conf # Laravel public directory (untuk static assets) - - ./public:/var/www/html/public:ro + - ./public:/var/www/html/public # Storage symlink untuk file uploads - - ./storage/app/public:/var/www/html/public/storage:ro + - ./storage/app/public:/var/www/html/public/storage depends_on: - laravel networks: From 48ffd8ac5729a1ea9a8dda006ab7371a7763ad88 Mon Sep 17 00:00:00 2001 From: Baghaztra Date: Tue, 21 Oct 2025 17:40:47 +0700 Subject: [PATCH 2/5] Delete searchbar.vue --- resources/js/components/searchbar.vue | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 resources/js/components/searchbar.vue diff --git a/resources/js/components/searchbar.vue b/resources/js/components/searchbar.vue deleted file mode 100644 index 1f886c1..0000000 --- a/resources/js/components/searchbar.vue +++ /dev/null @@ -1,16 +0,0 @@ - - From 3809b295a56fe6c39c72ef39fd33998116ecce30 Mon Sep 17 00:00:00 2001 From: Baghaztra Date: Tue, 21 Oct 2025 17:41:04 +0700 Subject: [PATCH 3/5] Create Searchbar.vue --- resources/js/components/Searchbar.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 resources/js/components/Searchbar.vue diff --git a/resources/js/components/Searchbar.vue b/resources/js/components/Searchbar.vue new file mode 100644 index 0000000..1f886c1 --- /dev/null +++ b/resources/js/components/Searchbar.vue @@ -0,0 +1,16 @@ + + From 9e7ef1b82546bcd78d28a18ef0e952e7f7bec165 Mon Sep 17 00:00:00 2001 From: Baghaztra Date: Tue, 21 Oct 2025 17:54:09 +0700 Subject: [PATCH 4/5] Update docker-compose.yml --- docker-compose.yml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ae2b302..b4b5a7f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: working_dir: /var/www/html volumes: # Mount storage untuk uploads dan logs (persistent) - - ./storage/app/public:/var/www/html/storage + - ./storage/app/public:/var/www/html/storage/app/public # Mount public build assets (read-only) - ./public/build:/var/www/html/public/build:ro environment: @@ -47,11 +47,11 @@ services: condition: service_started networks: - kasir_network - healthcheck: - test: ["CMD", "php-fpm", "-t"] - interval: 30s - timeout: 10s - retries: 3 + # healthcheck: + # test: ["CMD", "php-fpm", "-t"] + # interval: 30s + # timeout: 10s + # retries: 3 # ======================================== # Nginx Web Server @@ -73,11 +73,11 @@ services: - laravel networks: - kasir_network - healthcheck: - test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/"] - interval: 30s - timeout: 10s - retries: 3 + # healthcheck: + # test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/"] + # interval: 30s + # timeout: 10s + # retries: 3 # ======================================== # MySQL Database @@ -101,11 +101,11 @@ services: - ./docker/mysql/backups:/backups networks: - kasir_network - healthcheck: - test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD:-root_secret_password}"] - interval: 10s - timeout: 5s - retries: 5 + # healthcheck: + # test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD:-root_secret_password}"] + # interval: 10s + # timeout: 5s + # retries: 5 # command: --default-authentication-plugin=mysql_native_password # ======================================== @@ -121,11 +121,11 @@ services: - redis_data:/data networks: - kasir_network - healthcheck: - test: ["CMD", "redis-cli", "ping"] - interval: 10s - timeout: 5s - retries: 3 + # healthcheck: + # test: ["CMD", "redis-cli", "ping"] + # interval: 10s + # timeout: 5s + # retries: 3 command: redis-server --appendonly yes # ======================================== From a37102c3aee6aef3042e9a72a8e1d2e0a0d64b7c Mon Sep 17 00:00:00 2001 From: Baghaztra Date: Wed, 22 Oct 2025 08:57:12 +0700 Subject: [PATCH 5/5] [Update] docker container version --- README.md | 2 +- docker-compose.yml | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 436776e..f6dc97a 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ docker compose --env-file .env.production up -d --build docker exec -it abbauf_kasir_app php artisan migrate --seed # Atau import database secara manual -docker exec -i abbauf_kasir_db mysql -u kasir_user -pkasir_password kasir_db < ./toko_emas.sql +docker exec -i abbauf_kasir_db mysql -u kasir_user -pkasir_password kasir_db < ./storage/toko_emas.sql # Periksa database (opsional) docker exec -it abbauf_kasir_db bash diff --git a/docker-compose.yml b/docker-compose.yml index b4b5a7f..2bdf82a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.8' +version: '3.9' services: # ======================================== @@ -61,7 +61,7 @@ services: container_name: abbauf_kasir_nginx restart: unless-stopped ports: - - "${APP_PORT:-80}:80" + - "81:80" volumes: # Nginx configuration - ./nginx.conf:/etc/nginx/conf.d/default.conf @@ -83,7 +83,8 @@ services: # MySQL Database # ======================================== mysql: - image: mysql:8.4 +# image: mysql:8.4 + image: mariadb:10.6 container_name: abbauf_kasir_db restart: unless-stopped environment: @@ -94,18 +95,18 @@ services: MYSQL_CHARACTER_SET_SERVER: utf8mb4 MYSQL_COLLATION_SERVER: utf8mb4_unicode_ci ports: - - "${DB_PORT:-3306}:3306" + - "3308:3306" volumes: - mysql_data:/var/lib/mysql # Optional: backup folder - ./docker/mysql/backups:/backups networks: - kasir_network - # healthcheck: - # test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD:-root_secret_password}"] - # interval: 10s - # timeout: 5s - # retries: 5 + healthcheck: + test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD:-root_secret_password}"] + interval: 10s + timeout: 5s + retries: 5 # command: --default-authentication-plugin=mysql_native_password # ======================================== @@ -116,7 +117,7 @@ services: container_name: abbauf_kasir_redis restart: unless-stopped ports: - - "${REDIS_PORT:-6379}:6379" + - "6380:6379" volumes: - redis_data:/data networks: