Code Monkey home page Code Monkey logo

demo's Introduction

Servd Demo Project

You can use this repo to test out some of Servd's functionality.

It contains:

  • A simple Craft 3 project
  • The Servd Assets and Helpers Plugin
  • Docker configuration to run the project locally
  • A dockerised buildchain for compiling CSS and JS assets, and optimising static images

Run Locally

  1. Copy .env.example to .env
  2. chmod 777 -R src/config
  3. docker-compose up
  4. Visit http://localhost in your browser

Optionally import the database dump in the root of this repo.

Launch on Servd

  • Fork this repo
  • Create a new project on Servd
  • Select your fork as the source
  • Accept the default suggestions for all the settings
  • Wait for your project to be deployed
  • Run through the Craft install process in order to apply the included project config settings

Set Up Asset Volume

A Servd Asset Volume is defined in the included project config. Once your site is live you can test it out by uploading a jpeg, gif or png via the craft dashboard. If you preview the uploaded image and check the URL that it was served from you should see that it originated from either:

https://optimise2.assets-servd.host or https://cdn2.assets-servd.host

The assets platform is working! Image transforms and optimisations are being performed off server so they can't impact your site's visitors or content authors.

Using the assets platform locally

If you want to test this project in a local development environment, please follow the instructions included in the Servd Assets and Helpers Plugin README regarding how to use Servd's assets platform locally.

Database Dump

This repo contains a database dump called servd-demo.sql which you can use to test Servd's database import functionality.

Once imported you can log into the Craft Control Panel by visiting /admin and using the following credentials:

Username: admin

Password: password

demo's People

Contributors

mattgrayisok avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

demo's Issues

first docker set-up

Started up my first servd. project using the servd/demo repo I ran into this error during docker compose

Composer (version 2.0.8) successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer

Removing intermediate container b529d21a70b6
 ---> 3e65faa145b8
Step 4/7 : RUN composer global require hirak/prestissimo
 ---> Running in e7adc5540e6e
Changed current directory to /root/.composer

                                                                                                    
[RuntimeException]                                                                                    
No composer.json present in the current directory, this may be the cause of the following exception.  
                                                                                                    

                                                                                                                       
[InvalidArgumentException]                                                                                               
Package hirak/prestissimo has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version  
                                                                                                                       

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-scripts] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]...

ERROR: Service 'php' failed to build : The command '/bin/sh -c composer global require hirak/prestissimo' returned a non-zero code: 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.