I m using github for hosting my code and AWS Elastic Beanstalk to deploy my project. There is no any relation between them while deploying.
So I have too big compiled bundle.js files. Its automatically compiles in any code changes. Because of that we are getting too many conflicts with my team.
I have disabled them from .gitignore but when I deployed with: eb deploy ElasticBeanstalk doesn't track the bunle.js files as well.
So I'd like to ignore my files only for github but they should be tracked from eb when I use eb deploy.
Is there any solution for this case.
Just create separate .ebignore file:
You can tell the EB CLI to ignore certain files in your project directory with a .ebignore file. This file works like a .gitignore. When you deploy your project directory to Elastic Beanstalk and create a new application version, the EB CLI will not include files specified by the .ebignore in the source bundle that it creates.
Configure the EB CLI
Related
I am doing my first server deployment. I am developing a Rails API project with Angular as front end. Server code is saved in a folder in GitHub branch. I need to deploy only the content of that folder into the server. Currently, in deploy.rb, I have given it as
set :repo_url, "https://url to the repository"
How can I specify the repo_url?
I have found the solution. You can specify the sub folder name in the deploy.rb file as shown below
set :repo_tree, 'folder_name'
Thanks
How to deploy subdirectory from github with mina?
My master contains
|Dir_name
|Rails-Project
|other stuff
I would like to deploy Rails-Project
I found this question, but without a good answer Deploy subdirectory with mina
I have 2 rails applications that live inside the same git repo.
There is a shared folder where common logic lives.
- app_1
- shared
- app_2
The shared folder is really just a symlink to the appropriate places inside the app_1 folder. There is also a shared_public folder that is symlinked to app_1/public/files and app_2/public/files.
How can I do this? I'm open to anything, it's a clean slate. The project was never deployed previously, so I don't have a existing infrastructure to rely on. And splitting the shared logic out is (unfortunately) not an option currently, because of the timeframe I have to work with.
Git
When you mention the shared folder is a symlink - this only exists in operating systems, not git
Since git is just a deployment mechanism in this instance (I.E will place your files from your repo onto your server), you'll probably be able to do the following:
Initialize a git repo on your server ($ git init on your server)
Clone your github repo locally (git clone https://github.com.... on your local box)
CD into your new folder and add the server's repo as a remote
$ git push [server repo name] master
This isn't what you want, I know.
It will push your files onto your server - so you'll get the following folder structure:
app1
app2
The shared folder could then be created on your server itself.
If you have your appropriate server setup, you should be able to get this running from performing these steps
Capistrano
If you want to use Capistrano, you'll have to do something a little more involved, as this does more than just push your files to your server
If you want to use Capistrano, you'll have to split your app1 and app2 into separate applications, and deploy them individually. This will still allow you to create a symlink on your server, except you'll have a slightly different structure to your directories
I want to setup Elastic Beanstalk for my existing rails application.
I was successful in doing the sample foo app.
These are the questions I have
I need the deployment to happen from my git repository and not from my local path where I am deploying. How do I do that for the sample foo app.
I need to have a before_symlink deploy hook. How can I do this ?
I have addressed these issues.
git aws.push takes all the commited things to git and then deploys it. Local changes are not impacted.
Created a config file under .ebextensions
More here - http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/customize-containers.html
Scenario
Project A is a Rails application:
Code hosted on GitHub on a private repo.
Deployed on Heroku (which has a readonly file system).
Project R that is an instance of Redmine, used to manage my project A:
Code hosted on GitHub on another private repo (same GitHub account).
Deployed on Heroku (which has a readonly file system).
Project CI that is an instance of Integrity, used to continuous integrate (by running tests) my project A:
Code hosted on GitHub on a third private repo (same GitHub account).
Deployed on Heroku (which has a readonly file system).
What I want
I want to be able to:
Use the Repository feature on Redmine on project R (in essence, to be able to see the repository from project R).
Run the tests on CI.
My problem
To clone and keep up to date the code of project A on both project R and project CI.
What I tried
For the 1. point, I've tried to follow the instructions found on http://www.redmine.org/wiki/1/RedmineRepositories, with the only difference that I've created the local bare copy of A into the root of R (because of Heroku's constraints on file system), which caused the creation of /A.git dir.
After that, I've re-deployed on Heroku the project R, and in the Redmine's project A settings I've configured as SCM "Git" and A.git as Path to .git directory (I've also tried ./A.git).
However, when I point to the tab Repository of A project on Redmine, I got a 500 with message:
"The entry or revision was not found in the repository."
Where am I wrong?
Any suggestion?
Thank you!
I think it is currently impossible to integrate Git or Mercurial repos with a Redmine instance running on Heroku due to the read-only filesystem constraint. I asked Eric Davis and he thinks so too. SVN and CVS don't require Redmine to have a local copy of the repo, and so I think they work, whereas Git and Hg don't.