mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 13:38:20 +01:00
Merge branch '1.2'
Conflicts: Dockerfile composer.lock
This commit is contained in:
commit
32de1d512b
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,4 +2,3 @@
|
||||
node_modules
|
||||
phpunit.xml
|
||||
vendor
|
||||
.vagrant
|
||||
|
38
Dockerfile
38
Dockerfile
@ -1,38 +0,0 @@
|
||||
FROM debian:jessie
|
||||
MAINTAINER Alt Three <support@alt-three.com>
|
||||
|
||||
# Using nodesource and debian jessie packages instead of compiling from scratch
|
||||
RUN DEBIAN_FRONTEND=noninteractive \
|
||||
echo "APT::Install-Recommends \"0\";" >> /etc/apt/apt.conf.d/02recommends && \
|
||||
echo "APT::Install-Suggests \"0\";" >> /etc/apt/apt.conf.d/02recommends && \
|
||||
apt-get -qq update && \
|
||||
apt-get -qq install \
|
||||
ca-certificates nginx php5-fpm=5.* php5-curl php5-readline php5-mcrypt php5-mysql php5-apcu php5-cli \
|
||||
git sqlite libsqlite3-dev curl supervisor cron php5-pgsql && \
|
||||
apt-get clean && apt-get autoremove -qq && \
|
||||
rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man /tmp/*
|
||||
|
||||
COPY docker/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
COPY docker/entrypoint.sh /sbin/entrypoint.sh
|
||||
COPY . /var/www/html/
|
||||
WORKDIR /var/www/html/
|
||||
|
||||
# copy the various nginx and supervisor conf (to handle both fpm and nginx)
|
||||
RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.conf ;\
|
||||
echo "daemon off;" >> /etc/nginx/nginx.conf ;\
|
||||
mv /var/www/html/docker/php-fpm-pool.conf /etc/php5/fpm/pool.d/www.conf ;\
|
||||
rm -f /etc/nginx/sites-enabled/* ;\
|
||||
rm -f /etc/nginx/conf.d/* ;\
|
||||
mv /var/www/html/docker/nginx-site.conf /etc/nginx/conf.d/default.conf ;\
|
||||
mv /var/www/html/docker/.env.docker /var/www/html/.env ;\
|
||||
rm -r /var/www/html/docker ;\
|
||||
chown -R www-data /var/www/html ;\
|
||||
curl -sS https://getcomposer.org/installer | php && php composer.phar install --no-dev -o
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
COPY docker/crontab /etc/cron.d/artisan-schedule
|
||||
RUN chmod 0644 /etc/cron.d/artisan-schedule
|
||||
RUN touch /var/log/cron.log
|
||||
|
||||
CMD ["/sbin/entrypoint.sh"]
|
@ -1,40 +0,0 @@
|
||||
---
|
||||
ip: "192.168.10.10"
|
||||
memory: 2048
|
||||
cpus: 1
|
||||
hostname: cachet
|
||||
name: cachet
|
||||
provider: virtualbox
|
||||
|
||||
authorize: ~/.ssh/id_rsa.pub
|
||||
|
||||
keys:
|
||||
- ~/.ssh/id_rsa
|
||||
|
||||
folders:
|
||||
- map: "/srv/www/Cachet"
|
||||
to: "/home/vagrant/Cachet"
|
||||
|
||||
sites:
|
||||
- map: homestead.app
|
||||
to: "/home/vagrant/Cachet/public"
|
||||
|
||||
databases:
|
||||
- cachet
|
||||
|
||||
variables:
|
||||
- key: APP_ENV
|
||||
value: local
|
||||
|
||||
# blackfire:
|
||||
# - id: foo
|
||||
# token: bar
|
||||
# client-id: foo
|
||||
# client-token: bar
|
||||
|
||||
# ports:
|
||||
# - send: 93000
|
||||
# to: 9300
|
||||
# - send: 7777
|
||||
# to: 777
|
||||
# protocol: udp
|
23
Vagrantfile
vendored
23
Vagrantfile
vendored
@ -1,23 +0,0 @@
|
||||
require 'json'
|
||||
require 'yaml'
|
||||
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
confDir = $confDir ||= File.expand_path("vendor/laravel/homestead")
|
||||
|
||||
homesteadYamlPath = "Homestead.yaml"
|
||||
afterScriptPath = "after.sh"
|
||||
aliasesPath = "aliases"
|
||||
|
||||
require File.expand_path(confDir + '/scripts/homestead.rb')
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
if File.exists? aliasesPath then
|
||||
config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
|
||||
end
|
||||
|
||||
Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
|
||||
|
||||
if File.exists? afterScriptPath then
|
||||
config.vm.provision "shell", path: afterScriptPath
|
||||
end
|
||||
end
|
@ -39,7 +39,6 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"fzaninotto/faker": "^1.5",
|
||||
"laravel/homestead": "^2.1.5",
|
||||
"mockery/mockery": "^0.9.4",
|
||||
"phpunit/phpunit": "^4.7.6"
|
||||
},
|
||||
|
59
composer.lock
generated
59
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "6e3712236cbfc4e7c2dce2c8740a72bf",
|
||||
"hash": "c8c3fd249d4b9295ad5b8639a4c02039",
|
||||
"packages": [
|
||||
{
|
||||
"name": "alt-three/emoji",
|
||||
@ -3439,47 +3439,6 @@
|
||||
],
|
||||
"time": "2015-05-11 14:41:42"
|
||||
},
|
||||
{
|
||||
"name": "laravel/homestead",
|
||||
"version": "v2.1.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/homestead.git",
|
||||
"reference": "968dd528fee49eecc496610c053a80e42b61560b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/homestead/zipball/968dd528fee49eecc496610c053a80e42b61560b",
|
||||
"reference": "968dd528fee49eecc496610c053a80e42b61560b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4",
|
||||
"symfony/console": "~2.0",
|
||||
"symfony/process": "~2.0"
|
||||
},
|
||||
"bin": [
|
||||
"homestead"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Laravel\\Homestead\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylorotwell@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A virtual machine for web artisans.",
|
||||
"time": "2015-08-04 02:11:37"
|
||||
},
|
||||
{
|
||||
"name": "mockery/mockery",
|
||||
"version": "0.9.4",
|
||||
@ -3896,16 +3855,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "4.7.7",
|
||||
"version": "4.8.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "9b97f9d807b862c2de2a36e86690000801c85724"
|
||||
"reference": "25468d02f8224d6b5ee62407bedbd4cea1f5dd2e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9b97f9d807b862c2de2a36e86690000801c85724",
|
||||
"reference": "9b97f9d807b862c2de2a36e86690000801c85724",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/25468d02f8224d6b5ee62407bedbd4cea1f5dd2e",
|
||||
"reference": "25468d02f8224d6b5ee62407bedbd4cea1f5dd2e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3915,7 +3874,7 @@
|
||||
"ext-reflection": "*",
|
||||
"ext-spl": "*",
|
||||
"php": ">=5.3.3",
|
||||
"phpspec/prophecy": "~1.3,>=1.3.1",
|
||||
"phpspec/prophecy": "^1.3.1",
|
||||
"phpunit/php-code-coverage": "~2.1",
|
||||
"phpunit/php-file-iterator": "~1.4",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
@ -3923,7 +3882,7 @@
|
||||
"phpunit/phpunit-mock-objects": "~2.3",
|
||||
"sebastian/comparator": "~1.1",
|
||||
"sebastian/diff": "~1.2",
|
||||
"sebastian/environment": "~1.2",
|
||||
"sebastian/environment": "~1.3",
|
||||
"sebastian/exporter": "~1.2",
|
||||
"sebastian/global-state": "~1.0",
|
||||
"sebastian/version": "~1.0",
|
||||
@ -3938,7 +3897,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.7.x-dev"
|
||||
"dev-master": "4.8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -3964,7 +3923,7 @@
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2015-07-13 11:28:34"
|
||||
"time": "2015-08-07 09:43:11"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
|
@ -1,27 +0,0 @@
|
||||
APP_ENV={{APP_ENV}}
|
||||
APP_DEBUG={{APP_DEBUG}}
|
||||
APP_URL={{APP_URL}}
|
||||
APP_KEY={{APP_KEY}}
|
||||
|
||||
DB_DRIVER={{DB_DRIVER}}
|
||||
DB_HOST={{DB_HOST}}
|
||||
DB_DATABASE={{DB_DATABASE}}
|
||||
DB_USERNAME={{DB_USERNAME}}
|
||||
DB_PASSWORD={{DB_PASSWORD}}
|
||||
|
||||
CACHE_DRIVER={{CACHE_DRIVER}}
|
||||
SESSION_DRIVER={{SESSION_DRIVER}}
|
||||
QUEUE_DRIVER={{QUEUE_DRIVER}}
|
||||
|
||||
MAIL_DRIVER={{MAIL_DRIVER}}
|
||||
MAIL_HOST={{MAIL_HOST}}
|
||||
MAIL_PORT={{MAIL_PORT}}
|
||||
MAIL_USERNAME={{MAIL_USERNAME}}
|
||||
MAIL_PASSWORD={{MAIL_PASSWORD}}
|
||||
MAIL_ADDRESS={{MAIL_ADDRESS}}
|
||||
MAIL_NAME={{MAIL_NAME}}
|
||||
|
||||
REDIS_HOST={{REDIS_HOST}}
|
||||
REDIS_DATABASE={{REDIS_DATABASE}}
|
||||
REDIS_PORT={{REDIS_PORT}}
|
||||
|
@ -1,2 +0,0 @@
|
||||
#minute hour mday month wday who command
|
||||
* * * * * www-data php /var/www/html/artisan schedule:run 1>> /dev/null 2>&1
|
@ -1,66 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
APP_ENV=${APP_ENV:-local}
|
||||
APP_DEBUG=${APP_DEBUG:-true}
|
||||
APP_URL=${APP_URL:-http://localhost}
|
||||
APP_KEY=${APP_KEY:-SomeRandomString}
|
||||
|
||||
DB_DRIVER=${DB_DRIVER:-mysql}
|
||||
DB_HOST=${DB_HOST:-mysql}
|
||||
DB_DATABASE=${DB_DATABASE:-cachet}
|
||||
DB_USERNAME=${DB_USERNAME:-cachet}
|
||||
DB_PASSWORD=${DB_PASSWORD:-cachet}
|
||||
|
||||
CACHE_DRIVER=${CACHE_DRIVER:-file}
|
||||
SESSION_DRIVER=${SESSION_DRIVER:-file}
|
||||
QUEUE_DRIVER=${QUEUE_DRIVER:-database}
|
||||
|
||||
MAIL_DRIVER=${MAIL_DRIVER:-smtp}
|
||||
MAIL_HOST=${MAIL_HOST:-mailtrap.io}
|
||||
MAIL_PORT=${MAIL_PORT:-2525}
|
||||
MAIL_USERNAME=${MAIL_USERNAME:-null}
|
||||
MAIL_PASSWORD=${MAIL_PASSWORD:-null}
|
||||
MAIL_ADDRESS=${MAIL_ADDRESS:-null}
|
||||
MAIL_NAME=${MAIL_NAME:-null}
|
||||
|
||||
REDIS_HOST=${REDIS_HOST:-null}
|
||||
REDIS_DATABASE=${REDIS_DATABASE:-null}
|
||||
REDIS_PORT=${REDIS_PORT:-null}
|
||||
|
||||
# configure env file
|
||||
|
||||
sed 's,{{APP_ENV}},'"${APP_ENV}"',g' -i /var/www/html/.env
|
||||
sed 's,{{APP_DEBUG}},'"${APP_DEBUG}"',g' -i /var/www/html/.env
|
||||
sed 's,{{APP_URL}},'"${APP_URL}"',g' -i /var/www/html/.env
|
||||
sed 's,{{APP_KEY}},'"${APP_KEY}"',g' -i /var/www/html/.env
|
||||
|
||||
sed 's,{{DB_DRIVER}},'"${DB_DRIVER}"',g' -i /var/www/html/.env
|
||||
sed 's,{{DB_HOST}},'"${DB_HOST}"',g' -i /var/www/html/.env
|
||||
sed 's,{{DB_DATABASE}},'"${DB_DATABASE}"',g' -i /var/www/html/.env
|
||||
sed 's,{{DB_USERNAME}},'"${DB_USERNAME}"',g' -i /var/www/html/.env
|
||||
sed 's,{{DB_PASSWORD}},'"${DB_PASSWORD}"',g' -i /var/www/html/.env
|
||||
|
||||
sed 's,{{CACHE_DRIVER}},'"${CACHE_DRIVER}"',g' -i /var/www/html/.env
|
||||
sed 's,{{SESSION_DRIVER}},'"${SESSION_DRIVER}"',g' -i /var/www/html/.env
|
||||
sed 's,{{QUEUE_DRIVER}},'"${QUEUE_DRIVER}"',g' -i /var/www/html/.env
|
||||
|
||||
sed 's,{{MAIL_DRIVER}},'"${MAIL_DRIVER}"',g' -i /var/www/html/.env
|
||||
sed 's,{{MAIL_HOST}},'"${MAIL_HOST}"',g' -i /var/www/html/.env
|
||||
sed 's,{{MAIL_PORT}},'"${MAIL_PORT}"',g' -i /var/www/html/.env
|
||||
sed 's,{{MAIL_USERNAME}},'"${MAIL_USERNAME}"',g' -i /var/www/html/.env
|
||||
sed 's,{{MAIL_PASSWORD}},'"${MAIL_PASSWORD}"',g' -i /var/www/html/.env
|
||||
sed 's,{{MAIL_ADDRESS}},'"${MAIL_ADDRESS}"',g' -i /var/www/html/.env
|
||||
sed 's,{{MAIL_NAME}},'"${MAIL_NAME}"',g' -i /var/www/html/.env
|
||||
|
||||
sed 's,{{REDIS_HOST}},'"${REDIS_HOST}"',g' -i /var/www/html/.env
|
||||
sed 's,{{REDIS_DATABASE}},'"${REDIS_DATABASE}"',g' -i /var/www/html/.env
|
||||
sed 's,{{REDIS_PORT}},'"${REDIS_PORT}"',g' -i /var/www/html/.env
|
||||
|
||||
#Clear cache
|
||||
/usr/bin/php composer.phar install --no-dev -o
|
||||
|
||||
echo "Starting supervisord..."
|
||||
exec /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
|
||||
|
||||
exit 0
|
@ -1,30 +0,0 @@
|
||||
server {
|
||||
listen 8000 default; ## Listen for ipv4; this line is default and implied
|
||||
|
||||
# Make site accessible from http://localhost/
|
||||
server_name localhost;
|
||||
root /var/www/html/public;
|
||||
|
||||
index index.html index.htm index.php;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
# Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
include fastcgi_params;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_keep_conn on;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
[www]
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
listen = 127.0.0.1:9000
|
||||
|
||||
request_terminate_timeout = 120s
|
||||
|
||||
pm = dynamic
|
||||
pm.max_children = 5
|
||||
pm.start_servers = 2
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 3
|
||||
chdir = /
|
||||
|
||||
env[DB_DRIVER] = $DB_DRIVER
|
||||
env[DB_HOST] = $DB_HOST
|
||||
env[DB_DATABASE] = $DB_DATABASE
|
||||
env[DB_USERNAME] = $DB_USERNAME
|
||||
env[DB_PASSWORD] = $DB_PASSWORD
|
||||
env[CACHE_DRIVER] = $CACHE_DRIVER
|
||||
|
||||
|
||||
[global]
|
||||
daemonize = no
|
@ -1,28 +0,0 @@
|
||||
[unix_http_server]
|
||||
file=/var/run/supervisor.sock ; (the path to the socket file)
|
||||
|
||||
[supervisord]
|
||||
logfile=/dev/null ; (main log file;default $CWD/supervisord.log)
|
||||
logfile_maxbytes=0 ; (max main logfile bytes b4 rotation;default 50MB)
|
||||
logfile_backups=0 ; (num of main logfile rotation backups;default 10)
|
||||
loglevel=info ; (log level;default info; others: debug,warn,trace)
|
||||
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
|
||||
nodaemon=true ; (start in foreground if true;default false)
|
||||
|
||||
; the below section must remain in the config file for RPC
|
||||
; (supervisorctl/web interface) to work, additional interfaces may be
|
||||
; added by defining them in separate rpcinterface: sections
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
|
||||
|
||||
[program:php5-fpm]
|
||||
command=/usr/sbin/php5-fpm -c /etc/php5/fpm
|
||||
|
||||
[program:nginx]
|
||||
command=/usr/sbin/nginx
|
||||
|
||||
[program:cron]
|
||||
command=/usr/sbin/cron -f
|
Loading…
x
Reference in New Issue
Block a user