With Envoyer? You don't want to just run Elixir locally?
Envoyer.io and Elixir?
I signed up to try Elixir, because it seems like a neat feature, and I like supporting Taylor whenever I can. However, I couldn't seem to get my assets working. No matter how much I tried, I couldn't seem to get it working with Elixir for compliing assets. Has anyone had any luck with this?
Agree with Jeff. Use Elixir locally then push your changes to Github/Bitbucket or whatever, then Envoyer takes care of the deployment.
@JeffreyWay It's hard to say what the best practice is here. Because Elixir compiles into a different filename each time, I'm actually put the output "build" folder in my gitignore file.
Logic here is that, the source files should be tracked by source control, not the output. Why would you want compressed output in your git repo?
I also do this @chrisblackwell. I have my build folder ignored, and compile the assets on the server. It avoids conflicts with compressed files, when working with others.
Is this not best practice?
@leon13 That's what my thinking was too. I'd love to see @JeffreyWay and @sitesense chime in on this.
@chrisblackwell Do whatever works for you (and your team) :)
Personally I don't like files on my production server that have nothing to do with my app. Having 60MB+ of node modules sitting there just to build the assets irks me somewhat - and I don't like building assets on a production server - shit does happen :)
But bear in mind, I work a lot with small startups and I'm often the only developer. Versioned file conflicts are not an issue for me. I might approach things differently if that wasn't the case.
I'm still pondering this. What I like about compiling on the server is the ability to use a deployment hook with --production flag on my production server only.
My issue is that to compile on the server (with Envoyer), i have to install all my node dependencies either each time, or globally.
I'd love to hear about the way other's work with gulp and deployments!
I guess the ideal is for the deployment server (Envoyer) to run the build steps and then put the source code along with the build files onto the server.
Although I doubt that's ever going to be an option.
@ArthurGuy This is the set up I had with Forge, using the post-deploy script. I think I'm going to try it with Envoyer too, as it saved me a lot of hassle when working with other devs, and switching branches etc
You can map your "node_modules" folder above the "current" directory and add a symlink on deployment so that it shares the same folder, then run install as normal. Still might not be ideal but it would prevent you from having redundant files.
@Kryptyx Exactly what I've done :) Works a treat!
I'm currently having the same problem here. Your solution sounds good, but what if I add additional node modules to the package.json file? So with that in mind I do have to run npm install on every deploy when I want to compile everything on the server, right?
Please or to participate in this conversation.