I don't understand how to run my Strapi project once it's online on the server. I have a website vpftravel.com and I want to fetch data from the Strapi collections (api) I created but the only way that Strapi runs is when I use the "start" command. I've read many times their deployment documentation but no luck. I also don't understand how I can access the Strapi dashboard once I've uploaded it to the hosting service's server.
Background on my project, it's just a regular JS, PHP and HTML site hosted on Aruba (hosting service). I've been using DatoCMS but I've surpassed the 10GB bandiwdth on their free tier hence why I'm looking into a locally hosted database.
Maybe Strapi is not the right tool for what I wanna do.
I'd appreciate any help.
This photo shows my personal project directory and I highlighted where the Strapi project is located inside the directory.
Strapi is not a "flat file" type of web app, it's adminUI is but the backend needs to run as a service. This is something you would use PM2 for (and I would not recommend using IIS)
Related
I have an app which I had pushed to heroku a few days ago, where it works fine, but when deploying the app to Netlify, the app deploys but the graphQL connection throws a 404 error. Here are some images.
Here is the code I use in App.js
Is there anyone that knows how I can fix this? Much appreciated
Netlify doesn't run a app server like Heroku, it only runs a static file server. From your code, it appears that you're trying to serve a app that you could connect to and provide yourself with GraphQL access. This is not possible on Netlify, at least not directly.
The only server-like solution that Netlify currently provides in Netlify Functions. However, those are limited to 10 sec by default and provide, one-time data connection - not something that you could keep on using for GraphQL.
So if your requirement is to keep the GraphQL server running (for example like what Gatsby does during gatsby develop), Netlify is not the solution for you. If you wish to send the data one-time and add some server-side processing, you can take a look at Netlify Functions.
I am new to Strapi and I found it really good, I got my website in development mode locally working perfectly fine but I can not get my head around or find any good guide how to host Strapi on Debian Linux server, that I have, to be part of website and to access Strapi control panel for example mywebiste.com/admin so I can add content as blog posts directly by logging in to website admin part. Is that possible or I must use some services like Heroku. if someone can provide in short step by step what to do I will really appreciate that. I tried already create new Strapi project inside public_html folder but its not working
I use strapi on my project . I hosted strapi on pm2 package. Its very easy.
this documention https://docs.strapi.io/developer-docs/latest/guides/process-manager.html#install-pm2
don't forget add startup Ubuntu to pm2. Otherwise when Ubuntu started then not starting pm2
I suggest use Ubuntu.
Nginx Configuration
In order to deploy it to a Linux server, you need to install nginx, and set it up. You can find instructions in official documentation: https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/deployment/optional-software/nginx-proxy.html#nginx-virtual-host
I'm azure beginner
I've created nodejs service and deployed it to Azure Web App service, it works as expected.
So, I have resource group mars-app and existing Web App service application my-mars-web-app.
Now, I want to add static HTML file, to show it when user goes to root URL https://***.azurewebsites.net/
To achieve it,
I have cloned github repo with client side to azure storage with azure cli help
In cliend code folder, I have tried to run az webapp up -g mars-app -n my-mars-web-app --html, but every time I'm receiving:
The webapp my-mars-web-app is a Linux app. The code detected at '/home/serhii/azure-website' will default to '<module 'os' from '/opt/az/lib/python3.6/os.py'>'. Please create a new app to continue this operation.
Because of above error, I have added index.html to dist diretory in my backend app
app.get('/', function (req, res) {
res.sendfile('dist/index.html');
});
and it works. But I'm not sure it is a good solution
What the best practice to add static HTML files to existing Web App service?
This question may be a dublicate of this question, but it was asked 5 years ago, so maybe something changed.
P.S. I know about Static Web Apps, but it is in preview and I'm interested in more generic solutions.
Thanks in advance
[UPDATE]
Here an article about deploying react app
Why you want to add static HTML files to existing web app services, for update or others?
In my opinon, now that you have used git, you can use continuous deployment.
When you modify your program (add new or modify files), in the Action of github, you will see the program start to deploy again. This should be the best deployment plan.
There is a gatsby starter kit installed locally.
It is associated with contentful.
In contentful I add posts, I launch gatsby deploy. Posts appear. Everything is OK.
Decided to deploy to nelify. Launched gatsby build, folder public poured on githab, from githab deployed on netlify.
And here it is possible to make changes in contentful, it is necessary to start assembly locally, then send to githab and start by deple on netlify? Can I simplify/automate something?
What you are looking for is Contenful Webhooks.
Every time a data change on Contentful, a POST request is sent to Netlify, and this last re-trigger a build of your Gatsby website.
I Wanted to create GSuite app and deploy in my own server instead of deploying in google cloud. Is there a way to do it? It would be great if i get some solution for this.
Thanks in advance
You can't deploy G Suite apps/extensions to your own server - they must be published via Chrome Web Store and/or G Suite Marketplace.
What you can do when you publish your app, is to set it as private so that only users in your domain can see and install the app. See Step 4 on Create and publish custom Chrome apps & extensions page for more details. Obviously, the app must be published by a domain account - you don't get that option if you publish an app from your personal/Gmail account.