Skip to content

Commit c232a49

Browse files
committed
Add project name to docker-compose
1 parent fdde750 commit c232a49

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

devops/capistrano/config/deploy.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
# Default value for default_env is {}
3030
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
31+
set :default_env, { 'COMPOSE_PROJECT_NAME': "tagbase" }
3132

3233
# Default value for local_user is ENV['USER']
3334
# set :local_user, -> { `git config user.name`.chomp }
@@ -62,9 +63,8 @@
6263
task :restart_app do
6364
on roles(:app) do
6465
# Your restart mechanism here, for example:
65-
execute '(cd /home/ubuntu/tagbase-server/current; sudo docker-compose down)'
66-
execute '(cd /home/ubuntu/tagbase-server/current; sudo docker-compose up -d)'
67-
#execute (cd /home/ubuntu/tagbase-server; docker-compose down; docker-compose up -d)
66+
execute "(cd /home/ubuntu/tagbase-server/current; sudo docker-compose -p'tagbase' down)"
67+
execute "(cd /home/ubuntu/tagbase-server/current; sudo docker-compose -p'tagbase' up -d)"
6868
end
6969
end
7070
after :deploy, 'deploy:copy_env_app'

0 commit comments

Comments
 (0)