Code Monkey home page Code Monkey logo

shinage-server's Introduction

Shinage Server

MIT license Build Status Scrutinizer Code Quality Open Source Love png1

Introduction

This is a piece of software running on a web server providing management functionality for Shinage digital signage solutions.

It's based on Symfony.

Hosted

If you don't want to care about stuff like servers and security we can provide the fully functionally hosted solution for you. No knowledge about servers or programming needed. Please contact us!

Prerequisites

  • A machine with a running PHP installation (8.2 or newer) with mysql support, libgd and terminal access.
  • MariaDB- or MySQL-Server (local or remote).
  • At least one database on this MySQL-Server.
    (Run mysql -uroot -p and then type CREATE DATABASE your_database_name; )
  • At least one user with full access to this database.
    (Run CREATE USER 'your_user_name'@'localhost' IDENTIFIED BY 'your_password'; and GRANT ALL PRIVILEGES ON your_db_name . * TO 'your_user_name'@'localhost';)
  • Local or global Composer-Installation on this machine.

Installation

  • This guide assumes that composer is installed globally. (If yours is installed somewhere locally, replace composer by something like php /path/to/composer.phar )
  • Please check (and install) the Prerequisites.
  • Clone this repository.
  • Change to the freshly cloned directory. (Something like cd shinage-server )
  • Run composer install --no-dev
  • Create a .env file containing configuration and credentials (for example see .env.dist).
  • Run php bin/console doctrine:schema:update --force
  • To create a first user run:
    php bin/console fos:user:create --super-admin
  • Perhaps you have to adjust the file system permissions. On Linux/Unix/BSD/... do:
    mkdir ./data; chmod -R 0777 ./var ./data
    (If you know what you do you can avoid giving 777-permissions by only granting read-write permission to the user the web server is running as.)
  • If you want to host your own service, you really should know what to do from here. (i.e. installing and configuring a web server)
  • If you do not know what to do but still want to use shinage, please think about using a hosted solution.

Development

  • Follow the Installation steps above, but do a composer install instead of composer install --no-dev.
  • There are two ways of running the application for development:
    • Executing php bin/console server:start will run the built-in webserver on loopback device (127.0.0.1 or ::1) on port 8000. You can even run the webserver on a specific device/address and port:
      php bin/console server:start 192.168.0.1:8080.

      For details see Symfony's How to Use PHP's built-in Web Server.

    • For better testing (including sending mails) you can use a ready-to-go docker based development environment: bin/devEnv.sh start. For this you need a working docker and docker-composer installation. The relevant ports are mapped to host ports and printed to console during startup. For example you can open the web interface via http://localhost:8001/ or https://localhost:44301.

      In the docker development environment there is a working Mailhog installation that catches all mails sent via PHP mail() function in the php container.

    • If you use the docker based environment it is important to understand that must commands have to be executed inside the php container. There is a tiny helper script that executes the necessary docker exec command at bin/runInDev.sh. For example to call the Symfony console you have to run bin/runInDev.sh bin/console.

Testing

To run phpspec, do:

./vendor/bin/phpspec run --format=dot --no-code-generation

To run behat, first initialize the testing database:

php bin/console doctrine:database:create --env=test
php bin/console doctrine:schema:update --force --env=test
php bin/console doctrine:fixtures:load --env=test

Then start the development webserver:

APP_ENV=test symfony local:server:start --no-tls --port=8000

And in a separate shell execute behat:

APP_ENV=test vendor/bin/behat --format=progress --strict -n --tags="~@todo"

Containerize me

If you are brave you can run this server application in a container based setup (for example using Docker). The development environment uses a bunch of docker containers, including a redis container for decentralized efficient session storage. So if you want to, try your luck.

Some notes:

  • Remember to use a centralized session storage (for example Redis, memcached, ...)
  • The /data directory has to be in sync between all nodes. Use a network storage (nfs), another shared storage mechanism or at least sync the files in realtime (discouraged)!

Contributing

Feel free to file issues, fork and/or create pull requests.

License

MIT, see also file LICENSE.

shinage-server's People

Contributors

dependabot[bot] avatar michz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shinage-server's Issues

Presentation

in presentation image links are broken for ex: pool/emailaddress / ..... .jpg so this structure doesnt work
also after add image in presentation you cant delete presentation and get error

Introduce presentations archive

Make presentations archivable to make the presentations view more readable.
Perhaps introduce folders or tags or so for presentations.

Transfer ownership of Presentation

Transfer ownership of presentation between users and organizations.

First step: Make owner of presentation selectable from "me" and "(...my organizations...)"

Delete presentations

Make presentations deletable.

(Perhaps "delete" means just to flag "deleted" and make it inaccessible from API and Management.)

Composer dependencies require a PHP version ">= 8.0.2"

I have PHP 7.4 and in readme it said requires only PHP 7.4

but when i ran php bin/console doctrine:schema:update --force

It returns

Composer detected issues in your platform:

Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.30.

PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.30. in /home/ubuntu/shinage-server/vendor/composer/platform_check.php on line 24

User seems not to be member of new organization

When a new organization is created it seems to have no members. The creator is a member of the organization but is not shown. On later reloads of the page this is shown.
So this is a presentation bug.

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.