So I have a cap file linked to my github and setup to deploy my project to my server. When I run
bundle exec cap prod deploy it all works without a hitch.
I can see my code being cloned from my repo, a new release folder is created and symlinked to the current folder. However any changes I've made to my code aren't reflected.
The repo being cloned is a fork of the original repo which I created when I began working on the project. I haven't made any changes to code base except adding a single line to a twig file.
I have updated the deploy.rb so that it pulls from my forked repo instead of the original one and can see the code change in my latest commit. However the change is not reflected on the site.
Any ideas why this might be happening?
Cheers
Two possibilities come to mind other than using the incorrect URL to the forked git repository -
I occasionally try to deploy a new copy of my own site, but I have not yet pushed the latest code from my development server (and the local repo) to the live repo on Github, but it is from Github that the code is being fetched from during deployment.
As a final step, Capistrano changes the location that the 'current' symlink points to the newly deployed directory in the 'releases' directory. Your webserver (apache or Nginx must be set to use the 'current' symlink) as part of the base directory (it will probably be ..../current/web/, and then auto-load app.php from that directory, unless there a subdirectory/file exists, for .CSS/JS/images/etc). If the webserver config refers to the 'release' directory, and not the symlink, it will only be a specific, older, deployment.
Related
I cloned this repo to start my own project
https://github.com/invertase/react-native-firebase-starter
I have made some modifications and got it setup for Firebase, however I cannot push or rename the Repository.
I ran npm run rename and renamed the directory. GitHub still seems to think I am trying to push the orginal repository as my own.
When I try to push I get:
Authentication failed. You may not have permission to access the repository or the repository may have been archived...
How can I keep this template/starter and push a copy of it as my own repository?
I have tried removing all of the inessential files from the Repo and pushing that way. I get the following error:
I expected to be able to use the starter as a starter to get a project up and running... Maybe I am missing something super obvious.
I don't see a .git folder within the root of the react-native-firebase-starter template, perhaps this is causing issues with pushing this template since git needs to know where to point to upstream.
Maybe you could try initializing the template to your personal git repository and seeing if this resolves your authentication issue:
Create a new repository on GitHub. To avoid errors, do not initialize the new repository with README, license, or gitignore files.
Initialize the local directory containing the template as a Git repository:
git init
Add the files in your new local repository. This stages them for the first commit:
git add .
Commit the files that you've staged in your local repository:
git commit -m "Initial commit"
At the top of your GitHub repository ,created in step 1, copy the remote repository URL.
Add the URL for the remote repository where your local repository will be pushed:
git remote add origin <remote_repository_url>
Push the changes in your local repository to your upstream repository contained in GitHub:
git push -u origin master
You should now be able to push this starter template into your own GitHub repository and use it as your own project.
As for the npm run rename command: this is a custom npm run script created by the author of this starter template and it simply runs the rename.js file contained within the .bin directory of the template's root directory. All this command does is recursively rename the files contained within this template project to the new name specified by your input, so I don't think this is causing the issue. I suspect once your project has been initialized properly with git the authentication issue will disappear as it will now point upstream to your personal repository.
Hopefully that helps!
I'm using docker to run a simple static web project, using the nginx official image. As a bower dependence I have a ui lib that is mine and is shared among two of my projects. To facilitate the development process I created a volume to my local machine to serve local files through the /html folder inside the nginx container. It works fine this way.
But, if I try to use bower link to create a link between a local copy of my ui lib and the bower dependence the nginx web server is not able to find the folder, since the link points to my local machine.
I'm running the docker vm in a Mac.
Did someone experienced something similar and have an idea about how to solve it?
Thanks,
I just run into this issue and found a way to solve it nicely.
The problem is that when you mount as a volume the whole /html folder the symlinks created by bower link are copied into your container but not the actual folders they are pointing at. When nginx tries to serve the file, it follows the symlink but now INSIDE the container, where the route is invalid.
To fix this, create another volume that maps the symlink directly. This way, docker-compose will follow the symlink BEFORE mounting into the container, therefore copying the actual folder contents. The nice thing about this is that in your local file system you still have the folder and the symlink working, so you can work as usually :)
Practical example:
My folder structure
/app
|--/bower_components
|--/packageA
|--/packageB -> symlink to /foo/bar/packageB
My compose file:
version: '2'
services:
nginx:
volumes:
- .:/foo
- ./bower_components/packageB:/foo/bower_components/packageB
...
Let me know if it worked, cheers!
Due to install Graphicsmagick at Meteor Up Docker, I need to edit the start.sh (link this: Meteor Up Docker and Graphicsmagick).
I done that at the server and works, but every time I run mupx deploy, my /opt/<appName>/config/start.sh file change to original. I need to change the start.sh template, but I don't know how to do that, how can I change it?
You have to change the file from your local meteor-up template. not sure about mupx, it might be in your global .npm installation folder.
I'm using kadira meteor-up so mine is located at the git cloned folder.
im trying to install PhantomJS in a MeteorApp.
I have done those step:
Add the npm package
meteor add meteorhacks:npm
Run meteor to let the npm package to pre-initialise
meteor
A file packages.json has been created at the root. Edit it to:
{
"phantomjs": "1.9.13"
}
A this point everything seem to work. But i try to test with this exemple that ive found here :
https://github.com/gadicc/meteor-phantomjs
But i dont understand where to put my phantomDriver.js
Why is phantomDriver.js is in assets/app/phantomDriver.js... but after, they say to create the file in ./private/phantomDriver.js...
Thank for clear explication :)
In development mode you create the file in /private/phantomDriver.js. When you build a meteor app it refactors everything into an application bundle which can be run.
After meteor builds your app it stores stuff from private into assets. For phantomjs to execute this file it needs to look in this directory. You don't have to create it. This is how meteor works internally.
If you look in your .meteor/local/build/programs/server directory the assets directory is there with anything you placed in private.
From the context of where your meteor code runs (the server directory above) the assets directory runs from this directory when your project is running.
Keep in mind when you deploy your app it loses its entire project structure and becomes something else. Gadi's phantomjs project is designed to work in production environments too.
TLDR; Don't worry about the assets directory, keep your file in /private/phantomDriver.js. Meteor should take care of the rest.
How can I create a copy of my entire local meteor application? I was expecting a command like "meteor clone myapp" but couldn't find any documentation and simply copying the folder doesn't work.
You could use git to clone the whole thing.
If you aren't familiar with git see this reference. http://gitref.org/creating/
In windows, you can copy and paste the entire project directory and go into .meteor/local directory and delete everything in that directory except the db directory. Then start the meteor server on the new project directory, with everything deleted in the .meteor/local directory, meteor will rebuild the project without altering the logic of your application.