diff --git a/docker/Dockerfile b/docker/Dockerfile index d2f7faa..03a2f55 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,7 @@ FROM php:8.3-fpm ENV DEBIAN_FRONTEND=noninteractive +ENV APP_NAME=Investbrain ENV APP_URL="http://localhost:8000" ENV ASSET_URL="http://localhost:8000" ENV APP_DEBUG=true @@ -56,11 +57,9 @@ RUN apt-get update && apt-get install -y \ npm \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -# Install PHP dependencies -RUN composer install --no-scripts --optimize-autoloader - -# Install Node dependencies and build assets -RUN npm install && npm run build +# Install PHP dependencies and build front end assets +RUN composer install --no-scripts --optimize-autoloader \ + && npm install && npm run build # Copy over configs COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index cc3ada6..b69f1ee 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -24,6 +24,10 @@ if [[ -z "$APP_KEY" ]]; then export APP_KEY=base64:$(openssl rand -base64 32) draw_box $APP_KEY + + + + # persist the ENVs to a file so laravel can access? fi for dir in storage/framework/cache storage/framework/sessions storage/framework/views; do diff --git a/routes/web.php b/routes/web.php index d961542..0d07985 100644 --- a/routes/web.php +++ b/routes/web.php @@ -11,6 +11,9 @@ use App\Http\Controllers\InvitedOnboardingController; use Laravel\Jetstream\Http\Controllers\Livewire\PrivacyPolicyController; use Laravel\Jetstream\Http\Controllers\Livewire\TermsOfServiceController; +Route::get('/test', function() { + dd(env('APP_NAME'), env('DB_CONNECTION')); +}); Route::get('/', function () { if (!config('investbrain.self_hosted', true) && View::exists('landing-page::index')) {