[DEPRECATED] Local installation template

Hello,

I wanted to be able to install Webiny as a locally hosted CMS, without dependencies on Amazon services. This is not something Webiny supports out of the box (and afaik it’s not a goal of the developers), so I modified the default template to work locally.

Here is the result: https://gitlab.com/shrugal/webiny-local

The changes are basically:

  • Replace MongoDB lambda plugin with the local variant
  • Replace Cognito security plugins to just use the username and password stored in MongoDB
  • Replace Serverless Components with copies that don’t include any Lambda or S3 interactions
  • Replace Lambdas with simple ExpressJS servers (one for each service: api, admin and site)
  • Add the file server from an older Webiny CLI back to the api service
  • Skip installing example data for page-builder (would require S3)

Install:

  • Clone repo
  • Create api/.env.json, apps/admin/.env.json and apps/site/.env.json from their respective example files and fill in JWT_SECRET in the api config.
  • yarn
  • yarn run build:dev:api (has to run whenever you change api/serverless.yml)
  • yarn run start
  • Complete installation and hack away!

Build and run:

  • yarn run build
  • yarn run serve

Hope this might help someone,
Cheers!

1 Like

Hi @Shrugal! Very interesting approach, I just tried it. Couldn’t even begin to run it on Windows, but on a Mac - worked right away! I love how you replaced the components to let them do all the boilerplate code generation and build, but removed the AWS interaction and just mocked the component output with your own predefined URLs. Really, really cool :slight_smile:

Thanks for sharing! :rocket:

IMPORTANT NOTE: this guide was applicable to the previous version of Webiny. Since the release of Webiny v4, this guide no longer applies.