File tree 3 files changed +13
-6
lines changed 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 46
46
set_fact :
47
47
deploy_local_username : " {{ local_username_result.stdout }}"
48
48
49
+ - name : Set target deploy stage name
50
+ set_fact :
51
+ stage_name : " {{ inventory_file | splitext | first }}"
52
+
49
53
- name : Copy deploy .env file to server
50
54
template :
51
55
src : deploy_env.j2
57
61
docker_stack :
58
62
state : present
59
63
with_registry_auth : yes
60
- name : gup
64
+ name : " {{ 'gup_' ~ stage_name }} "
61
65
compose :
62
66
- /opt/gup-docker-deploy/docker-compose.yml
63
67
- /opt/gup-docker-deploy/docker-compose.deploy.yml
64
68
- version : ' 3.7'
65
69
services :
66
70
frontend :
67
71
environment :
68
- - " EMBER_ENVIRONMENT={{ gup_environment }}"
72
+ - " EMBER_ENVIRONMENT={{ stage_name }}"
69
73
- " GUP_SERVICE_PORT={{ gup_backend_port }}"
70
74
ports :
71
75
- " {{ gup_frontend_port }}:8080"
72
76
backend :
73
77
environment :
74
- - " GUP_ENVIRONMENT={{ gup_environment }}"
78
+ - " GUP_ENVIRONMENT={{ stage_name }}"
75
79
- " GUP_DB={{ gup_db }}"
76
80
- " GUP_DB_USER={{ gup_db_user }}"
77
81
- " GUP_DB_PASSWORD={{ gup_db_password }}"
99
103
image : " docker.ub.gu.se/gup-backend:{{ deploy_git_revision }}"
100
104
command : " rake db:migrate"
101
105
env :
102
- RAILS_ENV : " {{ gup_environment }}" # RAILS_ENV instead of GUP_ENVIRONMENT for rake
106
+ RAILS_ENV : " {{ stage_name }}" # RAILS_ENV instead of GUP_ENVIRONMENT for rake
103
107
GUP_DB : " {{ gup_db }}"
104
108
GUP_DB_USER : " {{ gup_db_user }}"
105
109
GUP_DB_PASSWORD : " {{ gup_db_password }}"
Original file line number Diff line number Diff line change 9
9
utv02 :
10
10
vars :
11
11
deploy_git_revision : docker-friendly-config-v1
12
- gup_environment : lab
13
12
gup_db : gup_db
14
13
gup_db_user : gup_user
15
14
gup_db_password : gup_pass
16
15
gup_scopus_api_key : <scopus_key>
17
16
gup_mq_api_key : <mq_key>
18
17
gup_secret_key_base : 29f01727314845cd7351aace2c4453e28cb95089dadafb49e299e5750e382c303d483d25c2854832fe274d6d27e09442fce906c2621e311ff650fd79644c8ea8
19
-
Original file line number Diff line number Diff line change @@ -3,7 +3,12 @@ services:
3
3
frontend :
4
4
ports :
5
5
- ${GUP_FRONTEND_PORT}:8080
6
+ networks :
7
+ - haproxy
8
+ endpint_mode : dnsrr
6
9
backend :
10
+ networks :
11
+ - haproxy
7
12
endpoint_mode : dnsrr
8
13
db :
9
14
deploy :
You can’t perform that action at this time.
0 commit comments