Spaces:
Sleeping
Sleeping
Merge pull request #19 from capstone-if-26/test
Browse filesFiles changed (9)
- .dockerignore+1-1
- .envAdded+66
- .env.example-1
- .gitignore-1
- Dockerfile+38-28
- entrypoint.sh+30-15
- resources/js/pages/mahasiswa-chat.tsx+1-1
- resources/js/pages/mahasiswa.tsx+1-1
- vite.config.ts+12-2
6 unmodified lines78910111213146 unmodified linesvendorpublic/build.env.env.*!.env.exampledatabase/*.sqlite6 unmodified lines78910111213146 unmodified linesvendorpublic/build.env.*!.env!.env.exampledatabase/*.sqlite
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566APP_NAME="RAG Hub"APP_ENV=localAPP_KEY=APP_DEBUG=trueAPP_URL=http://localhost:8000
APP_LOCALE=enAPP_FALLBACK_LOCALE=enAPP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file# APP_MAINTENANCE_STORE=database
# PHP_CLI_SERVER_WORKERS=4
BCRYPT_ROUNDS=12
LOG_CHANNEL=stackLOG_STACK=singleLOG_DEPRECATIONS_CHANNEL=nullLOG_LEVEL=debug
DB_CONNECTION=sqlite# DB_HOST=127.0.0.1# DB_PORT=3306# DB_DATABASE=laravel# DB_USERNAME=root# DB_PASSWORD=
SESSION_DRIVER=fileSESSION_LIFETIME=120SESSION_ENCRYPT=falseSESSION_PATH=/SESSION_DOMAIN=null
BROADCAST_CONNECTION=logFILESYSTEM_DISK=localQUEUE_CONNECTION=sync
CACHE_STORE=file# CACHE_PREFIX=
MEMCACHED_HOST=127.0.0.1
REDIS_CLIENT=phpredisREDIS_HOST=127.0.0.1REDIS_PASSWORD=nullREDIS_PORT=6379
MAIL_MAILER=logMAIL_SCHEME=nullMAIL_HOST=127.0.0.1MAIL_PORT=2525MAIL_USERNAME=nullMAIL_PASSWORD=nullMAIL_FROM_ADDRESS="hello@example.com"MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=AWS_SECRET_ACCESS_KEY=AWS_DEFAULT_REGION=us-east-1AWS_BUCKET=AWS_USE_PATH_STYLE_ENDPOINT=false
VITE_APP_NAME="RAG Hub"RAG_API_BASE_URL=https://lifedebugger-raghub-sevima-test.hf.space/api/v168 unmodified lines6970717268 unmodified linesVITE_APP_NAME="${APP_NAME}"RAG_API_BASE_URL=https://lifedebugger-raghub-sevima-test.hf.space/api/v1RAG_CHAT_API_MODE=direct68 unmodified lines69707168 unmodified linesVITE_APP_NAME="${APP_NAME}"RAG_API_BASE_URL=https://lifedebugger-raghub-sevima-test.hf.space/api/v1
11 unmodified lines1213141516171811 unmodified lines/resources/js/wayfinder/vendor.DS_Store.env.env.backup.env.production.phpactor.json11 unmodified lines12131415161711 unmodified lines/resources/js/wayfinder/vendor.DS_Store.env.backup.env.production.phpactor.json
1234567891011122 unmodified lines1516171819202122232425262728293 unmodified lines3334353637383940414243444546474849505152535455565758596061FROM php:8.4-cliRUN apt-get update && apt-get install -y \git \unzip \curl \zip \ca-certificates \gnupg \libzip-dev \libpng-dev \libjpeg-dev \2 unmodified lineslibxml2-dev \libsqlite3-dev \&& docker-php-ext-install \zip \pdo \pdo_mysql \pdo_sqlite \mbstring \exif \pcntl \bcmath \gd \&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \&& apt-get install -y nodejs \&& rm -rf /var/lib/apt/lists/*3 unmodified linesRUN useradd -m -u 1000 userENV HOME=/home/userENV PORT=7860RUN mkdir -p /home/user/app && chown user:user /home/user/appWORKDIR /home/user/appCOPY --chown=user:user . .COPY --chown=user:user entrypoint.sh /entrypoint.shRUN chmod +x /entrypoint.shUSER userRUN composer install \--no-dev \--optimize-autoloader \--no-interaction \--no-scripts \&& php artisan package:discover --ansi \&& npm ci \&& npm run build \&& rm -rf node_modulesEXPOSE 78601234567891011121314151617182 unmodified lines2122232425262728293031323334353 unmodified lines394041424344454647484950515253545556575859606162636465666768697071FROM php:8.4-cliENV APP_ENV=production \APP_DEBUG=false \APP_URL=http://localhost \LOG_CHANNEL=stderr \LOG_LEVEL=debug \SESSION_DRIVER=file \CACHE_STORE=file \QUEUE_CONNECTION=sync \DB_CONNECTION=sqlite \PORT=7860RUN apt-get update && apt-get install -y \git unzip curl zip ca-certificates gnupg \libzip-dev \libpng-dev \libjpeg-dev \2 unmodified lineslibxml2-dev \libsqlite3-dev \&& docker-php-ext-install \zip \pdo \pdo_mysql \pdo_sqlite \mbstring \exif \pcntl \bcmath \gd \&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \&& apt-get install -y nodejs \&& rm -rf /var/lib/apt/lists/*3 unmodified linesRUN useradd -m -u 1000 userENV HOME=/home/userRUN mkdir -p /home/user/app && chown user:user /home/user/appCOPY entrypoint.sh /entrypoint.shRUN chmod +x /entrypoint.shWORKDIR /home/user/appUSER user# PHP deps — cached unless composer.lock changesCOPY --chown=user:user composer.json composer.lock ./RUN composer install --no-dev --optimize-autoloader --no-interaction --no-scripts# Node deps — cached unless package-lock.json changesCOPY --chown=user:user package.json package-lock.json ./RUN npm ci# Source codeCOPY --chown=user:user . .RUN php artisan package:discover --ansi \&& php artisan config:clear \&& php artisan route:clear \&& npm run build \&& rm -rf node_modules \&& php artisan view:clearEXPOSE 7860
123456789101112131415161718192021222 unmodified lines252627282930313233343536#!/bin/shset -efor VAR_FILE in $(env | grep '_FILE=' | cut -d= -f1); doVAR_NAME="${VAR_FILE%_FILE}"# kalau ENV biasa sudah ada, jangan overwriteif [ -n "$(printenv "$VAR_NAME")" ]; thencontinuefiFILE_PATH=$(printenv "$VAR_FILE")if [ -n "$FILE_PATH" ] && [ -f "$FILE_PATH" ]; thenexport "$VAR_NAME=$(tr -d '\r\n' < "$FILE_PATH")"fidone# HuggingFace compatibilityif [ -n "$SPACE_HOST" ] && [ "${APP_URL:-}" = "http://localhost" ]; thenexport APP_URL="https://$SPACE_HOST"fi2 unmodified linesexport ASSET_URL="https://$SPACE_HOST"fi# Generate APP_KEY kalau belum adaif [ -z "${APP_KEY:-}" ]; thenexport APP_KEY=$(php artisan key:generate --show --no-interaction)fiphp artisan config:clearexec php artisan serve \--host=0.0.0.0 \1234567891011121314151617181920212223242526272829303132332 unmodified lines36373839404142434445464748495051#!/bin/shset -eif [ -f .env ]; thenwhile IFS='=' read -r key value; docase "$key" in ''|\#*) continue ;; esacif [ -z "$(printenv "$key")" ]; thenexport "$key=$value"fidone < .envfienv | while IFS='=' read -r KEY VALUE; docase "$KEY" in*_FILE)VAR_NAME="${KEY%_FILE}"# kalau ENV biasa sudah ada jangan overwriteif [ -n "$(printenv "$VAR_NAME")" ]; thencontinuefiif [ -f "$VALUE" ]; thenexport "$VAR_NAME=$(tr -d '\r\n' < "$VALUE")"fi;;esacdone# HF compatibilityif [ -n "$SPACE_HOST" ] && [ "${APP_URL:-}" = "http://localhost" ]; thenexport APP_URL="https://$SPACE_HOST"fi2 unmodified linesexport ASSET_URL="https://$SPACE_HOST"fiif [ -z "${APP_KEY:-}" ]; thenAPP_KEY="base64:$(openssl rand -base64 32)"export APP_KEYsed -i "s|^APP_KEY=.*|APP_KEY=${APP_KEY}|" .envfirm -f bootstrap/cache/config.phpphp artisan config:clearphp artisan cache:clearexec php artisan serve \--host=0.0.0.0 \
1094 unmodified lines10951096109710981099110011011094 unmodified linesreturn (<><Head title={currentSession?.title ?? 'RAG Hub'} /><StudentShellactiveSessionId={sessionId}1094 unmodified lines10951096109710981099110011011094 unmodified linesreturn (<><Head title={currentSession?.title ?? 'Chat'} /><StudentShellactiveSessionId={sessionId}
101 unmodified lines102103104105106107108101 unmodified linesreturn (<><Head title="RAG Hub" /><StudentShellchatSessions={chatSessions}101 unmodified lines102103104105106107108101 unmodified linesreturn (<><Head title="Beranda" /><StudentShellchatSessions={chatSessions}
3 unmodified lines45678910111215 unmodified lines282930313 unmodified linesimport react from '@vitejs/plugin-react';import laravel from 'laravel-vite-plugin';import { bunny } from 'laravel-vite-plugin/fonts';import { defineConfig } from 'vite';export default defineConfig({plugins: [laravel({input: ['resources/css/app.css', 'resources/js/app.tsx'],15 unmodified linesformVariants: true,}),],});3 unmodified lines45678910111213141516171819202115 unmodified lines37383940413 unmodified linesimport react from '@vitejs/plugin-react';import laravel from 'laravel-vite-plugin';import { bunny } from 'laravel-vite-plugin/fonts';import { defineConfig, loadEnv } from 'vite';export default defineConfig(({ mode }) => {const env = loadEnv(mode, process.cwd(), '');return {define: {'import.meta.env.VITE_RAG_API_BASE_URL': JSON.stringify(env.VITE_RAG_API_BASE_URL || env.RAG_API_BASE_URL ||process.env.VITE_RAG_API_BASE_URL || process.env.RAG_API_BASE_URL || '',),},plugins: [laravel({input: ['resources/css/app.css', 'resources/js/app.tsx'],15 unmodified linesformVariants: true,}),],};});
.dockerignore+1-1
.envAdded+66
.env.example-1
.gitignore-1
Dockerfile+38-28
entrypoint.sh+30-15
resources/js/pages/mahasiswa-chat.tsx+1-1
resources/js/pages/mahasiswa.tsx+1-1
vite.config.ts+12-2