Problems with Statamic Install #10487
-
Hi all, I have been trying to get Statamic installed and working, but I keep running into problems I cannot get passed. The Quick Start suggested I come here and ask, so that's what I am doing; hoping that someone here can help me. I am trying to install Statamic in a Docker container of my own so I can host in Portainer in my VMware ESXi server and then use lsyncd or Mutagen to sync the source files between my laptop and the VM. I posted all the relevant configuration files I am using to this Gist: https://gist.github.com/mikeschinkel/cc5bfdff3bc3d35794f0551460965391 The first problem I have — though not a blocker — is that the assets are being served as HTTP instead of HTTPS. From line 8 of the view source:
The second problem — which is a blocker — is I get this error this when I try to access the control panel:
There is a There is also a message that says run I did try to get I then tried three (3) different starter kits — I just want to get Statamic up so I can see what it is like and be able to use xdebug to learn Laravel and Statamic. Note that I have lots of PHP and other backend coding experience (Golang, for example) but zero Laravel or Statamic experience and very little front-end dev experience before trying to get this working. I really don't want to give up on Statamic, but I am at a loss for how to get a working site at this point. So thank you in advance for any help on this. -Mike |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 36 replies
-
😄 Definitely sounds like you're going for a fairly complex initial approach - if you're just testing it out then ideally you'd want to just fire up something local (such as Laravel Herd or Valet) rather than throwing all sorts of potential npm, environment, docker and nginx issues into the mix. The Quick Start references some more in-depth guides: https://statamic.dev/installing - really the quick-start is much more geared for local development. In saying all that, have you checked your |
Beta Was this translation helpful? Give feedback.
-
I highly recommend just using Herd instead of Docker if you’re just trying to try Statamic out. all of your problems would disappear and we’d be able to help if they didn’t. Docker is a black hole of infinite configurability and we have very little experience with it here. I hope you’re okay trying one more new thing in the mix!
|
Beta Was this translation helpful? Give feedback.
-
OKAY, after much pain and bullheaded effort, I was able to get it all working and figure out what caused the problems for future visitors and maybe even for updated Statamic documentation. Serving HTTPS URLsFirst question was "How to force Statamic to serve HTTPS URLS?" That one was easily answered and had nothing to do with using Docker vs. Herd. I needed to add a call to Here is what that file looks like after I updated it: <?php // <root>/app/Providers/AppServiceProvider.php
namespace App\Providers;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;
use Statamic\Statamic;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
URL::forceScheme('https');
// Statamic::vite('app', [
// 'resources/js/cp.js',
// 'resources/css/cp.css',
// ]);
}
} |
Beta Was this translation helpful? Give feedback.
-
Missing Control Panel Assets including
|
Beta Was this translation helpful? Give feedback.
-
I have the same problem with manifest.js Illuminate\Foundation\ViteManifestNotFoundException I used this commands. npm install , npm run dev, npm build. But no one of them not helped for me. What do I need to do? |
Beta Was this translation helpful? Give feedback.
Missing Control Panel Assets including
manifest.json
The second problem — the blocker — was much harder to track down and diagnose.
For the answer to the first problem — Serving HTTPS URLs — see here.
TLDR; Running
composer create-project
indocker build
disables plugins and thus fails to load pixelfear/composer-dist-plugin and thus fails to copy over thedist
assets, thus causing the control panel to throw blocking errors.The solutions are to either:
ENV COMPOSER_ALLOW_SUPERUSER=1
beforeRUN ...
, ORRUN composer create-project ...
orRUN statamic new ...
inRUN script -q -c "<command goes here>"
.Both of the above will stop Composer from disabling plugins during
docke…