Compare commits
19 Commits
ddaefdc57d
...
d7e70a37e5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7e70a37e5 | ||
|
|
edeb3ba932 | ||
|
|
646c423d9b | ||
|
|
28a8c1e63d | ||
|
|
9ccc26455e | ||
|
|
8ad64a986d | ||
|
|
3895c43a68 | ||
|
|
63c85ce2c7 | ||
|
|
3b618c6747 | ||
|
|
5580b53bfd | ||
| ee12b9c8d8 | |||
| 6c1f5b4edc | |||
|
|
0bbbba4a11 | ||
|
|
d55399ed55 | ||
|
|
a37102c3ae | ||
|
|
9e7ef1b825 | ||
|
|
3809b295a5 | ||
|
|
48ffd8ac57 | ||
|
|
178c09c3c4 |
169
.dockerignore
169
.dockerignore
@ -1,74 +1,32 @@
|
||||
# ========================================
|
||||
# Docker Ignore File
|
||||
# ========================================
|
||||
# Dependencies
|
||||
node_modules/
|
||||
vendor/
|
||||
|
||||
# Git
|
||||
.git
|
||||
.gitignore
|
||||
.gitattributes
|
||||
# Build artifacts
|
||||
/public/build
|
||||
/public/hot
|
||||
/public/storage
|
||||
/storage/*.key
|
||||
|
||||
# Documentation
|
||||
README.md
|
||||
CHANGELOG.md
|
||||
Documentation/
|
||||
*.md
|
||||
# Environment files
|
||||
.env
|
||||
.env.backup
|
||||
.env.production
|
||||
|
||||
# Tests
|
||||
tests/
|
||||
phpunit.xml
|
||||
.phpunit.cache
|
||||
.phpunit.result.cache
|
||||
|
||||
# IDE & Editors
|
||||
# IDE files
|
||||
.vscode/
|
||||
.idea/
|
||||
.fleet/
|
||||
.nova/
|
||||
.zed/
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
|
||||
# OS generated files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
.phpactor.json
|
||||
|
||||
# Docker files (tidak perlu di-copy ke image)
|
||||
Dockerfile
|
||||
docker-compose*.yml
|
||||
.dockerignore
|
||||
|
||||
# Environment files (akan di-set via environment variables)
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# Dependencies (akan di-install via composer & npm)
|
||||
/vendor/
|
||||
/node_modules/
|
||||
|
||||
# Build artifacts (akan di-build di stage terpisah)
|
||||
/public/hot
|
||||
/public/build
|
||||
|
||||
# Storage & Cache (akan di-mount sebagai volume)
|
||||
/storage/*.key
|
||||
/storage/logs/*
|
||||
/storage/framework/cache/*
|
||||
/storage/framework/sessions/*
|
||||
/storage/framework/views/*
|
||||
/storage/pail
|
||||
|
||||
# Generated files
|
||||
/public/storage
|
||||
/bootstrap/cache/*
|
||||
|
||||
# Local development files
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
auth.json
|
||||
.vagrant
|
||||
.phpstorm.meta.php
|
||||
_ide_helper.php
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
@ -76,7 +34,86 @@ npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# OS Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
desktop.ini
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage/
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Dependency directories
|
||||
jspm_packages/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env.test
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# next.js build output
|
||||
.next
|
||||
|
||||
# nuxt.js build output
|
||||
.nuxt
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Laravel specific
|
||||
/bootstrap/cache/*.php
|
||||
/storage/app/*
|
||||
!/storage/app/.gitignore
|
||||
/storage/framework/cache/*
|
||||
!/storage/framework/cache/.gitignore
|
||||
/storage/framework/sessions/*
|
||||
!/storage/framework/sessions/.gitignore
|
||||
/storage/framework/testing/*
|
||||
!/storage/framework/testing/.gitignore
|
||||
/storage/framework/views/*
|
||||
!/storage/framework/views/.gitignore
|
||||
/storage/logs/*
|
||||
!/storage/logs/.gitignore
|
||||
|
||||
# Testing
|
||||
/coverage
|
||||
/.phpunit.result.cache
|
||||
/phpunit.xml
|
||||
|
||||
# Backup files
|
||||
*.bak
|
||||
*.backup
|
||||
*.sql
|
||||
|
||||
# Documentation
|
||||
README.md
|
||||
Documentation/
|
||||
|
||||
79
.env.docker
79
.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}"
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@ -24,6 +24,5 @@ Homestead.yaml
|
||||
Thumbs.db
|
||||
|
||||
# Docker - Database Backups (exclude backups from git)
|
||||
/docker/mysql/backups/*.sql
|
||||
/docker/mysql/backups/*.sql.gz
|
||||
!/docker/mysql/backups/README.md
|
||||
/docker
|
||||
deploy-kasir.sh
|
||||
126
Dockerfile
126
Dockerfile
@ -1,91 +1,57 @@
|
||||
# ========================================
|
||||
# Stage 1: Build Frontend Assets (Vue.js)
|
||||
# ========================================
|
||||
FROM node:20-alpine as node_builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files untuk caching layer
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci --legacy-peer-deps
|
||||
|
||||
# Copy seluruh source code
|
||||
COPY . .
|
||||
|
||||
# Build production assets
|
||||
RUN npm run build
|
||||
|
||||
# ========================================
|
||||
# Stage 2: Laravel Application
|
||||
# ========================================
|
||||
FROM php:8.3-fpm-alpine
|
||||
|
||||
# Install system dependencies dan PHP extensions
|
||||
RUN apk update && apk add --no-cache \
|
||||
git \
|
||||
unzip \
|
||||
libzip-dev \
|
||||
libpng-dev \
|
||||
oniguruma-dev \
|
||||
libxml2-dev \
|
||||
curl \
|
||||
mysql-client \
|
||||
autoconf \
|
||||
g++ \
|
||||
make \
|
||||
&& docker-php-ext-install \
|
||||
pdo_mysql \
|
||||
zip \
|
||||
gd \
|
||||
mbstring \
|
||||
exif \
|
||||
pcntl \
|
||||
bcmath \
|
||||
&& pecl install redis \
|
||||
&& docker-php-ext-enable redis \
|
||||
&& apk del autoconf g++ make \
|
||||
&& rm -rf /var/cache/apk/* /tmp/*
|
||||
|
||||
# Install Composer
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||
# Use PHP 8.2 with Apache
|
||||
FROM php:8.2-apache
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Copy composer files untuk caching layer
|
||||
COPY composer.json composer.lock ./
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
curl \
|
||||
libpng-dev \
|
||||
libonig-dev \
|
||||
libxml2-dev \
|
||||
libzip-dev \
|
||||
zip \
|
||||
unzip \
|
||||
nodejs \
|
||||
npm \
|
||||
&& docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip
|
||||
|
||||
# Install Redis extension
|
||||
RUN pecl install redis && docker-php-ext-enable redis
|
||||
|
||||
# Install Composer
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Enable Apache mod_rewrite
|
||||
RUN a2enmod rewrite
|
||||
|
||||
# Copy Apache configuration
|
||||
COPY docker/apache/000-default.conf /etc/apache2/sites-available/000-default.conf
|
||||
|
||||
# Copy application files
|
||||
COPY . /var/www/html
|
||||
|
||||
# Set proper permissions
|
||||
RUN chown -R www-data:www-data /var/www/html \
|
||||
&& chmod -R 755 /var/www/html/storage \
|
||||
&& chmod -R 755 /var/www/html/bootstrap/cache
|
||||
|
||||
# Install PHP dependencies
|
||||
RUN composer install --no-dev --no-scripts --no-autoloader --prefer-dist
|
||||
RUN composer install --no-dev --optimize-autoloader
|
||||
|
||||
# Copy application source code
|
||||
COPY . .
|
||||
# Install Node.js dependencies and build assets
|
||||
RUN npm install && npm run build
|
||||
|
||||
# Copy hasil build Vue dari stage 1
|
||||
COPY --from=node_builder /app/public/build /var/www/html/public/build
|
||||
# Create .env file if it doesn't exist
|
||||
RUN if [ ! -f .env ]; then cp .env.example .env; fi
|
||||
|
||||
# Generate autoload files dengan optimasi
|
||||
RUN composer dump-autoload --optimize --classmap-authoritative
|
||||
# Generate application key
|
||||
RUN php artisan key:generate
|
||||
|
||||
# Create required directories dan set permissions
|
||||
RUN mkdir -p \
|
||||
storage/framework/cache \
|
||||
storage/framework/sessions \
|
||||
storage/framework/views \
|
||||
storage/logs \
|
||||
bootstrap/cache \
|
||||
&& chown -R www-data:www-data \
|
||||
/var/www/html/storage \
|
||||
/var/www/html/bootstrap/cache \
|
||||
&& chmod -R 775 \
|
||||
/var/www/html/storage \
|
||||
/var/www/html/bootstrap/cache
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Switch ke user non-root untuk keamanan
|
||||
USER www-data
|
||||
|
||||
EXPOSE 9000
|
||||
|
||||
CMD ["php-fpm"]
|
||||
# Start Apache
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
@ -145,7 +145,7 @@ docker exec -it abbauf_kasir_app php artisan migrate --seed
|
||||
docker exec -it abbauf_kasir_app php artisan storage:link
|
||||
|
||||
# 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
|
||||
|
||||
@ -18,7 +18,7 @@ class AuthController extends Controller
|
||||
]);
|
||||
|
||||
// cari user berdasarkan nama
|
||||
$user = User::where('nama', $request->nama)->first();
|
||||
$user = User::whereRaw('BINARY nama = ?', [$request->nama])->first();
|
||||
|
||||
if (!$user || !Hash::check($request->password, $user->password)) {
|
||||
return response()->json([
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Item;
|
||||
use App\Models\Nampan;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ItemController extends Controller
|
||||
@ -66,13 +67,20 @@ class ItemController extends Controller
|
||||
{
|
||||
$validated = $request->validate([
|
||||
'id_produk' => 'required|exists:produks,id',
|
||||
'id_nampan' => 'nullable|exists:nampans,id'
|
||||
'id_nampan' => 'required',
|
||||
],[
|
||||
'id_produk' => 'Id produk tidak valid.',
|
||||
'id_nampan' => 'Id nampan tidak valid'
|
||||
]);
|
||||
|
||||
$item = Item::findOrFail($id)->update($validated);
|
||||
if ($validated['id_nampan'] == 0) {
|
||||
$item = Item::findOrFail($id)->update([
|
||||
'id_produk' => $validated['id_produk'],
|
||||
'id_nampan' => null
|
||||
]);
|
||||
} else {
|
||||
$item = Item::findOrFail($id)->update($validated);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Item berhasil diubah',
|
||||
|
||||
0
bootstrap/cache/.gitignore
vendored
Normal file → Executable file
0
bootstrap/cache/.gitignore
vendored
Normal file → Executable file
@ -1,176 +1,79 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# ========================================
|
||||
# Laravel PHP-FPM Application
|
||||
# ========================================
|
||||
laravel:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: abbauf_kasir_app
|
||||
container_name: kasir-app
|
||||
restart: unless-stopped
|
||||
working_dir: /var/www/html
|
||||
volumes:
|
||||
# Mount storage untuk uploads dan logs (persistent)
|
||||
- ./storage:/var/www/html/storage
|
||||
# Mount public build assets (read-only)
|
||||
- ./public/build:/var/www/html/public/build:ro
|
||||
environment:
|
||||
# Application
|
||||
APP_NAME: ${APP_NAME:-Abbauf-Kasir}
|
||||
APP_ENV: ${APP_ENV:-production}
|
||||
APP_KEY: ${APP_KEY}
|
||||
APP_DEBUG: ${APP_DEBUG:-false}
|
||||
APP_URL: ${APP_URL:-http://localhost}
|
||||
|
||||
# Database
|
||||
DB_CONNECTION: mysql
|
||||
DB_HOST: mysql
|
||||
DB_PORT: 3306
|
||||
DB_DATABASE: ${DB_DATABASE:-kasir_db}
|
||||
DB_USERNAME: ${DB_USERNAME:-kasir_user}
|
||||
DB_PASSWORD: ${DB_PASSWORD}
|
||||
|
||||
# Cache & Session
|
||||
CACHE_STORE: redis
|
||||
SESSION_DRIVER: redis
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: 6379
|
||||
|
||||
# Queue
|
||||
QUEUE_CONNECTION: redis
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
networks:
|
||||
- kasir_network
|
||||
healthcheck:
|
||||
test: ["CMD", "php-fpm", "-t"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# ========================================
|
||||
# Nginx Web Server
|
||||
# ========================================
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: abbauf_kasir_nginx
|
||||
restart: unless-stopped
|
||||
- ./:/var/www/html
|
||||
- ./docker/mysql/backups:/var/www/html/docker/mysql/backups
|
||||
ports:
|
||||
- "${APP_PORT:-80}:80"
|
||||
volumes:
|
||||
# Nginx configuration
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
# Laravel public directory (untuk static assets)
|
||||
- ./public:/var/www/html/public:ro
|
||||
# Storage symlink untuk file uploads
|
||||
- ./storage/app/public:/var/www/html/public/storage:ro
|
||||
- "8000:80"
|
||||
environment:
|
||||
- APP_ENV=local
|
||||
- APP_DEBUG=true
|
||||
- DB_HOST=mysql
|
||||
- DB_PORT=3306
|
||||
- DB_DATABASE=kasir_db
|
||||
- DB_USERNAME=kasir_user
|
||||
- DB_PASSWORD=kasir_password
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_PORT=6379
|
||||
depends_on:
|
||||
- laravel
|
||||
networks:
|
||||
- kasir_network
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
- mysql
|
||||
- redis
|
||||
|
||||
# ========================================
|
||||
# MySQL Database
|
||||
# ========================================
|
||||
mysql:
|
||||
image: mysql:8.4
|
||||
container_name: abbauf_kasir_db
|
||||
image: mysql:5.7
|
||||
container_name: kasir-mysql
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root_secret_password}
|
||||
MYSQL_DATABASE: ${DB_DATABASE:-kasir_db}
|
||||
MYSQL_USER: ${DB_USERNAME:-kasir_user}
|
||||
MYSQL_PASSWORD: ${DB_PASSWORD}
|
||||
MYSQL_CHARACTER_SET_SERVER: utf8mb4
|
||||
MYSQL_COLLATION_SERVER: utf8mb4_unicode_ci
|
||||
ports:
|
||||
- "${DB_PORT:-3306}:3306"
|
||||
MYSQL_DATABASE: kasir_db
|
||||
MYSQL_ROOT_PASSWORD: kasir_password
|
||||
MYSQL_USER: kasir_user
|
||||
MYSQL_PASSWORD: kasir_password
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
# Optional: backup folder
|
||||
- ./docker/mysql/mysql_data:/var/lib/mysql
|
||||
- ./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
|
||||
# command: --default-authentication-plugin=mysql_native_password
|
||||
ports:
|
||||
- "3308:3306"
|
||||
|
||||
# ========================================
|
||||
# Redis Cache & Session Store
|
||||
# ========================================
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: abbauf_kasir_redis
|
||||
container_name: kasir-redis
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${REDIS_PORT:-6379}:6379"
|
||||
- "6380:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
networks:
|
||||
- kasir_network
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
command: redis-server --appendonly yes
|
||||
- ./docker/redis/redis_data:/data
|
||||
|
||||
# ========================================
|
||||
# Queue Worker (Optional - untuk background jobs)
|
||||
# ========================================
|
||||
queue:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: abbauf_kasir_queue
|
||||
restart: unless-stopped
|
||||
working_dir: /var/www/html
|
||||
volumes:
|
||||
- ./storage:/var/www/html/storage
|
||||
environment:
|
||||
APP_ENV: ${APP_ENV:-production}
|
||||
APP_KEY: ${APP_KEY}
|
||||
DB_CONNECTION: mysql
|
||||
DB_HOST: mysql
|
||||
DB_PORT: 3306
|
||||
DB_DATABASE: ${DB_DATABASE:-kasir_db}
|
||||
DB_USERNAME: ${DB_USERNAME:-kasir_user}
|
||||
DB_PASSWORD: ${DB_PASSWORD}
|
||||
REDIS_HOST: redis
|
||||
QUEUE_CONNECTION: redis
|
||||
depends_on:
|
||||
- laravel
|
||||
- redis
|
||||
- mysql
|
||||
networks:
|
||||
- kasir_network
|
||||
command: php artisan queue:work --tries=3 --timeout=90
|
||||
# phpmyadmin:
|
||||
# image: phpmyadmin/phpmyadmin
|
||||
# container_name: kasir-phpmyadmin
|
||||
# restart: unless-stopped
|
||||
# environment:
|
||||
# PMA_HOST: mysql
|
||||
# PMA_PORT: 3306
|
||||
# PMA_USER: ${DB_USERNAME}
|
||||
# PMA_PASSWORD: ${DB_PASSWORD}
|
||||
# ports:
|
||||
# - "8080:80"
|
||||
# depends_on:
|
||||
# - mysql
|
||||
# networks:
|
||||
# - kasir-network
|
||||
|
||||
# volumes:
|
||||
# mysql_data:
|
||||
# driver: local
|
||||
# redis_data:
|
||||
# driver: local
|
||||
|
||||
# ========================================
|
||||
# Networks
|
||||
# ========================================
|
||||
networks:
|
||||
kasir_network:
|
||||
driver: bridge
|
||||
|
||||
# ========================================
|
||||
# Persistent Volumes
|
||||
# ========================================
|
||||
volumes:
|
||||
mysql_data:
|
||||
driver: local
|
||||
redis_data:
|
||||
driver: local
|
||||
default:
|
||||
external: true
|
||||
name: kasir_kasir_network
|
||||
|
||||
12
docker/apache/000-default.conf
Normal file
12
docker/apache/000-default.conf
Normal file
@ -0,0 +1,12 @@
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /var/www/html/public
|
||||
|
||||
<Directory /var/www/html/public>
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
2
docker/mysql/mysql_data/auto.cnf
Normal file
2
docker/mysql/mysql_data/auto.cnf
Normal file
@ -0,0 +1,2 @@
|
||||
[auto]
|
||||
server-uuid=79710a58-aeaa-11f0-a626-0242ac150002
|
||||
BIN
docker/mysql/mysql_data/ca-key.pem
Normal file
BIN
docker/mysql/mysql_data/ca-key.pem
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/ca.pem
Normal file
BIN
docker/mysql/mysql_data/ca.pem
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/client-cert.pem
Normal file
BIN
docker/mysql/mysql_data/client-cert.pem
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/client-key.pem
Normal file
BIN
docker/mysql/mysql_data/client-key.pem
Normal file
Binary file not shown.
135
docker/mysql/mysql_data/ib_buffer_pool
Normal file
135
docker/mysql/mysql_data/ib_buffer_pool
Normal file
@ -0,0 +1,135 @@
|
||||
10,69
|
||||
10,29
|
||||
10,93
|
||||
10,2
|
||||
10,3
|
||||
11,13
|
||||
11,4
|
||||
11,8
|
||||
11,17
|
||||
11,15
|
||||
11,16
|
||||
11,7
|
||||
11,2
|
||||
11,3
|
||||
9,5
|
||||
9,2
|
||||
9,3
|
||||
8,7
|
||||
8,5
|
||||
8,2
|
||||
8,3
|
||||
0,457
|
||||
12,2
|
||||
12,1
|
||||
12,3
|
||||
20,2
|
||||
20,1
|
||||
20,3
|
||||
19,2
|
||||
19,1
|
||||
19,3
|
||||
18,1
|
||||
18,3
|
||||
14,1
|
||||
11,28
|
||||
11,27
|
||||
11,26
|
||||
14,5
|
||||
11,25
|
||||
11,24
|
||||
14,3
|
||||
13,1
|
||||
11,23
|
||||
11,22
|
||||
13,3
|
||||
11,21
|
||||
11,20
|
||||
11,1
|
||||
11,19
|
||||
10,303
|
||||
10,302
|
||||
10,301
|
||||
10,300
|
||||
10,299
|
||||
10,298
|
||||
10,297
|
||||
10,296
|
||||
2,2
|
||||
10,295
|
||||
2,1
|
||||
10,294
|
||||
10,293
|
||||
10,292
|
||||
2,3
|
||||
10,291
|
||||
10,290
|
||||
10,289
|
||||
10,288
|
||||
10,287
|
||||
10,286
|
||||
10,285
|
||||
10,284
|
||||
10,283
|
||||
10,282
|
||||
10,281
|
||||
10,280
|
||||
10,279
|
||||
10,278
|
||||
10,277
|
||||
10,276
|
||||
10,275
|
||||
10,274
|
||||
10,273
|
||||
10,272
|
||||
10,271
|
||||
10,270
|
||||
10,269
|
||||
10,268
|
||||
10,267
|
||||
10,266
|
||||
10,265
|
||||
10,264
|
||||
10,263
|
||||
10,262
|
||||
10,261
|
||||
10,260
|
||||
10,259
|
||||
10,258
|
||||
10,257
|
||||
10,256
|
||||
10,255
|
||||
10,254
|
||||
10,253
|
||||
10,252
|
||||
10,251
|
||||
10,250
|
||||
10,249
|
||||
10,248
|
||||
10,247
|
||||
10,246
|
||||
10,245
|
||||
10,244
|
||||
10,243
|
||||
10,242
|
||||
10,241
|
||||
10,240
|
||||
10,239
|
||||
10,238
|
||||
10,237
|
||||
10,236
|
||||
10,235
|
||||
10,234
|
||||
10,233
|
||||
10,232
|
||||
10,231
|
||||
10,230
|
||||
10,229
|
||||
10,228
|
||||
10,227
|
||||
10,226
|
||||
10,225
|
||||
10,224
|
||||
10,223
|
||||
10,222
|
||||
10,221
|
||||
BIN
docker/mysql/mysql_data/ib_logfile0
Normal file
BIN
docker/mysql/mysql_data/ib_logfile0
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/ib_logfile1
Normal file
BIN
docker/mysql/mysql_data/ib_logfile1
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/ibdata1
Normal file
BIN
docker/mysql/mysql_data/ibdata1
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/ibtmp1
Normal file
BIN
docker/mysql/mysql_data/ibtmp1
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/cache.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/cache.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/cache.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/cache.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/cache_locks.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/cache_locks.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/cache_locks.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/cache_locks.ibd
Normal file
Binary file not shown.
2
docker/mysql/mysql_data/kasir_db/db.opt
Normal file
2
docker/mysql/mysql_data/kasir_db/db.opt
Normal file
@ -0,0 +1,2 @@
|
||||
default-character-set=latin1
|
||||
default-collation=latin1_swedish_ci
|
||||
BIN
docker/mysql/mysql_data/kasir_db/failed_jobs.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/failed_jobs.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/failed_jobs.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/failed_jobs.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/foto_sementaras.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/foto_sementaras.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/foto_sementaras.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/foto_sementaras.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/fotos.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/fotos.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/fotos.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/fotos.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/item_transaksis.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/item_transaksis.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/item_transaksis.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/item_transaksis.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/items.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/items.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/items.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/items.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/job_batches.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/job_batches.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/job_batches.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/job_batches.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/jobs.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/jobs.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/jobs.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/jobs.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/kategoris.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/kategoris.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/kategoris.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/kategoris.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/migrations.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/migrations.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/migrations.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/migrations.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/nampans.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/nampans.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/nampans.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/nampans.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/password_reset_tokens.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/password_reset_tokens.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/password_reset_tokens.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/password_reset_tokens.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/personal_access_tokens.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/personal_access_tokens.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/personal_access_tokens.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/personal_access_tokens.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/produks.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/produks.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/produks.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/produks.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/sales.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/sales.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/sales.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/sales.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/sessions.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/sessions.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/sessions.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/sessions.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/transaksis.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/transaksis.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/transaksis.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/transaksis.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/users.frm
Normal file
BIN
docker/mysql/mysql_data/kasir_db/users.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/kasir_db/users.ibd
Normal file
BIN
docker/mysql/mysql_data/kasir_db/users.ibd
Normal file
Binary file not shown.
1
docker/mysql/mysql_data/mysql.sock
Symbolic link
1
docker/mysql/mysql_data/mysql.sock
Symbolic link
@ -0,0 +1 @@
|
||||
/var/run/mysqld/mysqld.sock
|
||||
0
docker/mysql/mysql_data/mysql/columns_priv.MYD
Normal file
0
docker/mysql/mysql_data/mysql/columns_priv.MYD
Normal file
BIN
docker/mysql/mysql_data/mysql/columns_priv.MYI
Normal file
BIN
docker/mysql/mysql_data/mysql/columns_priv.MYI
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/columns_priv.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/columns_priv.frm
Normal file
Binary file not shown.
1
docker/mysql/mysql_data/mysql/db.MYD
Normal file
1
docker/mysql/mysql_data/mysql/db.MYD
Normal file
@ -0,0 +1 @@
|
||||
ÿlocalhost performance_schema mysql.session ÿlocalhost sys mysql.sys ÿ% kasir\_db kasir_user
|
||||
BIN
docker/mysql/mysql_data/mysql/db.MYI
Normal file
BIN
docker/mysql/mysql_data/mysql/db.MYI
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/db.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/db.frm
Normal file
Binary file not shown.
2
docker/mysql/mysql_data/mysql/db.opt
Normal file
2
docker/mysql/mysql_data/mysql/db.opt
Normal file
@ -0,0 +1,2 @@
|
||||
default-character-set=latin1
|
||||
default-collation=latin1_swedish_ci
|
||||
BIN
docker/mysql/mysql_data/mysql/engine_cost.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/engine_cost.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/engine_cost.ibd
Normal file
BIN
docker/mysql/mysql_data/mysql/engine_cost.ibd
Normal file
Binary file not shown.
0
docker/mysql/mysql_data/mysql/event.MYD
Normal file
0
docker/mysql/mysql_data/mysql/event.MYD
Normal file
BIN
docker/mysql/mysql_data/mysql/event.MYI
Normal file
BIN
docker/mysql/mysql_data/mysql/event.MYI
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/event.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/event.frm
Normal file
Binary file not shown.
0
docker/mysql/mysql_data/mysql/func.MYD
Normal file
0
docker/mysql/mysql_data/mysql/func.MYD
Normal file
BIN
docker/mysql/mysql_data/mysql/func.MYI
Normal file
BIN
docker/mysql/mysql_data/mysql/func.MYI
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/func.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/func.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/general_log.CSM
Normal file
BIN
docker/mysql/mysql_data/mysql/general_log.CSM
Normal file
Binary file not shown.
0
docker/mysql/mysql_data/mysql/general_log.CSV
Normal file
0
docker/mysql/mysql_data/mysql/general_log.CSV
Normal file
|
|
BIN
docker/mysql/mysql_data/mysql/general_log.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/general_log.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/gtid_executed.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/gtid_executed.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/gtid_executed.ibd
Normal file
BIN
docker/mysql/mysql_data/mysql/gtid_executed.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/help_category.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/help_category.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/help_category.ibd
Normal file
BIN
docker/mysql/mysql_data/mysql/help_category.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/help_keyword.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/help_keyword.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/help_keyword.ibd
Normal file
BIN
docker/mysql/mysql_data/mysql/help_keyword.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/help_relation.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/help_relation.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/help_relation.ibd
Normal file
BIN
docker/mysql/mysql_data/mysql/help_relation.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/help_topic.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/help_topic.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/help_topic.ibd
Normal file
BIN
docker/mysql/mysql_data/mysql/help_topic.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/innodb_index_stats.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/innodb_index_stats.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/innodb_index_stats.ibd
Normal file
BIN
docker/mysql/mysql_data/mysql/innodb_index_stats.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/innodb_table_stats.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/innodb_table_stats.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/innodb_table_stats.ibd
Normal file
BIN
docker/mysql/mysql_data/mysql/innodb_table_stats.ibd
Normal file
Binary file not shown.
0
docker/mysql/mysql_data/mysql/ndb_binlog_index.MYD
Normal file
0
docker/mysql/mysql_data/mysql/ndb_binlog_index.MYD
Normal file
BIN
docker/mysql/mysql_data/mysql/ndb_binlog_index.MYI
Normal file
BIN
docker/mysql/mysql_data/mysql/ndb_binlog_index.MYI
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/ndb_binlog_index.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/ndb_binlog_index.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/plugin.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/plugin.frm
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/plugin.ibd
Normal file
BIN
docker/mysql/mysql_data/mysql/plugin.ibd
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/proc.MYD
Normal file
BIN
docker/mysql/mysql_data/mysql/proc.MYD
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/proc.MYI
Normal file
BIN
docker/mysql/mysql_data/mysql/proc.MYI
Normal file
Binary file not shown.
BIN
docker/mysql/mysql_data/mysql/proc.frm
Normal file
BIN
docker/mysql/mysql_data/mysql/proc.frm
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user