Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

During launch stage, current symlink points to previous release #224

Closed
edwardmp opened this issue Sep 6, 2014 · 4 comments
Closed

During launch stage, current symlink points to previous release #224

edwardmp opened this issue Sep 6, 2014 · 4 comments

Comments

@edwardmp
Copy link

edwardmp commented Sep 6, 2014

I want to run some commands in the launch stage.
But I noticed current_path location points to the the previous deployment..
Of course I want to run something in the current deploy directory.
Is there another stage than launch I can use for this?

Same issue as here:
http://stackoverflow.com/questions/19836302/mina-deployment-invoke-task-once-current-symlink-is-updated

@edwardmp edwardmp changed the title During launch stage, current symlinks to previous release During launch stage, current symlink points to previous release Sep 6, 2014
@gabskoro
Copy link
Member

gabskoro commented Oct 4, 2014

Hi,

Launch is called after the new app folder was symlinked, so if you want to restart your server you need to replace this

queue! %[bundle exec thin restart -C "#{thin_yml}"]

with

queue %["cd #{deploy_to}/#{current_path} && bundle exec thin restart -C #{thin_yml}"]

@13k
Copy link
Contributor

13k commented Nov 17, 2014

what if I want to run stuff (for example: notifications, tracking metrics) before the launch stage and want to use the latest (HEAD) code?

@13k
Copy link
Contributor

13k commented Nov 17, 2014

nevermind, I realized the current, unchanged, directory it's the actual (temp) build directory

@d4be4st d4be4st closed this as completed Jan 22, 2015
@edwardmp
Copy link
Author

I am still having this issue. For example, I run a database migration on :launch, but it is only committed after the second mina deploy. The current symlink still refers to the old when :launch is triggered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants