One command deployments to IIS using Git

Necessity is the mother of invention. And Frank Zappa is the father.

One of our clients has a Windows web server at Rackspace behind a VPN as their test environment. Every time the client asked for an image to be moved 5px to the right, my designer would push to GitLab, and I would have to establish VPN, remote into the web server, and do a pull in the local repo in IIS. A time consuming, and given the number of client requests, maddening process.

So I thought, it would be great to just push to IIS from our local repositories. Here’s how to do it.

    1. Install Git and the bash tools for Windows
    2. Install the Bonobo prerequisites, if necessary. Note: Bonobo requires .NET 4.5
    3. Install Bonobo
    4. Allow the IIS user to modify your deployment folder in IIS, just like you did for the App_Data folder in the Bonobo install
    5. Create a new repo in Bonobo. I’ll call it “myrepo”.
    6. Navigate to the myrepo’s Details page and note the URL. It will likely be http://localhost/Bonobo.Git.Server/myrepo.git
    7. Set the remote in your local repo to the one you just created. You’ll want to switch out localhost for the IP of your server.
    8. Back on the web server, navigate to the hooks folder in your repo using Git Bash. Found at: C:\inetpub\wwwroot\Bonobo.Git.Server\App_Data\Repositories\myrepo\hooks
    9. In Git Bash, enter “touch post-receive” and then “chmod +x post-receive”
    10. Open post-receive and add the following text. I usually just do this in a text editor like Notepad++.
#!/bin/sh
LOGFILE=./post-receive.log
DEPLOYDIR=/c/inetpub/wwwroot/myrepo/
echo -e "[log] Received push request at $( date +%F)" >> $LOGFILE
 echo "[log] Starting Deploy..." >> $LOGFILE
 GIT_WORK_TREE="$DEPLOYDIR" git checkout -f
 echo "[log] Finished Deploy" >> $LOGFILE

11. The DEPLOYDIR variable should be the path (formatted like above) to your deployment folder from step 4. This script will also create a handy log file in your repository folder

12. Push some changes from your local repo, and you should you see them out on your site

Advertisements

Films of 1999: Nostalgia for Questioning the American Dream

It was 1999, I had just turned 17, and my friend Jake and I were driving back from watching Fight Club in the theaters. Jake jokingly hit the gas in his Mustang and took his hands off the wheel. Like Tyler Durden in the film, we were flirting with the idea of just “letting go.”

Fight Club, for all its hyper-masculinity and shots of Brad Pitt’s abs, turned out to be more than a joke for me. Its critique of consumption and the yuppie American lifestyle cut deep. Perhaps it was because I saw the film at a formative age, on the threshold of becoming an adult, but I moved forward into college and afterwards into my working life afraid and determined to not become Edward Norton’s character, trapped in an IKEA prison in some high-rise condominium. Much of my career–from working in independent publishing to living in Oakland* to working as a freelancer with one foot always outside of corporate IT departments–was driven by this fear of becoming just another soul lost in a vapid life of duvet covers.

The other week I noticed American Beauty pop-up on Netflix. After re-watching the film, I realized that it, too, was released in 1999 alongside another favorite of mine, Office Space. I had never put it together that these three films were released in the same year, and all three directly criticize the American dream of a salaried position and a comfortable, predictable life. All three films also tackle the concept of re-invention, whether it be into a construction worker, weed smoking fast food worker, or terrorist cell leader. The American dream was something to be avoided, and if you found yourself trapped in it, then it was time for a metamorphosis.

A co-worker who is nearly ten years my junior was recently having some issues with hardware, and I sent him the infamous beat-down clip from Office Space. He sent back some lols and then asked “if that was from a TV show.” I was surprised that he had never seen the cult favorite, although less so since he grew up in Iraq and Turkey. Nevertheless, it brought to mind the fact that people that are a bit younger than I am, true millennials you could say, were less effected by the three films than I was. This makes sense, since seeing these films at say, the age of 12 instead of 17, would make a huge difference. Could you really have been expected to understand the pitfalls of the American dream in the sixth grade? Confirming this theory, I have some friends and acquaintances who are in this younger age bracket that appear to have less issues with taking a typical “corporate” job or, in general, conspicuous consumption. Perhaps this be a defining line between those who, like myself, are on the border between Gen X and Gen Y, and those who are true Gen Ys/millenials.

But is this defining line really just the timing of three major Hollywood releases that took a critical glance at America? Probably not. I think they play a role, but what we really might be talking about here is pre 9/11 versus post. When I started thinking, “well what happened to that critical spirit present in these films,” the memory of waking up in an oddly quiet dorm my freshman year and walking out of my room to see people gathered around small TVs, some crying, flashed into my mind. 9/11 really did change everything. Suddenly we didn’t have time to question the vapidness of our lives–we had a new everpresent boogeyman to contend with. Things became more serious, and American life was re-affirmed in a sense. It’s interesting to try and envision where we would be had we sat, for the next 15 years, contemplating whether or not we really needed another duvet cover.

 

* This was the Oakland, CA of 8 years ago, which was a less typical city for recent college graduate to begin their career. Rougher and cheaper, West Oakland seemed like the place where Edward Norton’s character found the dilapidated house there he lived in after his condo imploded. Oakland has since changed with influx of people priced out of San Francisco due to the tech boom.

Selected search terms for this site

fancy cat

dj conner

futuristic mannequins

installing windows sharepoint services adapter on multi server environment

antichrist lars von trier child shoe

uncanny valley

fancy fonts do not display font-face

gangster wear women

pictures of people reading the newspaper

cx_freeze trackback paths

crazy looking guns

antichrist clit

what is the difference between serif and sans serif fonts

ryan gosling bulge

t-shirt animal portraits

dylan executable size

innocent gangster theme

cat reading, free

is rad a good source of project development for a night club

how to check if biztalk moss adapter is installed

mulholland drive i had a dream about this place

 

Music of Miami Vice

The glory days of 80s retro have come and gone with the oughts. For me it may have peaked as a nineteen-year-old at Club Beat It, but lord knows a lot of fratty/finance-y 80s parties went down much farther into the decade. And it’s clear the nineties are back.

One show worth revisiting, however, is Miami Vice. It had some fantastic music!

Devo – Going Under

Taken from Devo’s fourth album, New Traditionalists, Going Under could be about humans sucking (as a species), fascism, or any other major theme in Devo’s philosophy. But I’m putting my money on cunnilingus. This album is as filled with synth power anthems and as it is rife with sexual undertones. Seriously, almost every song on the album is about sex, just not as overt as other tunes.

Brian Ferry – Slave to Love

Living up to his namesake, Brian Ferry is a mythical man who is known to play a hand-synth and not fear repeated, long-standing camera closeups. His music gives men and women the strength to organize and speak at weddings, providing the unattached, isolated professionalism that inevitably attracts all singles at the event.

Phil Collins – In the Air Tonight

The drama! Can we see those streetlights reflecting on the hood one more time. Yet this is not even close to the drama that unfolds in this performance, the seppuku of dad-rock.

U2 – In the Name of Love

You know an LV marketing exec had that clip stuck in the back of their head when they gave birth to this tragedy.

bono - louis

Godley and Creme – Cry

I don’t know much about Godley and Creme except that the one guy’s name is Lol Creme. lol No, seriously.

And fucking Ted Nugent! The man who came up with the best album name of all time.

CRYYYYYYYYYYYYYYY!!!

the nuge

Unevenings

Tuesday, early evening, Coney Island.

 

Wednesday, early evening, Midtown Manhattan.

Spring Street Photography – Day 2

R0300151 R0300153 R0300154 R0300166

Spring Street Photography

My friend Nick is visiting from Seattle. He always brings an assortment of cameras. This time he brought a Ricoh GR for me, and we’ve been taking advantage of the good weather to get some street shots.

R0300060

R0300097

R0300098

R0300115

R0300116

R0300119

R0300124

R0300125