maxgronlund / hewa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

<<<<<<< HEAD
q:


recrop all on first upload
=======
== This is a configuration template
all the most common gemfiles is installed and configured
example on how they are used is implemented



How to's

#####################################################
			GETTING STARTED
#####################################################
1: Clone the project
2: Set up the  config/database.yml file
3: Edit the db/seed.rb file 
4: $ db:create db:migrate db:seed
5: $ bundle install


#####################################################
			CREATE A PROJECT ON GITHUB
#####################################################
1: make a new project 
2: $ git remote add origin git@github.com:YOURNAME/PROJECTNAME-.git

#####################################################
			PREPARE HETZNER AND GITHUP 
			FOR DEPLOYMENT WITH CAPISTRANO
#####################################################
1: edit line 11 and 24 in the config/deploy.rb file
2: $ cap deploy:setup
3: $ ssh deploy@46.4.64.81 								<-- CHANGE IP ADDRESS
4: $ mysqladmin -u root create project_name
5: $ mkdir /var/www/PROJECTNAME/shared/config
6: $ cat > /var/www/PROJECTNAME/shared/config/database.yml
---
7: $ production:
 adapter: mysql2
 encoding: utf8
 reconnect: false
 database: PROJECTNAME
 pool: 5
 username: root
 password:
 socket: /var/run/mysqld/mysqld.sock

8: hit return
9: end cat $ ctrl-d
10: log out $ ctrl-d 
---
11: $ ssh root@46.4.64.81 								<-- CHANGE IP ADDRESS
12: type password
13: $ cat > /etc/apache2/sites-available/PROJECTNAME

14: $<VirtualHost *:80>
     ServerName PROJECTNAME.org
     ServerAlias *.PROJECTNAME.org
     DocumentRoot /var/www/PROJECTNAME/current/public
     <Directory /var/www/PROJECTNAME/current/public>
       ExpiresActive On
       <FilesMatch "\.(ico|gif|jpe?g|png|js|css)$">
         ExpiresDefault "access plus 1 year"
       </FilesMatch>
     </Directory>
</VirtualHost>

15: end cat $ ctrl-d
16: $ a2ensite PROJECTNAME
17: $ /etc/init.d/apache2 restart
18: log out $ ctrl-d 
---
19: upload code $ cap deploy
20: migrate db $ cap deploy:migrations
21: log out $ ctrl-d
---
22: $ ssh deploy@46.4.64.81 							<-- CHANGE IP ADDRESS
23: $ cd /var/www/PROJECTNAME/current
24: $ RAILS_ENV=production rake db:seed
---
25: $ RAILS_ENV=production  rake ts:conf
26: $ RAILS_ENV=production rake ts:index
27: $ RAILS_ENV=production rake ts:start 

#####################################################
			POINT THE DNS SERVER TO HETZNER
#####################################################
1: Open the DNS editor
2: Set up the host records 

A (Host)
Host Record	|	Points to 		|	TTL
-------------------------------------------
@			|	46.4.64.81		|	14400	
localhost	|	127.0.0.1		|	14400	
local		|	46.4.64.81		|	14400	


CNAME
Host Record	|	Points to 		|	TTL
-------------------------------------------
www			|	domain_name.com	|	14400	
ftp			|	domain_name.com	|	14400	
mail		|	domain_name.com	|	14400


MX (MailExchanger)
Priority	|	Host Record 			|	TTL
---------------------------------------------------
0			|	mail.domain_name.com	|	14400	



TXT
Host Record	|				TXT Value 						|	TTL
-----------------------------------------------------------------------
@			|	"v=spf1 a mx ptr include:bluehost.com ?all"	|	14400	
_domainkey	|	"o=~"										|	14400






>>>>>>> cb06b05540d33120333cfaddea7bfd66706638b5

fallback folder ?

<<<<<<< HEAD
	
tinyMce is not working in production

remove image on product
falback image is missing/not working
=======



>>>>>>> cb06b05540d33120333cfaddea7bfd66706638b5

About


Languages

Language:Ruby 92.8%Language:JavaScript 6.9%Language:CoffeeScript 0.3%