mirror of
https://github.com/correl/melpa.git
synced 2024-12-24 20:00:32 +00:00
add stable configuration
This commit is contained in:
parent
6b571a8077
commit
49a54c0a60
8 changed files with 238 additions and 0 deletions
70
cfg/etc/nginx/sites-available/melpa-stable
Normal file
70
cfg/etc/nginx/sites-available/melpa-stable
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
# You may add here your
|
||||||
|
# server {
|
||||||
|
# ...
|
||||||
|
# }
|
||||||
|
# statements for each of your virtual hosts to this file
|
||||||
|
|
||||||
|
##
|
||||||
|
# You should look at the following URL's in order to grasp a solid understanding
|
||||||
|
# of Nginx configuration files in order to fully unleash the power of Nginx.
|
||||||
|
# http://wiki.nginx.org/Pitfalls
|
||||||
|
# http://wiki.nginx.org/QuickStart
|
||||||
|
# http://wiki.nginx.org/Configuration
|
||||||
|
#
|
||||||
|
# Generally, you will want to move this file somewhere, and start with a clean
|
||||||
|
# file but keep this around for reference. Or just disable in sites-enabled.
|
||||||
|
#
|
||||||
|
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
|
||||||
|
##
|
||||||
|
|
||||||
|
server {
|
||||||
|
server_name hiddencameras.milkbox.net;
|
||||||
|
rewrite ^ $scheme://melpa-stable.milkbox.net$request_uri? permanent;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80; ## listen for ipv4; this line is default and implied
|
||||||
|
#listen [::]:80 default ipv6only=on; ## listen for ipv6
|
||||||
|
|
||||||
|
root /usr/share/nginx/www;
|
||||||
|
|
||||||
|
# Make site accessible from http://localhost/
|
||||||
|
server_name localhost;
|
||||||
|
server_name *.milkbox.net;
|
||||||
|
|
||||||
|
# proxy to Apache 2 and mod_python
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:1337/;
|
||||||
|
proxy_redirect off;
|
||||||
|
chunked_transfer_encoding off;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_disable "msie6|Emacs";
|
||||||
|
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_proxied any;
|
||||||
|
gzip_comp_level 6;
|
||||||
|
gzip_buffers 16 8k;
|
||||||
|
gzip_http_version 1.1;
|
||||||
|
gzip_types text/plain text/xhtml text/css text/js text/csv application/javascript application/x-javascript application/json application/xml text/xml application/atom+xml application/rss+xml;
|
||||||
|
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_max_temp_file_size 0;
|
||||||
|
|
||||||
|
client_max_body_size 10m;
|
||||||
|
client_body_buffer_size 128k;
|
||||||
|
|
||||||
|
proxy_connect_timeout 90;
|
||||||
|
proxy_send_timeout 90;
|
||||||
|
proxy_read_timeout 90;
|
||||||
|
|
||||||
|
proxy_buffer_size 4k;
|
||||||
|
proxy_buffers 4 32k;
|
||||||
|
proxy_busy_buffers_size 64k;
|
||||||
|
proxy_temp_file_write_size 64k;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
92
cfg/home/etc/nginx-stable
Normal file
92
cfg/home/etc/nginx-stable
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
worker_processes 4;
|
||||||
|
pid /home/melpa/var/run/nginx.pid;
|
||||||
|
# error_log /dev/null crit;
|
||||||
|
daemon off;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 768;
|
||||||
|
# multi_accept on;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
##
|
||||||
|
# Basic Settings
|
||||||
|
##
|
||||||
|
|
||||||
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
types_hash_max_size 2048;
|
||||||
|
server_tokens off;
|
||||||
|
|
||||||
|
# server_names_hash_bucket_size 64;
|
||||||
|
server_name_in_redirect off;
|
||||||
|
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
##
|
||||||
|
# Logging Settings
|
||||||
|
##
|
||||||
|
access_log /home/melpa/log/melpa.access.log combined;
|
||||||
|
error_log /home/melpa/log/melpa.error.log info;
|
||||||
|
set_real_ip_from 127.0.0.1;
|
||||||
|
real_ip_header X-Forwarded-For;
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
# Gzip Settings
|
||||||
|
##
|
||||||
|
|
||||||
|
gzip off;
|
||||||
|
gzip_disable "msie6";
|
||||||
|
gzip_vary on;
|
||||||
|
#gzip_proxied any;
|
||||||
|
gzip_comp_level 6;
|
||||||
|
gzip_buffers 16 8k;
|
||||||
|
gzip_http_version 1.1;
|
||||||
|
gzip_types text/plain text/xhtml text/css text/js text/csv application/javascript application/x-javascript application/json application/xml text/xml application/atom+xml application/rss+xml;
|
||||||
|
|
||||||
|
##
|
||||||
|
# nginx-naxsi config
|
||||||
|
##
|
||||||
|
# Uncomment it if you installed nginx-naxsi
|
||||||
|
##
|
||||||
|
|
||||||
|
#include /etc/nginx/naxsi_core.rules;
|
||||||
|
|
||||||
|
##
|
||||||
|
# nginx-passenger config
|
||||||
|
##
|
||||||
|
# Uncomment it if you installed nginx-passenger
|
||||||
|
##
|
||||||
|
|
||||||
|
#passenger_root /usr;
|
||||||
|
#passenger_ruby /usr/bin/ruby;
|
||||||
|
|
||||||
|
##
|
||||||
|
# Virtual Host Configs
|
||||||
|
##
|
||||||
|
|
||||||
|
server {
|
||||||
|
server_name melpa-stable.milkbox.net;
|
||||||
|
server_tokens off;
|
||||||
|
server_name_in_redirect off;
|
||||||
|
|
||||||
|
root /home/melpa/www;
|
||||||
|
|
||||||
|
listen 1337;
|
||||||
|
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
location = /50x.html {
|
||||||
|
root /var/www/nginx-default;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
25
cfg/home/service/builder-stable/run
Executable file
25
cfg/home/service/builder-stable/run
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
export HOME=/home/melpa
|
||||||
|
cd ${HOME}/melpa
|
||||||
|
|
||||||
|
export MELPA_BRANCH=master
|
||||||
|
export STABLE=t
|
||||||
|
|
||||||
|
source $HOME/melpa/scripts/env
|
||||||
|
|
||||||
|
## git pull
|
||||||
|
cd ${MELPA_HOME}
|
||||||
|
git fetch origin
|
||||||
|
git checkout ${MELPA_BRANCH}
|
||||||
|
git reset --hard origin/${MELPA_BRANCH}
|
||||||
|
git pull origin ${MELPA_BRANCH}
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Build all the packages.
|
||||||
|
scripts/parallel_build_all
|
||||||
|
|
||||||
|
echo '{"completed":' `date "+%s"` '}' > /home/melpa/www/build-status.json
|
||||||
|
|
||||||
|
# Sleep for an hour before rebuilding.
|
||||||
|
sleep 1h
|
4
cfg/home/service/nginx-stable/run
Executable file
4
cfg/home/service/nginx-stable/run
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
exec /usr/sbin/nginx -g 'error_log /dev/null crit;' -c ~/etc/nginx
|
||||||
|
|
8
cfg/home/service/process_log-stable/run
Executable file
8
cfg/home/service/process_log-stable/run
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
cd /home/melpa/melpa
|
||||||
|
/usr/bin/python /home/melpa/melpa/scripts/process_log.py
|
||||||
|
|
||||||
|
/usr/sbin/logrotate -s /home/melpa/var/lib/logrotate/status /home/melpa/etc/logrotate
|
||||||
|
|
||||||
|
sleep 6h
|
24
cfg/home/service/reporter-stable/run
Executable file
24
cfg/home/service/reporter-stable/run
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
# Service for reporting missing and old packages.
|
||||||
|
|
||||||
|
export HOME=/home/melpa
|
||||||
|
|
||||||
|
BODY=`mktemp`
|
||||||
|
|
||||||
|
cd ${HOME}/melpa
|
||||||
|
|
||||||
|
echo "To: MP <dcurtis@milkbox.net>" > ${BODY}
|
||||||
|
echo "Subject: [MELPA] `date "+%Y%m%d %H:%M %z"`" >> ${BODY}
|
||||||
|
echo >> ${BODY}
|
||||||
|
echo "# Old Packages" >> ${BODY}
|
||||||
|
echo >> ${BODY}
|
||||||
|
emacs --no-site-file --batch -l package-build.el --eval '(setq package-archive-dir (expand-file-name "packages-stable" pb/this-dir)))' scripts/expired >> ${BODY}
|
||||||
|
echo >> ${BODY}
|
||||||
|
echo "# Missing Packages" >> ${BODY}
|
||||||
|
echo >> ${BODY}
|
||||||
|
emacs --no-site-file --batch -l package-build.el --eval '(setq package-archive-dir (expand-file-name "packages-stable" pb/this-dir)))' sscripts/missing >> ${BODY}
|
||||||
|
|
||||||
|
/usr/sbin/sendmail -t < ${BODY}
|
||||||
|
|
||||||
|
sleep 12h
|
15
cfg/home/service/syncer-stable/run
Executable file
15
cfg/home/service/syncer-stable/run
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
export STABLE=t
|
||||||
|
|
||||||
|
export HOME=/home/melpa
|
||||||
|
cd ${HOME}/melpa
|
||||||
|
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
||||||
|
|
||||||
|
make cleanup
|
||||||
|
make json
|
||||||
|
make html
|
||||||
|
make sync
|
||||||
|
|
||||||
|
# Sync every 5 minutes.
|
||||||
|
sleep 5m
|
Loading…
Reference in a new issue