Installation

Getting started trying out Webdis is as easy as cloning the repository.

Before pushing Webdis to a production server, we recommend trying it first on your local environment, just to be able to get a handle for how it feels. This will enable you to try out Webdis, and see if you like it.

First, we'll need to clone the repository on GitHub:

$ git clone https://github.com/webdis/webdis.git

Because Webdis is not production-ready just yet, we'll have to make do with this for now. The bright side about this is that anytime you wish to upgrade, you'll be able to quickly and easily. We try to make sure that commits won't break existing installations.

Next, we need to copy the .env.example file to .env:

$ cp .env.example .env

The .env file allows you to change configuration variables, without needing to change any core files. Now you'll need to go into the .env file and create a random 32 character string in the WEBDISKEY field. Since we're on our local dev environment, it is your choice whether to set WEBDIS_DEBUG to true or false. if you set it to true, you'll see exceptions and the PHP Debugbar, this means that you'll see what we see when we develop. It also allows you to let us know about any exceptions that may pop up when you try and use Webdis.

The final step is installing out Composer and NPM packages. We need the composer packages to be able to run Webdis, and we need the NPM packages incase you want to change some styling. We use Tailwind for our styling, to make Webdis very useful.

$ composer install

$ npm install

Now there are multiple ways to set up your local web server to be able to check out Webdis. We'll assume you know how to do this for now. We may add instructions to this at a later time, but essentially, you can use any tutorial on setting up your web server with Laravel.

However, if you have docker and docker-compose installed, you can run docker-compose up to be able to set up a web server without installing one. It includes a nginx.conf file that is used in the docker image, which you can see in the docker/ folder. If you have Redis already installed on your local machine, remove the redis service in the docker-compose.yml as well as at the depends_on part as well. The Redis service is there for the sole reason of being able to develop Webdis without installing Redis locally.

Extra steps for production

There are very few steps for production, and we have taken the time to make it as simple as possible to minify everything and have it working on production.

CSS And JS Assets

To minify the CSS and JavaScript assets we have created, we use Laravel Mix.

$ npx mix --production

This will minify our CSS and Javascript, as well as remove any unused styles. As of writing this, development CSS and JavaScript take up 3.95MB and 6.26KB, respectively. After compiling for production, they change to 4.82 KB and 975 Bytes, respectively. This is a considerable change, as when we compile for production, anything we don't actually use is completely removed for simplicity.

Last updated