added misc html files
This commit is contained in:
@@ -41,7 +41,7 @@ apt-get -y install build-essential automake openssl libssl-dev libyaml-dev libxm
|
||||
apt-get -y install python-software-properties
|
||||
add-apt-repository ppa:pitti/postgresql
|
||||
apt-get update
|
||||
apt-get install -y postgresql-9.1 libpq-dev
|
||||
apt-get install -y postgresql-9.1 postgresql-contrib-9.1 libpq-dev
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
@@ -119,5 +119,23 @@ echo "* Enter a new password for the danbooru account *"
|
||||
echo "*************************************************"
|
||||
passwd danbooru
|
||||
|
||||
sudo -u danbooru createdb danbooru2
|
||||
cd /home/danbooru
|
||||
sudo -u danbooru mkdir /home/danbooru/apps
|
||||
git clone git://github.com/r888888888/danbooru.git danbooru
|
||||
chown -R danbooru:danbooru danbooru
|
||||
cap deploy:setup
|
||||
cap deploy:update_code
|
||||
cap deploy:migrate
|
||||
chown danbooru:danbooru /var/www/danbooru/shared/log/development.log
|
||||
|
||||
echo
|
||||
echo "I'm done!"
|
||||
echo
|
||||
echo "**************************************************************"
|
||||
echo "* Danbooru has now been setup on this computer and should be *"
|
||||
echo "* accessible from the web. Go ahead and create an account. *"
|
||||
echo "* The first account will automatically be made an admin.You *"
|
||||
echo "* can edit the configuration files by editing *"
|
||||
echo "* /var/www/danbooru/shared/config/local_config and *"
|
||||
echo "* /var/www/danbooru/shared/config/database.yml *"
|
||||
echo "**************************************************************"
|
||||
|
||||
@@ -40,6 +40,21 @@ namespace :local_config do
|
||||
end
|
||||
end
|
||||
|
||||
namespace :data do
|
||||
task :setup_directories do
|
||||
run "mkdir -p #{deploy_to}/shared/data"
|
||||
run "mkdir #{deploy_to}/shared/data/preview"
|
||||
run "mkdir #{deploy_to}/shared/data/small"
|
||||
run "mkdir #{deploy_to}/shared/data/large"
|
||||
run "mkdir #{deploy_to}/shared/data/original"
|
||||
end
|
||||
|
||||
task :link_directories do
|
||||
run "rm -f #{release_path}/public/data"
|
||||
run "ln -s #{deploy_to}/shared/data #{release_path}/public/data"
|
||||
end
|
||||
end
|
||||
|
||||
desc "Change ownership of common directory to user"
|
||||
task :reset_ownership_of_common_directory do
|
||||
sudo "chown -R #{user}:#{user} /var/www/danbooru"
|
||||
@@ -49,12 +64,12 @@ namespace :deploy do
|
||||
namespace :web do
|
||||
desc "Present a maintenance page to visitors."
|
||||
task :disable do
|
||||
run "mv #{current_path}/public/maintenance2.html #{current_path}/public/maintenance.html"
|
||||
run "mv #{current_path}/public/maintenance.html.bak #{current_path}/public/maintenance.html"
|
||||
end
|
||||
|
||||
desc "Makes the application web-accessible again."
|
||||
task :enable do
|
||||
run "mv #{current_path}/public/maintenance.html #{current_path}/public/maintenance2.html"
|
||||
run "mv #{current_path}/public/maintenance.html #{current_path}/public/maintenance.html.bak"
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -79,8 +94,11 @@ end
|
||||
after "deploy:setup", "reset_ownership_of_common_directory"
|
||||
after "deploy:setup", "local_config:setup_shared_directory"
|
||||
after "deploy:setup", "local_config:setup_local_files"
|
||||
after "deploy:setup", "data:setup_directories"
|
||||
after "deploy:update_code", "local_config:link_local_files"
|
||||
after "deploy:update_code", "data:link_directories"
|
||||
after "deploy:start", "delayed_job:start"
|
||||
after "deploy:stop", "delayed_job:stop"
|
||||
after "deploy:restart", "delayed_job:restart"
|
||||
|
||||
before "deploy:update", "deploy:web:disable"
|
||||
after "deploy:restart", "deploy:web:enable"
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>The page you were looking for doesn't exist (404)</title>
|
||||
<style type="text/css">
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script> <style type="text/css">
|
||||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
||||
div.dialog {
|
||||
width: 25em;
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>The change you wanted was rejected (422)</title>
|
||||
<style type="text/css">
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script> <style type="text/css">
|
||||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
||||
div.dialog {
|
||||
width: 25em;
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>We're sorry, but something went wrong (500)</title>
|
||||
<style type="text/css">
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script> <style type="text/css">
|
||||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
||||
div.dialog {
|
||||
width: 25em;
|
||||
|
||||
22
public/503-redirect.html
Normal file
22
public/503-redirect.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="1;URL=http://danbooru.donmai.us/wiki_pages?/users"/>
|
||||
<title>Redirecting</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/default.css" title="default" />
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
var pageTracker = _gat._getTracker("UA-86094-4");
|
||||
pageTracker._trackPageview();
|
||||
} catch(err) {}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting...</p>
|
||||
</body>
|
||||
</html>
|
||||
25
public/503.html
Normal file
25
public/503.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="60">
|
||||
<title>i can't take it easy ;_;</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/default.css" title="default">
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
var pageTracker = _gat._getTracker("UA-86094-4");
|
||||
pageTracker._trackPageview();
|
||||
} catch(err) {}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center; margin-top: 5em;">
|
||||
<p style="width: 40em; margin: auto;">The server is currently overloaded. You can purchase a <a href="/503-redirect.html">privileged account</a> for $20 to view this page anyway.</p>
|
||||
<p style="width: 40em; margin: auto;"> This page will automatically refresh in one minute.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user