├── .travis.yml ├── Dockerfile ├── README.md ├── bin ├── autostart │ └── autostart.sh ├── dockeros.sh ├── environments │ ├── example1 │ │ ├── algorithm.xml │ │ ├── capture.xml │ │ ├── cloud.xml │ │ ├── condition.xml │ │ ├── config.xml │ │ ├── expositor.xml │ │ ├── heuristic.xml │ │ ├── io.xml │ │ └── stream.xml │ └── example2 │ │ ├── algorithm.xml │ │ ├── capture.xml │ │ ├── cloud.xml │ │ ├── condition.xml │ │ ├── config.xml │ │ ├── expositor.xml │ │ ├── heuristic.xml │ │ ├── io.xml │ │ └── stream.xml ├── src │ └── docker.sh └── template │ ├── algorithm.xml │ ├── capture.xml │ ├── cloud.xml │ ├── condition.xml │ ├── config.xml │ ├── expositor.xml │ ├── heuristic.xml │ ├── io.xml │ └── stream.xml ├── config ├── algorithm.xml ├── capture.xml ├── cloud.xml ├── condition.xml ├── config.xml ├── expositor.xml ├── heuristic.xml ├── io.xml └── stream.xml ├── run.sh ├── supervisord.conf ├── web.conf └── webconfig ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── database.php ├── filesystems.php ├── kerberos.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php /.travis.yml: -------------------------------------------------------------------------------- 1 | language: bash 2 | services: 3 | - docker 4 | script: 5 | - echo "Building Kerberos.io docker container." 6 | notifications: 7 | email: 8 | recipients: 9 | - cedric@verstraeten.io 10 | on_success: always 11 | on_failure: always 12 | irc: 13 | channels: 14 | - chat.freenode.net#kerberos.io 15 | on_success: always 16 | on_failure: always 17 | slack: 18 | rooms: 19 | secure: pBC48TUzwFhXs2maG9a+Sd0+P3OBAS0vXi4xSraIrk0IBJCQjwH+yu3/RFT0nzCrltWuLr6e+iGtnBAl8P3QuijaNaBNJly5m1LI+Z4iGH2KzUdX/2wBOP+ALsv+mXnM3ORguBwcrMDpXMaH7UDcVQARoPxvK35Opr1RKPuQtLo= 20 | on_success: always 21 | on_failure: always 22 | after_success: 23 | - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then docker login -u="$DOCKER_USERNAME" 24 | -p="$DOCKER_PASSWORD"; if [ "$TRAVIS_BRANCH" == "master" ]; then docker build -t 25 | kerberos .; docker tag kerberos kerberos/kerberos:master; docker push kerberos/kerberos:master; else 26 | docker build --build-arg APP_ENV="$TRAVIS_BRANCH" -t kerberos .; docker tag kerberos kerberos/kerberos:$TRAVIS_BRANCH; 27 | docker push kerberos/kerberos:$TRAVIS_BRANCH; fi fi 28 | env: 29 | global: 30 | secure: m9J2f2AphCP8fSMOONTWVHmyabBEAaBWgoXSN6c9dfKbNbN3OS3V2wbiB8OO7PuaVZegjRbsCGlB4dUoD1FAAYdyIero2yg3H7cvmKIAmoRsROJvACZh4I52g5iGCxxxLsXyhRet6FY3Tg+ztN71eKsBf7Eaggja0CUnfNz6Byc= 31 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:stretch AS builder 2 | MAINTAINER "Cédric Verstraeten" 3 | 4 | ARG APP_ENV=master 5 | ENV APP_ENV ${APP_ENV} 6 | ARG PHP_VERSION=7.1 7 | ARG FFMPEG_VERSION=3.1 8 | 9 | ################################# 10 | # Surpress Upstart errors/warning 11 | 12 | RUN dpkg-divert --local --rename --add /sbin/initctl 13 | RUN ln -sf /bin/true /sbin/initctl 14 | 15 | ############################################# 16 | # Let the container know that there is no tty 17 | 18 | ENV DEBIAN_FRONTEND noninteractive 19 | 20 | ######################################### 21 | # Update base image 22 | # Add sources for latest nginx and cmake 23 | # Install software requirements 24 | 25 | RUN apt-get update && apt-get install -y apt-transport-https wget lsb-release && \ 26 | wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \ 27 | echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list && \ 28 | apt -y update && \ 29 | apt -y install software-properties-common libssl-dev git supervisor curl \ 30 | subversion libcurl4-openssl-dev cmake dh-autoreconf autotools-dev autoconf automake gcc g++ \ 31 | build-essential libtool make nasm zlib1g-dev tar apt-transport-https \ 32 | ca-certificates wget nginx php${PHP_VERSION}-cli php${PHP_VERSION}-gd php${PHP_VERSION}-mcrypt php${PHP_VERSION}-curl \ 33 | php${PHP_VERSION}-mbstring php${PHP_VERSION}-dom php${PHP_VERSION}-zip php${PHP_VERSION}-fpm pwgen && \ 34 | curl -sL https://deb.nodesource.com/setup_9.x | bash - && apt-get install -y nodejs npm 35 | 36 | RUN wget http://www.nasm.us/pub/nasm/releasebuilds/2.13.01/nasm-2.13.01.tar.bz2 && \ 37 | tar xjvf nasm-2.13.01.tar.bz2 && \ 38 | cd nasm-2.13.01 && \ 39 | ./autogen.sh && \ 40 | ./configure && \ 41 | make && \ 42 | make install 43 | 44 | RUN apt-get install nasm 45 | 46 | ############################ 47 | # Clone and build x264 48 | 49 | RUN git clone https://code.videolan.org/videolan/x264 /tmp/x264 && \ 50 | cd /tmp/x264 && \ 51 | git checkout df79067c && \ 52 | ./configure --prefix=/usr --enable-shared --enable-static --enable-pic && make && make install 53 | 54 | ############################ 55 | # Clone and build ffmpeg 56 | 57 | # Get latest userland tools and build. Clean up unused stuff at the end 58 | RUN cd \ 59 | && git clone --depth 1 https://github.com/raspberrypi/userland.git \ 60 | && cd userland \ 61 | && sed -i 's/sudo//g' ./buildme \ 62 | && ./buildme \ 63 | && rm -rf ../userland 64 | RUN apt-get install libomxil-bellagio-dev -y 65 | RUN apt-get install -y pkg-config && git clone https://github.com/FFmpeg/FFmpeg && \ 66 | cd FFmpeg && git checkout remotes/origin/release/${FFMPEG_VERSION} && \ 67 | ./configure --enable-nonfree --enable-libx264 --enable-gpl && make && \ 68 | make install && \ 69 | cd .. && rm -rf FFmpeg 70 | 71 | ############################ 72 | # Clone and build machinery 73 | 74 | RUN git clone https://github.com/kerberos-io/machinery /tmp/machinery && \ 75 | cd /tmp/machinery && git checkout c8b551b12e82041a49275b2239f672ecc34700e6 && \ 76 | mkdir build && cd build && \ 77 | cmake .. && make && make check && make install && \ 78 | rm -rf /tmp/machinery && \ 79 | chown -Rf www-data.www-data /etc/opt/kerberosio && \ 80 | chmod -Rf 777 /etc/opt/kerberosio/config 81 | 82 | ##################### 83 | # Clone and build web 84 | 85 | RUN git clone https://github.com/kerberos-io/web /var/www/web && cd /var/www/web && git checkout 0b054205a640f24a3febe9a3e3b6c7ba0d21a8f3 && \ 86 | chown -Rf www-data.www-data /var/www/web && curl -sSk https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \ 87 | cd /var/www/web && \ 88 | composer install && \ 89 | npm config set unsafe-perm true && \ 90 | npm config set registry http://registry.npmjs.org/ && \ 91 | npm config set strict-ssl=false && \ 92 | npm install -g bower && \ 93 | cd public && \ 94 | sed -i 's/https/http/g' .bowerrc && \ 95 | bower --allow-root install 96 | 97 | RUN rm /var/www/web/public/capture && \ 98 | ln -s /etc/opt/kerberosio/capture/ /var/www/web/public/capture 99 | 100 | # Fixes, because we are now combining the two docker images. 101 | # Docker is aware of both web and machinery. 102 | 103 | RUN sed -i -e "s/'insideDocker'/'insideDocker' => false,\/\//" /var/www/web/app/Http/Controllers/SystemController.php 104 | RUN sed -i -e "s/service kerberosio status/supervisorctl status machinery \| grep \"RUNNING\"';\/\//" /var/www/web/app/Http/Repositories/System/OSSystem.php 105 | 106 | # Let's create a /dist folder containing just the files necessary for runtime. 107 | # Later, it will be copied as the / (root) of the output image. 108 | 109 | WORKDIR /dist 110 | RUN mkdir -p ./etc/opt && cp -r /etc/opt/kerberosio ./etc/opt/ 111 | RUN mkdir -p ./usr/bin && cp /usr/bin/kerberosio ./usr/bin/ 112 | RUN mkdir -p ./var/www && cp -r /var/www/web ./var/www/ 113 | RUN test -d /opt/vc && mkdir -p ./usr/lib && cp -r /opt/vc/lib/* ./usr/lib/ || echo "not found" 114 | RUN cp /usr/local/bin/ffmpeg ./usr/bin/ffmpeg 115 | 116 | # Optional: in case your application uses dynamic linking (often the case with CGO), 117 | # this will collect dependent libraries so they're later copied to the final image 118 | # NOTE: make sure you honor the license terms of the libraries you copy and distribute 119 | RUN ldd /usr/bin/kerberosio | tr -s '[:blank:]' '\n' | grep '^/' | \ 120 | xargs -I % sh -c 'mkdir -p $(dirname ./%); cp % ./%;' 121 | 122 | FROM debian:stretch-slim 123 | 124 | ################################# 125 | # Copy files from previous images 126 | 127 | COPY --chown=0:0 --from=builder /dist / 128 | 129 | RUN apt-get -y update && apt-get install -y apt-transport-https wget curl lsb-release && \ 130 | wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \ 131 | echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list && apt update -y 132 | 133 | #################################### 134 | # ADD supervisor and STARTUP script 135 | 136 | RUN apt-get install -y supervisor && mkdir -p /var/log/supervisor/ 137 | ADD ./supervisord.conf /etc/supervisord.conf 138 | ADD ./run.sh /run.sh 139 | RUN chmod 755 /run.sh && chmod +x /run.sh 140 | 141 | ###################### 142 | # INSTALL Nginx 143 | 144 | RUN apt-get install -y nginx && mkdir -p /run/nginx 145 | RUN rm -Rf /etc/nginx/conf.d/* && rm -Rf /etc/nginx/sites-available/default && rm -Rf /etc/nginx/sites-enabled/default && mkdir -p /etc/nginx/ssl 146 | ADD ./web.conf /etc/nginx/sites-available/default.conf 147 | RUN ln -s /etc/nginx/sites-available/default.conf /etc/nginx/sites-enabled/default.conf 148 | 149 | RUN chmod -R 777 /var/www/web/bootstrap/cache/ && \ 150 | chmod -R 777 /var/www/web/storage && \ 151 | chmod 777 /var/www/web/config/kerberos.php && \ 152 | chmod -R 777 /etc/opt/kerberosio/config 153 | 154 | ###################### 155 | # INSTALL PHP 156 | 157 | ARG PHP_VERSION=7.1 158 | 159 | RUN apt -y install php${PHP_VERSION}-cli php${PHP_VERSION}-gd php${PHP_VERSION}-mcrypt php${PHP_VERSION}-curl \ 160 | php${PHP_VERSION}-mbstring php${PHP_VERSION}-dom php${PHP_VERSION}-zip php${PHP_VERSION}-fpm 161 | 162 | ######################################## 163 | # Force both nginx and PHP-FPM to run in the foreground 164 | # This is a requirement for supervisor 165 | 166 | RUN echo "daemon off;" >> /etc/nginx/nginx.conf 167 | RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php/${PHP_VERSION}/fpm/php-fpm.conf 168 | RUN sed -i 's/"GPCS"/"EGPCS"/g' /etc/php/${PHP_VERSION}/fpm/php.ini 169 | RUN sed -i 's/"--daemonize/"--daemonize --allow-to-run-as-root/g' /etc/init.d/php${PHP_VERSION}-fpm 170 | RUN sed -i 's/www-data/root/g' /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf 171 | RUN sed -i 's/www-data/root/g' /etc/nginx/nginx.conf 172 | RUN sed -i -e "s/;listen.mode = 0660/listen.mode = 0750/g" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf && \ 173 | find /etc/php/${PHP_VERSION}/cli/conf.d/ -name "*.ini" -exec sed -i -re 's/^(\s*)#(.*)/\1;\2/g' {} \; 174 | 175 | ############################ 176 | # COPY template folder 177 | 178 | # Copy the config template to filesystem 179 | ADD ./config /etc/opt/kerberosio/template 180 | ADD ./webconfig /var/www/web/template 181 | 182 | ######################################################## 183 | # Exposing web on port 80 and livestreaming on port 8889 184 | 185 | EXPOSE 8889 186 | EXPOSE 80 187 | 188 | ############################ 189 | # Volumes 190 | 191 | VOLUME ["/etc/opt/kerberosio/capture"] 192 | VOLUME ["/etc/opt/kerberosio/config"] 193 | VOLUME ["/etc/opt/kerberosio/logs"] 194 | VOLUME ["/var/www/web/config"] 195 | 196 | CMD ["bash", "/run.sh"] 197 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Kerberos Open Source - Docker (Archived) 2 | 3 | This project is archived, and move to the new agent repository: [Kerberos Agent](https://github.com/kerberos-io/agent). 4 | 5 | --- 6 | 7 | [![Build Status](https://travis-ci.org/kerberos-io/docker.svg)](https://travis-ci.org/kerberos-io/docker) [![Join the chat](https://img.shields.io/gitter/room/TechnologyAdvice/Stardust.svg?style=flat)](https://gitter.im/kerberos-io/hades?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 8 | 9 | ## License 10 | 11 | The Kerberos Open Source project is licensed with BY-NC-SA 4.0, this means that everyone can use Kerberos and modify if to their needs, in a non commercial activity. 12 | 13 | More information [**about this license**](https://doc.kerberos.io/opensource/license). 14 | 15 | ## Why Kerberos? 16 | 17 | As burglary is very common, we believe that video surveillance is a **trivial tool** in our daily lifes which helps us to **feel** a little bit more **secure**. Responding to this need, a lot of companies have started developing their own video surveillance software in the past few years. 18 | 19 | Nowadays we have a myriad of **expensive** cameras, recorders, and software solutions which are mainly **outdated** and **difficult** to install and use. Kerberos Open Source goal is to solve these problems and to provide every human being in this world to have their own **ecological**, **affordable**, **easy-to-use** and **innovative** surveillance solution. 20 | 21 | # Docker 22 | 23 | A Docker image (x86, ARMv7, ARMv8) is available on [**the Docker Hub**](https://hub.docker.com/r/kerberos/kerberos), which contains all the necessary software to setup the Kerberos agent. Before you can run this image you will have to make sure [**Docker**](https://docker.com) is installed. After the installation you can use **docker run** to get the Kerberos agent up and running; you can also opt for **dockeros** to create and scale your Kerberos agents. 24 | 25 | ## Use docker run 26 | 27 | After you've installed Docker, you can open a command prompt and type in following command. This will pull the kerberos image and make the web interface available on port 80 and the livestream on port 8889. You can give the container a custom name using the **--name** property. 28 | 29 | docker run --name camera1 -p 80:80 -p 8889:8889 -d kerberos/kerberos 30 | docker run --name camera2 -p 81:80 -p 8890:8889 -d kerberos/kerberos 31 | docker run --name camera3 -p 82:80 -p 8891:8889 -d kerberos/kerberos 32 | 33 | ## Or use dockeros (our docker creation tool) 34 | 35 | We've created a simple and small tool to auto provision and auto configure the Kerberos agents. The idea is that you define the different configurations for every camera upfront (/environments directory), and map them to into your Docker container (using volumes). The ultimate goal is to have a fully automated for provisioning your Kerberos agents in just a matter of seconds. It's also a great way to backup your security configuration. 36 | 37 | CAMERA 1 <<== CONTAINER1 <<== environment/cameraconfig1 38 | CAMERA 2 <<== CONTAINER2 <<== environment/cameraconfig2 39 | CAMERA 3 <<== CONTAINER2 <<== environment/cameraconfig3 40 | 41 | ### How to use it? 42 | 43 | The tool we've created is a simple bash script which we called **dockeros**, and exposes a couple of methods; discussed below. By specifying a number of parameters, **dockeros** will do all the magic dockering for you. This tool is still work in progress, so PR's and new features are welcome! 44 | 45 | git clone https://github.com/kerberos-io/docker 46 | cd docker/bin 47 | ./dockeros.sh {command} 48 | 49 | ### Commands 50 | 51 | List all kerberos.io containers which are created. 52 | 53 | ./dockeros.sh showall 54 | 55 | 56 | Remove all kerberos.io containers which were created before. 57 | 58 | ./dockeros.sh cleanup 59 | 60 | Create a kerberos.io container with a name and predefined configuration. 61 | 62 | ./dockeros.sh create {name} {config} {webport} {streamport} 63 | 64 | * **name**: This is the name of the container which will be created. 65 | 66 | * **config**: The configuration which needs to be injected in the container. The configuration directories can be found in the **/environments** folder. 67 | 68 | * **webport**: The port on which the webinterface will be served. 69 | 70 | * **streamport**: The port on which the livestream will be served. 71 | 72 | ### Buildx 73 | 74 | docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d 75 | 76 | docker buildx create --name nubuilder --driver docker-container 77 | 78 | docker buildx use nubuilder 79 | 80 | docker buildx inspect --bootstrap 81 | 82 | # linux/arm/v6 gives issues on php7.1 83 | docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64 -t kerberos/kerberos --push . 84 | 85 | -------------------------------------------------------------------------------- /bin/autostart/autostart.sh: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /bin/dockeros.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | BASEDIR=$(cd `dirname $0` && pwd) 4 | source "$BASEDIR/src/docker.sh" 5 | 6 | # Sanity checks for docker binary. 7 | # Check if docker is installed. 8 | #TODO 9 | # Check if docker is running. 10 | #TODO 11 | 12 | # Fetch input parameters 13 | command=$1 14 | 15 | case "$command" in 16 | "cleanup") 17 | cleanup 18 | ;; 19 | "create") 20 | create $2 $3 $4 $5 21 | ;; 22 | "start") 23 | start 24 | ;; 25 | "showall") 26 | showall 27 | ;; 28 | esac 29 | -------------------------------------------------------------------------------- /bin/environments/example1/algorithm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 5 6 | 15 7 | 8 | 9 | 10 | false 11 | 15 12 | 5 13 | 1 14 | 5 15 | 7 16 | 10 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /bin/environments/example1/capture.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | rtsp://admin:888888@192.168.0.13/tcp/av0_1 6 | 640 7 | 480 8 | 500 9 | 0 10 | 11 | 12 | 13 | 640 14 | 480 15 | 0 16 | MJPG 17 | 500 18 | 0 19 | 20 | 21 | 22 | 640 23 | 480 24 | 500 25 | 0 26 | 20 27 | 0 28 | 0 29 | 0 30 | 50 31 | 32 | 33 | 34 | 640 35 | 480 36 | 0 37 | 500 38 | 0 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /bin/environments/example1/cloud.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /bin/environments/example1/condition.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | true 10 | 5000 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /bin/environments/example1/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | example1 6 | false 7 | Europe-Jersey 8 | RaspiCamera 9 | Mjpg 10 | Enabled 11 | DifferentialCollins 12 | Hull 13 | Sequence 14 | Video 15 | S3 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /bin/environments/example1/expositor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 0 7 | 0 8 | 800 9 | 600 10 | 11 | 12 | 13 | 14 | 779,588|781,28|588,48|377,31|208,63|32,45|33,625|191,591|347,600|456,572|556,601|659,629 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /bin/environments/example1/heuristic.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 20 6 | 2 7 | 1000 8 | 9 | 10 | 11 | 3 12 | 140 13 | 200 14 | true 15 | 20 16 | 100 17 | 100,100|100,200|200,100|200,200 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /bin/environments/example1/io.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | timestamp_microseconds_instanceName_regionCoordinates_numberOfChanges_token.jpg 6 | /etc/opt/kerberosio/capture/ 7 | false 8 | none 9 | false 10 | 0 11 | 12 | 27 | 28 | 17 29 | 1 30 | 100000 31 | 0 32 | 33 | 34 | 127.0.0.1 35 | 1337 36 | motion-detected 37 | 0 38 | 39 | 40 | http://localhost/api/v1/webhook 41 | 0 42 | 43 | 47 | 48 | false 49 | false 50 | m23.cloudmqtt.com 51 | 10187 52 | kios/mqtt 53 | xndxsbqn 54 | Df0_9GBvGyNj 55 | 10 56 | 57 | 58 | https://api.pushbullet.com 59 | o.mC5LPVCvPCphtSsEgWZQpFM86w9ciWQ3 60 | 10 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /bin/environments/example1/stream.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 8889 7 | 75 8 | 20 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /bin/environments/example2/algorithm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 5 6 | 15 7 | 8 | 9 | 10 | false 11 | 15 12 | 5 13 | 1 14 | 5 15 | 7 16 | 10 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /bin/environments/example2/capture.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | rtsp://admin:888888@192.168.0.13/tcp/av0_1 6 | 640 7 | 480 8 | 500 9 | 0 10 | 11 | 12 | 13 | 640 14 | 480 15 | 0 16 | MJPG 17 | 500 18 | 0 19 | 20 | 21 | 22 | 640 23 | 480 24 | 500 25 | 0 26 | 20 27 | 0 28 | 0 29 | 0 30 | 50 31 | 32 | 33 | 34 | 640 35 | 480 36 | 0 37 | 500 38 | 0 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /bin/environments/example2/cloud.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /bin/environments/example2/condition.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | true 10 | 5000 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /bin/environments/example2/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | example2 6 | false 7 | Europe-Jersey 8 | RaspiCamera 9 | Mjpg 10 | Enabled 11 | DifferentialCollins 12 | Hull 13 | Sequence 14 | Video 15 | S3 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /bin/environments/example2/expositor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 0 7 | 0 8 | 800 9 | 600 10 | 11 | 12 | 13 | 14 | 779,588|781,28|588,48|377,31|208,63|32,45|33,625|191,591|347,600|456,572|556,601|659,629 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /bin/environments/example2/heuristic.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 20 6 | 2 7 | 1000 8 | 9 | 10 | 11 | 3 12 | 140 13 | 200 14 | true 15 | 20 16 | 100 17 | 100,100|100,200|200,100|200,200 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /bin/environments/example2/io.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | timestamp_microseconds_instanceName_regionCoordinates_numberOfChanges_token.jpg 6 | /etc/opt/kerberosio/capture/ 7 | false 8 | none 9 | false 10 | 0 11 | 12 | 27 | 28 | 17 29 | 1 30 | 100000 31 | 0 32 | 33 | 34 | 127.0.0.1 35 | 1337 36 | motion-detected 37 | 0 38 | 39 | 40 | http://localhost/api/v1/webhook 41 | 0 42 | 43 | 47 | 48 | false 49 | false 50 | m23.cloudmqtt.com 51 | 10187 52 | kios/mqtt 53 | xndxsbqn 54 | Df0_9GBvGyNj 55 | 10 56 | 57 | 58 | https://api.pushbullet.com 59 | o.mC5LPVCvPCphtSsEgWZQpFM86w9ciWQ3 60 | 10 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /bin/environments/example2/stream.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 8889 7 | 75 8 | 20 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /bin/src/docker.sh: -------------------------------------------------------------------------------- 1 | function containerExists { 2 | name=$1 3 | if [ ! "$(docker ps -aq -f name=$name)" ]; then 4 | echo 0 5 | else 6 | echo 1 7 | fi 8 | } 9 | 10 | function create { 11 | name=$1 12 | environment=$2 13 | webport=$3 14 | streamport=$4 15 | 16 | # Validation of parameters 17 | while [[ $name == '' ]] || [ "$(containerExists kerberos-$name)" -eq "1" ] # While containername is valid or empty... 18 | do 19 | echo "Specify a name for the container (this needs to be unique)." 20 | echo "Make sure a container with the same name doesn't exists." 21 | read -p "Enter container name: " name 22 | done 23 | 24 | while [[ $environment == '' ]] || [[ ! -d "$BASEDIR/environments/$environment" ]] # While environment is valid or empty... 25 | do 26 | echo "Specify the name of the environment you which to load; subdir in the /environments folder." 27 | read -p "Enter environment: " environment 28 | done 29 | 30 | re='^[0-9]+$' 31 | while [[ $webport == '' ]] || ! [[ $webport =~ $re ]] # While port is not set or not a number 32 | do 33 | echo "Specify the port on which the webinterface will be available." 34 | read -p "Enter webinterface port: " webport 35 | done 36 | 37 | while [[ $streamport == '' ]] || ! [[ $streamport =~ $re ]] # While port is not set or not a number 38 | do 39 | echo "Specify the port on which the livestreaming will be available." 40 | read -p "Enter livestreaming port: " streamport 41 | done 42 | 43 | command="docker run --name kerberos-${name} --restart unless-stopped -p ${webport}:80 -p ${streamport}:8889 --mount type=bind,src=${BASEDIR}/environments/${environment},dst=/etc/opt/kerberosio/config -d kerberos/kerberos" 44 | output=$($command 2>&1) 45 | 46 | if [[ $output == '' ]] || [[ $output =~ "Error" ]] 47 | then 48 | echo "Hmm, something went wrong while creating the container." 49 | echo "Might be that the ports are already used for another container." 50 | echo "-------------------------" 51 | echo "ERROR WHILE CREATING CONTAINER" 52 | echo "Output: $output" 53 | echo "-------------------------" 54 | echo "SHOWING ALL KERBEROS.IO CONTAINERS" 55 | docker ps -aq --filter="name=kerberos" 56 | echo "-------------------------" 57 | echo "REMOVING CONTAINER AGAIN" 58 | if [ "$(docker ps -aq --filter="name=kerberos-$name")" ] 59 | then 60 | docker rm $(docker ps -aq --filter="name=kerberos-$name") 61 | fi 62 | else 63 | echo "Container succesfully created!" 64 | echo "Adding container command to autostart.sh" 65 | echo $command >> "$BASEDIR/autostart/autostart.sh" 66 | fi 67 | } 68 | 69 | function cleanup { 70 | echo "Stop all running Kerberos.io containers" 71 | if [ "$(docker ps -aq --filter="name=kerberos")" ] 72 | then 73 | docker stop $(docker ps -aq --filter="name=kerberos") 74 | fi 75 | 76 | echo "Remove all containers" 77 | if [ "$(docker ps -aq --filter="name=kerberos")" ] 78 | then 79 | docker rm $(docker ps -aq --filter="name=kerberos") 80 | fi 81 | 82 | echo "" > "$BASEDIR/autostart/autostart.sh" 83 | } 84 | 85 | function showall { 86 | echo "Showing all running Kerberos.io containers" 87 | docker ps --filter="name=kerberos" 88 | } 89 | 90 | function start { 91 | echo "Running all docker containers from autostart.sh" 92 | } 93 | -------------------------------------------------------------------------------- /bin/template/algorithm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 5 6 | 15 7 | 8 | 9 | 10 | false 11 | 15 12 | 5 13 | 1 14 | 5 15 | 7 16 | 10 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /bin/template/capture.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | rtsp://admin:888888@192.168.0.13/tcp/av0_1 6 | 640 7 | 480 8 | 500 9 | 0 10 | 11 | 12 | 13 | 640 14 | 480 15 | 0 16 | MJPG 17 | 500 18 | 0 19 | 20 | 21 | 22 | 640 23 | 480 24 | 500 25 | 0 26 | 20 27 | 0 28 | 0 29 | 0 30 | 50 31 | 32 | 33 | 34 | 640 35 | 480 36 | 0 37 | 500 38 | 0 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /bin/template/cloud.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ezg 6 | zeg 7 | zeg 8 | eg 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /bin/template/condition.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | true 10 | 5000 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /bin/template/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | frontdoor 6 | false 7 | Europe-Jersey 8 | RaspiCamera 9 | Mjpg 10 | Enabled 11 | DifferentialCollins 12 | Hull 13 | Sequence 14 | Disk,MQTT 15 | S3 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /bin/template/expositor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 0 7 | 0 8 | 800 9 | 600 10 | 11 | 12 | 13 | 14 | 779,588|781,28|588,48|377,31|208,63|32,45|33,625|191,591|347,600|456,572|556,601|659,629 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /bin/template/heuristic.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 20 6 | 2 7 | 1000 8 | 9 | 10 | 11 | 3 12 | 140 13 | 200 14 | true 15 | 20 16 | 100 17 | 100,100|100,200|200,100|200,200 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /bin/template/io.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | timestamp_microseconds_instanceName_regionCoordinates_numberOfChanges_token.jpg 6 | /etc/opt/kerberosio/capture/ 7 | false 8 | none 9 | false 10 | 0 11 | 12 | 27 | 28 | 17 29 | 1 30 | 100000 31 | 0 32 | 33 | 34 | 127.0.0.1 35 | 1337 36 | motion-detected 37 | 0 38 | 39 | 40 | http://localhost/api/v1/webhook 41 | 0 42 | 43 | 47 | 48 | false 49 | false 50 | m23.cloudmqtt.com 51 | 10187 52 | kios/mqtt 53 | xndxsbqn 54 | Df0_9GBvGyNj 55 | 10 56 | 57 | 58 | https://api.pushbullet.com 59 | o.mC5LPVCvPCphtSsEgWZQpFM86w9ciWQ3 60 | 10 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /bin/template/stream.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 8889 7 | 75 8 | 20 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /config/algorithm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 5 6 | 15 7 | 8 | 9 | 10 | false 11 | 15 12 | 5 13 | 1 14 | 5 15 | 7 16 | 10 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /config/capture.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | rtsp://admin:888888@192.168.0.13/tcp/av0_1 6 | 640 7 | 480 8 | 500 9 | 0 10 | 11 | 12 | 13 | 640 14 | 480 15 | 0 16 | MJPG 17 | 500 18 | 0 19 | 20 | 21 | 22 | 640 23 | 480 24 | 500 25 | 0 26 | 20 27 | 0 28 | 0 29 | 0 30 | 50 31 | 32 | 33 | 34 | 640 35 | 480 36 | 0 37 | 500 38 | 0 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /config/cloud.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /config/condition.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | true 10 | 5000 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /config/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | frontdoor 6 | false 7 | Europe-Brussels 8 | RaspiCamera 9 | Mjpg 10 | Enabled 11 | DifferentialCollins 12 | Hull 13 | Sequence 14 | Video 15 | S3 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /config/expositor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 0 7 | 0 8 | 800 9 | 600 10 | 11 | 12 | 13 | 14 | 779,588|781,28|588,48|377,31|208,63|32,45|33,625|191,591|347,600|456,572|556,601|659,629 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /config/heuristic.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 20 6 | 2 7 | 1000 8 | 9 | 10 | 11 | 3 12 | 140 13 | 200 14 | true 15 | 20 16 | 100 17 | 100,100|100,200|200,100|200,200 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /config/io.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | timestamp_microseconds_instanceName_regionCoordinates_numberOfChanges_token.jpg 6 | /etc/opt/kerberosio/capture/ 7 | false 8 | white 9 | false 10 | 0 11 | 12 | 27 | 28 | 17 29 | 1 30 | 100000 31 | 0 32 | 33 | 34 | 127.0.0.1 35 | 1337 36 | motion-detected 37 | 0 38 | 39 | 40 | http://localhost/api/v1/webhook 41 | 0 42 | 43 | 47 | 48 | false 49 | false 50 | 127.0.0.1 51 | 1883 52 | 53 | kios/mqtt 54 | 55 | 56 | 0 57 | 58 | 59 | https://api.pushbullet.com 60 | o.mC5LPVCvPCphtSsEgWZQpFM86w9ciWQ3 61 | 10 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /config/stream.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 8889 7 | 75 8 | 15 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | autoremoval() { 4 | while true; do 5 | sleep 60 6 | if [[ $(df -h /etc/opt/kerberosio/capture | tail -1 | awk -F' ' '{ print $5/1 }' | tr ['%'] ["0"]) -gt 90 ]]; 7 | then 8 | echo "Cleaning disk" 9 | find /etc/opt/kerberosio/capture/ -type f | sort | head -n 100 | xargs rm; 10 | fi; 11 | done 12 | } 13 | 14 | copyConfigFiles() { 15 | # Check if the config dir is empty, this can happen due to mapping 16 | # an empty filesystem to the volume. 17 | TEMPLATE_DIR=/etc/opt/kerberosio/template 18 | CONFIG_DIR=/etc/opt/kerberosio/config 19 | if [ "$(ls -A $CONFIG_DIR)" ]; then 20 | echo "Config files are available." 21 | else 22 | echo "Config files are missing, copying from template." 23 | cp /etc/opt/kerberosio/template/* /etc/opt/kerberosio/config/ 24 | chmod -R 777 /etc/opt/kerberosio/config 25 | fi 26 | 27 | # Do the same for the web config 28 | TEMPLATE_DIR=/var/www/web/template 29 | CONFIG_DIR=/var/www/web/config 30 | if [ "$(ls -A $CONFIG_DIR)" ]; then 31 | echo "Config files are available." 32 | else 33 | echo "Config files are missing, copying from template." 34 | cp /var/www/web/template/* /var/www/web/config/ 35 | chmod -R 777 /var/www/web/config 36 | fi 37 | } 38 | 39 | # replace SESSION_COOKIE_NAME 40 | random=$((1+RANDOM%10000)) 41 | sed -i -e "s/kerberosio_session/kerberosio_session_$random/" /var/www/web/.env 42 | 43 | autoremoval & 44 | copyConfigFiles & 45 | 46 | # changes for php 7.1 47 | echo "[www]" > /etc/php/7.1/fpm/pool.d/env.conf 48 | echo "" >> /etc/php/7.1/fpm/pool.d/env.conf 49 | env | grep "KERBEROSIO_" | sed "s/\(.*\)=\(.*\)/env[\1]='\2'/" >> /etc/php/7.1/fpm/pool.d/env.conf 50 | service php7.1-fpm start 51 | 52 | /usr/bin/supervisord -n -c /etc/supervisord.conf 53 | -------------------------------------------------------------------------------- /supervisord.conf: -------------------------------------------------------------------------------- 1 | [unix_http_server] 2 | file=/var/run/supervisor.sock ; (the path to the socket file) 3 | 4 | [supervisord] 5 | logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log) 6 | logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) 7 | logfile_backups=10 ; (num of main logfile rotation backups;default 10) 8 | loglevel=info ; (log level;default info; others: debug,warn,trace) 9 | pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid) 10 | nodaemon=false ; (start in foreground if true;default false) 11 | minfds=1024 ; (min. avail startup file descriptors;default 1024) 12 | minprocs=200 ; (min. avail process descriptors;default 200) 13 | user=root ; 14 | 15 | ; the below section must remain in the config file for RPC 16 | ; (supervisorctl/web interface) to work, additional interfaces may be 17 | ; added by defining them in separate rpcinterface: sections 18 | [rpcinterface:supervisor] 19 | supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 20 | 21 | [supervisorctl] 22 | serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket 23 | 24 | [program:machinery] 25 | command=/usr/bin/kerberosio 26 | autostart=true 27 | autorestart=true 28 | priority=10 29 | stdout_events_enabled=true 30 | stderr_events_enabled=true 31 | 32 | [program:nginx] 33 | command=/usr/sbin/nginx 34 | autostart=true 35 | autorestart=true 36 | priority=10 37 | stdout_events_enabled=true 38 | stderr_events_enabled=true 39 | -------------------------------------------------------------------------------- /web.conf: -------------------------------------------------------------------------------- 1 | server 2 | { 3 | listen 80; 4 | 5 | root /var/www/web/public; 6 | index index.php index.html index.htm; 7 | 8 | error_log /dev/stdout info; 9 | access_log /dev/stdout; 10 | 11 | location / 12 | { 13 | try_files $uri $uri/ /index.php?q=$uri&$args; 14 | } 15 | 16 | location ~ \.php$ 17 | { 18 | fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; 19 | fastcgi_index index.php; 20 | include fastcgi.conf; 21 | } 22 | 23 | location /stream 24 | { 25 | proxy_set_header Authorization $http_authorization; 26 | proxy_read_timeout 1s; 27 | proxy_pass http://localhost:8889; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /webconfig/app.php: -------------------------------------------------------------------------------- 1 | '2.8.0', 17 | 18 | 'config' => '/etc/opt/kerberosio/config', 19 | 20 | 'filesystem' => [ 21 | 22 | 'fileFormat' => 'timestamp_microseconds_instanceName_regionCoordinates_numberOfChanges_token.jpg', 23 | 24 | 'disk' => [ 25 | 'path' => '/capture', 26 | ], 27 | 28 | 'amazons3' => [ 29 | 'bucket' => '', // Amazon bucket name 30 | 'path' => '/', // Path to a specific directory of the bucket 31 | 'key' => '', // Your AWS Access Key ID 32 | 'secret' => '', // Your AWS Secret Access Key 33 | 'region' => '', 34 | 'config_file' => null, 35 | ], 36 | 37 | ], 38 | 39 | /* 40 | |-------------------------------------------------------------------------- 41 | | Application Name 42 | |-------------------------------------------------------------------------- 43 | | 44 | | This value is the name of your application. This value is used when the 45 | | framework needs to place the application's name in a notification or 46 | | any other location as required by the application or its packages. 47 | */ 48 | 49 | 'name' => env('APP_NAME', 'Laravel'), 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | Application Environment 54 | |-------------------------------------------------------------------------- 55 | | 56 | | This value determines the "environment" your application is currently 57 | | running in. This may determine how you prefer to configure various 58 | | services your application utilizes. Set this in your ".env" file. 59 | | 60 | */ 61 | 62 | 'env' => env('APP_ENV', 'production'), 63 | 64 | /* 65 | |-------------------------------------------------------------------------- 66 | | Application Debug Mode 67 | |-------------------------------------------------------------------------- 68 | | 69 | | When your application is in debug mode, detailed error messages with 70 | | stack traces will be shown on every error that occurs within your 71 | | application. If disabled, a simple generic error page is shown. 72 | | 73 | */ 74 | 75 | 'debug' => env('APP_DEBUG', false), 76 | 77 | /* 78 | |-------------------------------------------------------------------------- 79 | | Application URL 80 | |-------------------------------------------------------------------------- 81 | | 82 | | This URL is used by the console to properly generate URLs when using 83 | | the Artisan command line tool. You should set this to the root of 84 | | your application so that it is used when running Artisan tasks. 85 | | 86 | */ 87 | 88 | 'url' => env('APP_URL', 'http://localhost'), 89 | 90 | /* 91 | |-------------------------------------------------------------------------- 92 | | Application Timezone 93 | |-------------------------------------------------------------------------- 94 | | 95 | | Here you may specify the default timezone for your application, which 96 | | will be used by the PHP date and date-time functions. We have gone 97 | | ahead and set this to a sensible default for you out of the box. 98 | | 99 | */ 100 | 101 | 'timezone' => 'UTC', 102 | 103 | /* 104 | |-------------------------------------------------------------------------- 105 | | Application Locale Configuration 106 | |-------------------------------------------------------------------------- 107 | | 108 | | The application locale determines the default locale that will be used 109 | | by the translation service provider. You are free to set this value 110 | | to any of the locales which will be supported by the application. 111 | | 112 | */ 113 | 114 | 'locale' => 'en', 115 | 116 | /* 117 | |-------------------------------------------------------------------------- 118 | | Application Fallback Locale 119 | |-------------------------------------------------------------------------- 120 | | 121 | | The fallback locale determines the locale to use when the current one 122 | | is not available. You may change the value to correspond to any of 123 | | the language folders that are provided through your application. 124 | | 125 | */ 126 | 127 | 'fallback_locale' => 'en', 128 | 129 | /* 130 | |-------------------------------------------------------------------------- 131 | | Encryption Key 132 | |-------------------------------------------------------------------------- 133 | | 134 | | This key is used by the Illuminate encrypter service and should be set 135 | | to a random, 32 character string, otherwise these encrypted strings 136 | | will not be safe. Please do this before deploying an application! 137 | | 138 | */ 139 | 140 | 'key' => env('APP_KEY'), 141 | 142 | 'cipher' => 'AES-256-CBC', 143 | 144 | /* 145 | |-------------------------------------------------------------------------- 146 | | Logging Configuration 147 | |-------------------------------------------------------------------------- 148 | | 149 | | Here you may configure the log settings for your application. Out of 150 | | the box, Laravel uses the Monolog PHP logging library. This gives 151 | | you a variety of powerful log handlers / formatters to utilize. 152 | | 153 | | Available Settings: "single", "daily", "syslog", "errorlog" 154 | | 155 | */ 156 | 157 | 'log' => env('APP_LOG', 'single'), 158 | 159 | 'log_level' => env('APP_LOG_LEVEL', 'debug'), 160 | 161 | /* 162 | |-------------------------------------------------------------------------- 163 | | Autoloaded Service Providers 164 | |-------------------------------------------------------------------------- 165 | | 166 | | The service providers listed here will be automatically loaded on the 167 | | request to your application. Feel free to add your own services to 168 | | this array to grant expanded functionality to your applications. 169 | | 170 | */ 171 | 172 | 'providers' => [ 173 | 174 | /* 175 | * Laravel Framework Service Providers... 176 | */ 177 | Illuminate\Auth\AuthServiceProvider::class, 178 | Illuminate\Broadcasting\BroadcastServiceProvider::class, 179 | Illuminate\Bus\BusServiceProvider::class, 180 | Illuminate\Cache\CacheServiceProvider::class, 181 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, 182 | Illuminate\Cookie\CookieServiceProvider::class, 183 | Illuminate\Database\DatabaseServiceProvider::class, 184 | Illuminate\Encryption\EncryptionServiceProvider::class, 185 | Illuminate\Filesystem\FilesystemServiceProvider::class, 186 | Illuminate\Foundation\Providers\FoundationServiceProvider::class, 187 | Illuminate\Hashing\HashServiceProvider::class, 188 | Illuminate\Mail\MailServiceProvider::class, 189 | Illuminate\Notifications\NotificationServiceProvider::class, 190 | Illuminate\Pagination\PaginationServiceProvider::class, 191 | Illuminate\Pipeline\PipelineServiceProvider::class, 192 | Illuminate\Queue\QueueServiceProvider::class, 193 | Illuminate\Redis\RedisServiceProvider::class, 194 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, 195 | Illuminate\Session\SessionServiceProvider::class, 196 | Illuminate\Translation\TranslationServiceProvider::class, 197 | Illuminate\Validation\ValidationServiceProvider::class, 198 | Illuminate\View\ViewServiceProvider::class, 199 | Aws\Laravel\AwsServiceProvider::class, 200 | 201 | /* 202 | * Package Service Providers... 203 | */ 204 | Laravel\Tinker\TinkerServiceProvider::class, 205 | 206 | /* 207 | * Application Service Providers... 208 | */ 209 | App\Providers\AppServiceProvider::class, 210 | App\Providers\AuthServiceProvider::class, 211 | // App\Providers\BroadcastServiceProvider::class, 212 | App\Providers\EventServiceProvider::class, 213 | App\Providers\RouteServiceProvider::class, 214 | Collective\Html\HtmlServiceProvider::class, 215 | 216 | /* 217 | * Simple authenticator 218 | */ 219 | Cedricve\Simpleauth\SimpleauthServiceProvider::class, 220 | 221 | 222 | /* 223 | * Lock file 224 | */ 225 | Cedricve\Lockfile\LockfileServiceProvider::class, 226 | 227 | ], 228 | 229 | /* 230 | |-------------------------------------------------------------------------- 231 | | Class Aliases 232 | |-------------------------------------------------------------------------- 233 | | 234 | | This array of class aliases will be registered when this application 235 | | is started. However, feel free to register as many as you wish as 236 | | the aliases are "lazy" loaded so they don't hinder performance. 237 | | 238 | */ 239 | 240 | 'aliases' => [ 241 | 242 | 'App' => Illuminate\Support\Facades\App::class, 243 | 'Artisan' => Illuminate\Support\Facades\Artisan::class, 244 | 'Auth' => Illuminate\Support\Facades\Auth::class, 245 | 'Blade' => Illuminate\Support\Facades\Blade::class, 246 | 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, 247 | 'Bus' => Illuminate\Support\Facades\Bus::class, 248 | 'Cache' => Illuminate\Support\Facades\Cache::class, 249 | 'Config' => Illuminate\Support\Facades\Config::class, 250 | 'Cookie' => Illuminate\Support\Facades\Cookie::class, 251 | 'Crypt' => Illuminate\Support\Facades\Crypt::class, 252 | 'DB' => Illuminate\Support\Facades\DB::class, 253 | 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 254 | 'Event' => Illuminate\Support\Facades\Event::class, 255 | 'File' => Illuminate\Support\Facades\File::class, 256 | 'Gate' => Illuminate\Support\Facades\Gate::class, 257 | 'Hash' => Illuminate\Support\Facades\Hash::class, 258 | 'Lang' => Illuminate\Support\Facades\Lang::class, 259 | 'Log' => Illuminate\Support\Facades\Log::class, 260 | 'Mail' => Illuminate\Support\Facades\Mail::class, 261 | 'Notification' => Illuminate\Support\Facades\Notification::class, 262 | 'Password' => Illuminate\Support\Facades\Password::class, 263 | 'Queue' => Illuminate\Support\Facades\Queue::class, 264 | 'Redirect' => Illuminate\Support\Facades\Redirect::class, 265 | 'Redis' => Illuminate\Support\Facades\Redis::class, 266 | 'Request' => Illuminate\Support\Facades\Request::class, 267 | 'Response' => Illuminate\Support\Facades\Response::class, 268 | 'Route' => Illuminate\Support\Facades\Route::class, 269 | 'Schema' => Illuminate\Support\Facades\Schema::class, 270 | 'Session' => Illuminate\Support\Facades\Session::class, 271 | 'Storage' => Illuminate\Support\Facades\Storage::class, 272 | 'URL' => Illuminate\Support\Facades\URL::class, 273 | 'Validator' => Illuminate\Support\Facades\Validator::class, 274 | 'View' => Illuminate\Support\Facades\View::class, 275 | 'Input' => Illuminate\Support\Facades\Input::class, 276 | 'Form' => Collective\Html\FormFacade::class, 277 | 'Html' => Collective\Html\HtmlFacade::class, 278 | 'AWS' => Aws\Laravel\AwsFacade::class, 279 | ], 280 | 281 | ]; 282 | -------------------------------------------------------------------------------- /webconfig/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | ], 48 | ], 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | User Providers 53 | |-------------------------------------------------------------------------- 54 | | 55 | | All authentication drivers have a user provider. This defines how the 56 | | users are actually retrieved out of your database or other storage 57 | | mechanisms used by this application to persist your user's data. 58 | | 59 | | If you have multiple user tables or models you may configure multiple 60 | | sources which represent each model / table. These sources may then 61 | | be assigned to any extra authentication guards you have defined. 62 | | 63 | | Supported: "database", "eloquent" 64 | | 65 | */ 66 | 67 | 'providers' => [ 68 | 'users' => [ 69 | 'driver' => 'simple', 70 | 'model' => App\User::class, 71 | ], 72 | 73 | // 'users' => [ 74 | // 'driver' => 'database', 75 | // 'table' => 'users', 76 | // ], 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Resetting Passwords 82 | |-------------------------------------------------------------------------- 83 | | 84 | | You may specify multiple password reset configurations if you have more 85 | | than one user table or model in the application and you want to have 86 | | separate password reset settings based on the specific user types. 87 | | 88 | | The expire time is the number of minutes that the reset token should be 89 | | considered valid. This security feature keeps tokens short-lived so 90 | | they have less time to be guessed. You may change this as needed. 91 | | 92 | */ 93 | 94 | 'passwords' => [ 95 | 'users' => [ 96 | 'provider' => 'users', 97 | 'table' => 'password_resets', 98 | 'expire' => 60, 99 | ], 100 | ], 101 | 102 | ]; 103 | -------------------------------------------------------------------------------- /webconfig/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | // 40 | ], 41 | ], 42 | 43 | 'redis' => [ 44 | 'driver' => 'redis', 45 | 'connection' => 'default', 46 | ], 47 | 48 | 'log' => [ 49 | 'driver' => 'log', 50 | ], 51 | 52 | 'null' => [ 53 | 'driver' => 'null', 54 | ], 55 | 56 | ], 57 | 58 | ]; 59 | -------------------------------------------------------------------------------- /webconfig/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | */ 30 | 31 | 'stores' => [ 32 | 33 | 'apc' => [ 34 | 'driver' => 'apc', 35 | ], 36 | 37 | 'array' => [ 38 | 'driver' => 'array', 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'table' => 'cache', 44 | 'connection' => null, 45 | ], 46 | 47 | 'file' => [ 48 | 'driver' => 'file', 49 | 'path' => storage_path('framework/cache/data'), 50 | ], 51 | 52 | 'memcached' => [ 53 | 'driver' => 'memcached', 54 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 55 | 'sasl' => [ 56 | env('MEMCACHED_USERNAME'), 57 | env('MEMCACHED_PASSWORD'), 58 | ], 59 | 'options' => [ 60 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 61 | ], 62 | 'servers' => [ 63 | [ 64 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 65 | 'port' => env('MEMCACHED_PORT', 11211), 66 | 'weight' => 100, 67 | ], 68 | ], 69 | ], 70 | 71 | 'redis' => [ 72 | 'driver' => 'redis', 73 | 'connection' => 'default', 74 | ], 75 | 76 | ], 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Cache Key Prefix 81 | |-------------------------------------------------------------------------- 82 | | 83 | | When utilizing a RAM based store such as APC or Memcached, there might 84 | | be other applications utilizing the same cache. So, we'll specify a 85 | | value to get prefixed to all our keys so we can avoid collisions. 86 | | 87 | */ 88 | 89 | 'prefix' => 'laravel', 90 | 91 | ]; 92 | -------------------------------------------------------------------------------- /webconfig/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Database Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here are each of the database connections setup for your application. 24 | | Of course, examples of configuring each database platform that is 25 | | supported by Laravel is shown below to make development simple. 26 | | 27 | | 28 | | All database work in Laravel is done through the PHP PDO facilities 29 | | so make sure you have the driver for your particular database of 30 | | choice installed on your machine before you begin development. 31 | | 32 | */ 33 | 34 | 'connections' => [ 35 | 36 | 'sqlite' => [ 37 | 'driver' => 'sqlite', 38 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 39 | 'prefix' => '', 40 | ], 41 | 42 | 'mysql' => [ 43 | 'driver' => 'mysql', 44 | 'host' => env('DB_HOST', '127.0.0.1'), 45 | 'port' => env('DB_PORT', '3306'), 46 | 'database' => env('DB_DATABASE', 'forge'), 47 | 'username' => env('DB_USERNAME', 'forge'), 48 | 'password' => env('DB_PASSWORD', ''), 49 | 'unix_socket' => env('DB_SOCKET', ''), 50 | 'charset' => 'utf8mb4', 51 | 'collation' => 'utf8mb4_unicode_ci', 52 | 'prefix' => '', 53 | 'strict' => true, 54 | 'engine' => null, 55 | ], 56 | 57 | 'pgsql' => [ 58 | 'driver' => 'pgsql', 59 | 'host' => env('DB_HOST', '127.0.0.1'), 60 | 'port' => env('DB_PORT', '5432'), 61 | 'database' => env('DB_DATABASE', 'forge'), 62 | 'username' => env('DB_USERNAME', 'forge'), 63 | 'password' => env('DB_PASSWORD', ''), 64 | 'charset' => 'utf8', 65 | 'prefix' => '', 66 | 'schema' => 'public', 67 | 'sslmode' => 'prefer', 68 | ], 69 | 70 | 'sqlsrv' => [ 71 | 'driver' => 'sqlsrv', 72 | 'host' => env('DB_HOST', 'localhost'), 73 | 'port' => env('DB_PORT', '1433'), 74 | 'database' => env('DB_DATABASE', 'forge'), 75 | 'username' => env('DB_USERNAME', 'forge'), 76 | 'password' => env('DB_PASSWORD', ''), 77 | 'charset' => 'utf8', 78 | 'prefix' => '', 79 | ], 80 | 81 | ], 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Migration Repository Table 86 | |-------------------------------------------------------------------------- 87 | | 88 | | This table keeps track of all the migrations that have already run for 89 | | your application. Using this information, we can determine which of 90 | | the migrations on disk haven't actually been run in the database. 91 | | 92 | */ 93 | 94 | 'migrations' => 'migrations', 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Redis Databases 99 | |-------------------------------------------------------------------------- 100 | | 101 | | Redis is an open source, fast, and advanced key-value store that also 102 | | provides a richer set of commands than a typical key-value systems 103 | | such as APC or Memcached. Laravel makes it easy to dig right in. 104 | | 105 | */ 106 | 107 | 'redis' => [ 108 | 109 | 'client' => 'predis', 110 | 111 | 'default' => [ 112 | 'host' => env('REDIS_HOST', '127.0.0.1'), 113 | 'password' => env('REDIS_PASSWORD', null), 114 | 'port' => env('REDIS_PORT', 6379), 115 | 'database' => 0, 116 | ], 117 | 118 | ], 119 | 120 | ]; 121 | -------------------------------------------------------------------------------- /webconfig/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "s3", "rackspace" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_KEY'), 61 | 'secret' => env('AWS_SECRET'), 62 | 'region' => env('AWS_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | ], 65 | 66 | ], 67 | 68 | ]; 69 | -------------------------------------------------------------------------------- /webconfig/kerberos.php: -------------------------------------------------------------------------------- 1 | 'basic', 3 | 'radius' => '1', 4 | 'installed' => false, 5 | 'users' => 6 | array ( 7 | 0 => 8 | array ( 9 | 'id' => 1, 10 | 'username' => 'root', 11 | 'password' => 'root', 12 | 'firstname' => 'Firstname', 13 | 'secondname' => 'Lastname', 14 | 'language' => 'en', 15 | ), 16 | ), 17 | ); 18 | -------------------------------------------------------------------------------- /webconfig/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_DRIVER', 'smtp'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | SMTP Host Address 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may provide the host address of the SMTP server used by your 27 | | applications. A default option is provided that is compatible with 28 | | the Mailgun mail service which will provide reliable deliveries. 29 | | 30 | */ 31 | 32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | SMTP Host Port 37 | |-------------------------------------------------------------------------- 38 | | 39 | | This is the SMTP port used by your application to deliver e-mails to 40 | | users of the application. Like the host we have set this value to 41 | | stay compatible with the Mailgun e-mail application by default. 42 | | 43 | */ 44 | 45 | 'port' => env('MAIL_PORT', 587), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Global "From" Address 50 | |-------------------------------------------------------------------------- 51 | | 52 | | You may wish for all e-mails sent by your application to be sent from 53 | | the same address. Here, you may specify a name and address that is 54 | | used globally for all e-mails that are sent by your application. 55 | | 56 | */ 57 | 58 | 'from' => [ 59 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 60 | 'name' => env('MAIL_FROM_NAME', 'Example'), 61 | ], 62 | 63 | /* 64 | |-------------------------------------------------------------------------- 65 | | E-Mail Encryption Protocol 66 | |-------------------------------------------------------------------------- 67 | | 68 | | Here you may specify the encryption protocol that should be used when 69 | | the application send e-mail messages. A sensible default using the 70 | | transport layer security protocol should provide great security. 71 | | 72 | */ 73 | 74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | SMTP Server Username 79 | |-------------------------------------------------------------------------- 80 | | 81 | | If your SMTP server requires a username for authentication, you should 82 | | set it here. This will get used to authenticate with your server on 83 | | connection. You may also set the "password" value below this one. 84 | | 85 | */ 86 | 87 | 'username' => env('MAIL_USERNAME'), 88 | 89 | 'password' => env('MAIL_PASSWORD'), 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Sendmail System Path 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When using the "sendmail" driver to send e-mails, we will need to know 97 | | the path to where Sendmail lives on this server. A default path has 98 | | been provided here, which will work well on most of your systems. 99 | | 100 | */ 101 | 102 | 'sendmail' => '/usr/sbin/sendmail -bs', 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Markdown Mail Settings 107 | |-------------------------------------------------------------------------- 108 | | 109 | | If you are using Markdown based email rendering, you may configure your 110 | | theme and component paths here, allowing you to customize the design 111 | | of the emails. Or, you may simply stick with the Laravel defaults! 112 | | 113 | */ 114 | 115 | 'markdown' => [ 116 | 'theme' => 'default', 117 | 118 | 'paths' => [ 119 | resource_path('views/vendor/mail'), 120 | ], 121 | ], 122 | 123 | ]; 124 | -------------------------------------------------------------------------------- /webconfig/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => 'your-public-key', 54 | 'secret' => 'your-secret-key', 55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 56 | 'queue' => 'your-queue-name', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'retry_after' => 90, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /webconfig/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /webconfig/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Session Lifetime 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may specify the number of minutes that you wish the session 27 | | to be allowed to remain idle before it expires. If you want them 28 | | to immediately expire on the browser closing, set that option. 29 | | 30 | */ 31 | 32 | 'lifetime' => 120, 33 | 34 | 'expire_on_close' => false, 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Session Encryption 39 | |-------------------------------------------------------------------------- 40 | | 41 | | This option allows you to easily specify that all of your session data 42 | | should be encrypted before it is stored. All encryption will be run 43 | | automatically by Laravel and you can use the Session like normal. 44 | | 45 | */ 46 | 47 | 'encrypt' => false, 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | Session File Location 52 | |-------------------------------------------------------------------------- 53 | | 54 | | When using the native session driver, we need a location where session 55 | | files may be stored. A default has been set for you but a different 56 | | location may be specified. This is only needed for file sessions. 57 | | 58 | */ 59 | 60 | 'files' => storage_path('framework/sessions'), 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Session Database Connection 65 | |-------------------------------------------------------------------------- 66 | | 67 | | When using the "database" or "redis" session drivers, you may specify a 68 | | connection that should be used to manage these sessions. This should 69 | | correspond to a connection in your database configuration options. 70 | | 71 | */ 72 | 73 | 'connection' => null, 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Session Database Table 78 | |-------------------------------------------------------------------------- 79 | | 80 | | When using the "database" session driver, you may specify the table we 81 | | should use to manage the sessions. Of course, a sensible default is 82 | | provided for you; however, you are free to change this as needed. 83 | | 84 | */ 85 | 86 | 'table' => 'sessions', 87 | 88 | /* 89 | |-------------------------------------------------------------------------- 90 | | Session Cache Store 91 | |-------------------------------------------------------------------------- 92 | | 93 | | When using the "apc" or "memcached" session drivers, you may specify a 94 | | cache store that should be used for these sessions. This value must 95 | | correspond with one of the application's configured cache stores. 96 | | 97 | */ 98 | 99 | 'store' => null, 100 | 101 | /* 102 | |-------------------------------------------------------------------------- 103 | | Session Sweeping Lottery 104 | |-------------------------------------------------------------------------- 105 | | 106 | | Some session drivers must manually sweep their storage location to get 107 | | rid of old sessions from storage. Here are the chances that it will 108 | | happen on a given request. By default, the odds are 2 out of 100. 109 | | 110 | */ 111 | 112 | 'lottery' => [2, 100], 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | Session Cookie Name 117 | |-------------------------------------------------------------------------- 118 | | 119 | | Here you may change the name of the cookie used to identify a session 120 | | instance by ID. The name specified here will get used every time a 121 | | new session cookie is created by the framework for every driver. 122 | | 123 | */ 124 | 125 | 'cookie' => env('SESSION_COOKIE_NAME', 'laravel_session'), 126 | 127 | /* 128 | |-------------------------------------------------------------------------- 129 | | Session Cookie Path 130 | |-------------------------------------------------------------------------- 131 | | 132 | | The session cookie path determines the path for which the cookie will 133 | | be regarded as available. Typically, this will be the root path of 134 | | your application but you are free to change this when necessary. 135 | | 136 | */ 137 | 138 | 'path' => '/', 139 | 140 | /* 141 | |-------------------------------------------------------------------------- 142 | | Session Cookie Domain 143 | |-------------------------------------------------------------------------- 144 | | 145 | | Here you may change the domain of the cookie used to identify a session 146 | | in your application. This will determine which domains the cookie is 147 | | available to in your application. A sensible default has been set. 148 | | 149 | */ 150 | 151 | 'domain' => env('SESSION_DOMAIN', null), 152 | 153 | /* 154 | |-------------------------------------------------------------------------- 155 | | HTTPS Only Cookies 156 | |-------------------------------------------------------------------------- 157 | | 158 | | By setting this option to true, session cookies will only be sent back 159 | | to the server if the browser has a HTTPS connection. This will keep 160 | | the cookie from being sent to you if it can not be done securely. 161 | | 162 | */ 163 | 164 | 'secure' => env('SESSION_SECURE_COOKIE', false), 165 | 166 | /* 167 | |-------------------------------------------------------------------------- 168 | | HTTP Access Only 169 | |-------------------------------------------------------------------------- 170 | | 171 | | Setting this value to true will prevent JavaScript from accessing the 172 | | value of the cookie and the cookie will only be accessible through 173 | | the HTTP protocol. You are free to modify this option if needed. 174 | | 175 | */ 176 | 177 | 'http_only' => true, 178 | 179 | ]; 180 | -------------------------------------------------------------------------------- /webconfig/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | --------------------------------------------------------------------------------