timborden
timborden

Reputation: 1480

Git, Kohana & PHPFog workflow

Kohana 3 includes environment constants, specifically PRODUCTION, STAGING, TESTING & DEVELOPMENT (discussion here).

It's been suggested that you set those constants using SetEnv in your .htaccess file (discussion here).

For Example:

PRODUCTION .htaccess:

SetEnv KOHANA_ENV PRODUCTION
SetEnv BASE_URL http://www.domain.com

DEVELOPMENT .htaccess:

SetEnv KOHANA_ENV DEVELOPMENT
SetEnv BASE_URL http://127.0.0.1/domain/

I've been looking for ways to manage the different version of the .htaccess file in Git. I looked at branching, but VonC submitted a great answer, suggesting it might not be the best approach.

VonC further suggested .gitattributes filter driver as a solution (Pro Git explanation).

I like the idea of using the .gitattributes filter driver, but I've struggled to find "how to" examples that I can understand (the Pro Git examples were a little above me).

I'm using PHPFog to deploy. They require you to do clone and push to deploy your application.

So here are my questions:

Upvotes: 0

Views: 873

Answers (1)

Rich H.
Rich H.

Reputation: 154

According to many forums out there setenv in htaccess is perfectly acceptable --On PHPFog you can set environmental variables in the app console.

.gitattributes were not a requested feature and never made it into PHPFog

You can make the htaccess file using vi or vim aka:
vim /.htaccess

then use i to insert new data

and

esc to escape out

and

:wq

to save and exit vim

Upvotes: 1

Related Questions