Short version : How do you migrate a big strapi local project to any online environnemnt to allow online data add via the admin. And what’s the best option.
Hello we’ve been working on a project with strapi locally, we’ve built different collection types, with components in it ( a lot ) and a lot of different entries in every of those collection types and components.
We didnt think about how we would move this online, to allow our clients to add entries themselves ( only create entries, not create any new collection type etc. ) . So, we are wondering what would be the best process to migrate what we have locally , as we cant really reupload everything one by one because there is actually way too much entries and it wouldnt be viable.
And what would be the less painful way to do it : heroku ? Digital ocean ? Else ?
Thank a lot in advance.
Im also saying that we tried and managed to install a fresh strapi on heroku, but then we cant add our Upload and .tmp folders.
Hi @Nemzytch great question! Strapi has quite a few tutorials on how to deploy a Strapi project online. Here you can find them.
For me, I make sure to store my database and other sensitive information in a .env file, that way I can also commit the files to github. Then, all of the major hosting providers like Microsoft Azure, Digital Ocean and Heroku have automated software that can help build your app using a git repository.
Heroku is really nice, and easy to set up, but the servers shut down after a little bit of inactivity, so you may not want to go that route if you need the api to be running constantly.
Assuming you used the same database locally as you plan to use in production you can take a dump of that and import it on the production database (For things like PostgreSQL / MySQL / MariaDB, maybe SQLite though I’ve never tested that).
Heroku though becomes a problem because you don’t have direct access to the database, you could code an import using the
./config/functions/bootstrap along with some kind of other dump such as .csv files.
I’ve already saw the video you are showing but i dont really see how we could workaround this to apply this to our problem…
We do have a dedicated hosting with cpanel on wich we can create postgreSQL database, do you think there is some kind of workaround to copy all our local content ( collections, components and uploads ( images ) ) into a postgreSQL database on our server THEN share it also with our heroku app ? So our heroku app access this data ?
This is the only workaround we thought about… The thing is we alread imported manually something like 1300 images and created a ton of stuff so we really need to figure out how to migrate it, we cant offer to take 3/4 days to import it again from scratch…
And by the way if you know any paid service that could help us trough this we would be really pleased. ( Right now we cant offer the 300$/month strapi plan for dedicated help, sadly… ). Because we are using strapi for the first time for a client and we thought we could run strapi directly on our hosting bu we didnt manage to, so we are looking for a workaround.
For something like that I would very strongly suggest against Heroku and handle it on an actual VPS instead of a PaaS serverless option.
I don’t know on a paid service directly but you can try to reach out to one of our partners: Strapi Partners List
(Even with our EE license directly, we don’t offer migration services or custom development. It’s only related to issues with Strapi itself)