Hey use Docker. It’s the same thing it just comes with a Dockerfile which doesn’t impact anything if you’re not using it
whenever I run the server after using that option i dont get anything at all
im stuck using ver 0.204.0 to sync and publish
after stopping my server through pm2 and building i start the server using a server.js script. this is what i have right now
however I see this is now the dir strcture inside
even if I insert the directory (which is awful cause the point of my scripts were automation) I get an error screen
Even runing just npm run dev I dont get anything. Please restore the Vanilla functionality as it was
This one from vercel template, are you sure docker was used?
Ah yes, you can vercel.json in your project. I suggest to start always from scratch instead of existing project. Like this
webstudio build --template docker --template ./custom-template
where custom-template is your own scripts
there are vercel files cause i tried every option
the only way I get this to run and publish my changes is if I use npx webstudio@0.204.0 isntead of webstudio@latest
We switched from remix to react router as a framework. They might not be compatible so starting from scratch with docker template should do the job.
You REALLY need to consider how you do these changes, this particular config was the only solution I could come up for this particular project and now I have to learn docker and spend god knows how many hours looking for a setup that works.
Setup is exactly the same except remix is switched to react router. The issue you see is due to new framework version.
thats the point, you completely changed all the framweork workflow I had setup I have to start from scratch. I know you guys fly through these concepts, but its not as clearcut to some of us.
I managed to make it run but images and I assume other assets are missing
on the newest version for example its trying to get an image from: /_image/w_384,q_80/assets/paga_desde_tu_celular-150x150_q-uS45RQ6XUZhJOvC4U2t.png
On the prev version using vnailla the img address is /assets/paga_desde_tu_celular-150x150_q-uS45RQ6XUZhJOvC4U2t.png
it affects all optimized images
This is new builtin optimizer, should work out of the box
@Talith previous version didn't optimize images, they were used as-is, this one does
@Bogdan did you test it without using docker?
Yep, it should work locally too.
I briefly read through this conversation and have 2 question to you @Talith :
- Did you make a clean test? (meaning separate folder, separate sync etc with the new cli)
- If the clean test works for you, what's the reason you can't do that clean? Did you modify generated files or what's going on?
The result of the clean test is the optimizer not working as shown in the images
a couple of important things of note:
Right now the page is running with pm2: the command running was npm start
while it is on port 3000 I have in front a varnish and nginx server that manage the port forwarding so I can see the site in 443
Need to repeat from scratch what you did to repro
eseentially what you have opn the documentation to isntall self hosting using webstudio cli
We won't be reproducing your ngnx setup, just Webstudio
i used webstudio, asked me if wanted to create a folder, said yes, selected docker
Pls share your share link
ill do it agian in a new folder jsut to be sure
Clean setup is def in a clean folder without any pre installed stuff
well the isntaller asks me to create a new folder so... itis being created new
did it agian, installer in new foilder, npm run build inside the folder then to run the service
pm2 start --name cashiapp npm -- start
the iamges shown are the ones not optimized (as configured in the pages themselves) the ones not shown are the optimized (all of them uplaoded assets)
folder structure looks like this
I tried checking the site using npm run dev but it says i need to add the domain in vite,config.ts but it still wont work
(my vite.config.ts on the previous clean install) it doesnt seem to register my domains so I cant check if dev works
(i did try without the https)
I was able to reproduce the issue with images. For some reason they are redirected to 404
I see. So this url /:year/:month/:day/:slug
get redirected to /publicaciones/:slug
which gets redirected to /404
.
The problem is this first url get precedence over more exact /_image/*
now, even changing that particular slug which is there to catch all the awful way wordpress handles permalinks, I still ahve the Simple page one that uses just /:slug
wouldnt this one also interfere?
No, /:slug has only one segment while image url has four
so any double or more ones are the problem, gotcha
I guess it just computes more parameters as more precise url
im ditching :year for the specific 2024, i think this should do it
If you want to disable image optimization you can create custom template for example in
.template
folder and create this file there
app/constants.mjs
export const assetBaseUrl = "/assets/";
export const imageLoader = (props) => {
return props.src;
};
And .template can be passed with CLI --template=docker --template=.template
Or yes, use prefix like a year
well thats good to know cause i was about to hunt iamges and use a global variable to disable/enable them, this is faster
ok, yeah using 2024 directly fixes it, but definitely I dont think double variable slugs will be a unique situation for me or even worpdress as backend
as always, thanks for the help