All Projects → orottier → local-office-server

orottier / local-office-server

Licence: other
Useful stuff to run on the in-office microserver

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
shell
77523 projects
ApacheConf
554 projects

Kantoortuin

Build Status Coverage Status Dependency Status Code Climate License Badges

A friendly local office server that will aid you in your day to day office life.

It's a next generation sentient machine that enjoys talking to other services and devices to put some synergy in your depressing workplace.

  • Sonos
  • Check in system
  • Slack
  • Third party APIs

Features

  • Auto check in if your laptop connects to the network
  • Tells you which song is playing

Todo:

  • Plan your cocktail Friday
  • Get notified if the boss enters the office
  • Play songs at given times (lunch tune, cocktail tune)
  • Play a song at given events (boss enters the office)
  • Connect with barcode reader to order supplies from grocery store

Get started with your dev environment

Option 1: if you have a webserver, PHP, some database service, npm and composer running locally

  • clone this repo
  • point your webserver to the /public folder

Option 2: using Docker to run the components

  • Install and run Docker
  • clone this repo with submodules: git clone --recursive ...
  • in the laradock folder: docker-compose up -d nginx mysql
  • use docker-machine ip to find out the docker IP address (e.g. for setting the db host)
  • Enter the virtual machine: docker exec -it {Workspace-Container-Name} bash (check docker-compose ps)

Next:

  • cp .env.example .env and update accordingly
  • composer install
  • php artisan migrate
  • npm install
  • gulp compile

Run in production

This repo comes with a .travis.yml file to set up continuous integration. Pushing work to master will deploy code to the office raspberry pi:

  • Travis will clone the repo, install dependecies and run tests
  • on success, deploy.sh will
    • package the files needed for running the app
    • copy it to the server
  • then install_release.sh will be run on the office server
    • move the app files to the right place
    • make sure it's runnable by setting env and database
    • run migrations
    • reload apache and supervisor

The deploy process depends on an encrypted travis file: secrets.tar, containing

  • a private key to log in to the server (ssh_deploy_key, make sure you add the pubkey to the authorized_keys on the server)
  • a known_hosts file with the signature of the server
  • a ssh config file, with the server host and port (called ssh_config, containing Host remote)

License

The Kantoortuin is open-sourced software licensed under the MIT license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].