Skip to content

Commit

Permalink
Fix dist for pyo
Browse files Browse the repository at this point in the history
  • Loading branch information
bright-pan committed Sep 11, 2014
1 parent e217618 commit 2d42a94
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
10 changes: 9 additions & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,12 @@ configure nginx for hchq

configure crontab for mysql backup

30 23 * * * cd ~/hchq/mysql_backup && ./mysql_backup.sh
30 23 * * * cd ~/hchq/mysql_backup && ./mysql_backup.sh

dist package:
python -O -m compileall ../hchq
find -name "*.py" -exec rm -f {} \;

modify mysql root password:
mysql -u root -p
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('hchq2010-2014*.*');
5 changes: 5 additions & 0 deletions dist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

python -O -m compileall ../hchq
find -name "*.py" -exec rm -f {} \;
rm -rf INSTALL mysql_backup mysql_backup.bat deploy.txt README update*.sh
2 changes: 1 addition & 1 deletion hchq/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'hchq', # Or path to database file if using sqlite3.
'USER': 'root', # Not used with sqlite3.
'PASSWORD': '2011', # Not used with sqlite3.
'PASSWORD': 'hchq2010-2014*.*', # Not used with sqlite3.
'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '3306', # Set to empty string for default. Not used with sqlite3.
}
Expand Down
5 changes: 3 additions & 2 deletions mysql_backup/mysql_backup.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash
filename=`date +%Y%m%d`

mysqldump -uroot -p2011 hchq | gzip > hchq-$filename.sql.gz
mysqldump -uroot -phchq2010-2014*.* hchq | gzip > hchq-$filename.sql.gz

cd ../static/images/
tar czf ../../mysql_backup/photos.tar.gz photos
tar czf ../../mysql_backup/photos.tar.gz photos
tar czf ../../mysql_backup/thumbnails.tar.gz thumbnails

0 comments on commit 2d42a94

Please sign in to comment.