File tree 2 files changed +15
-7
lines changed 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 12
12
ansible.builtin.template :
13
13
src : nginx/Makefile.nginx.j2
14
14
dest : ./Makefile
15
- mode : " 0644 "
15
+ mode : " 0640 "
16
16
17
17
- name : Set up docker-compose.yml on the remote server
18
18
ansible.builtin.template :
19
19
src : nginx/docker-compose.nginx.yml.j2
20
20
dest : ./docker-compose.yml
21
- mode : " 0644 "
21
+ mode : " 0640 "
22
22
23
23
- name : Make sure the directory structure for certs exist
24
24
ansible.builtin.file :
Original file line number Diff line number Diff line change 12
12
- name : Build with a given commit hash
13
13
# This will be stored in local registry, and available as version to docker-compose
14
14
# where we can just reference correct version
15
- ansible.builtin.shell : " cd /tmp/src && make docker/build V={{ app_version }}"
15
+ ansible.builtin.shell :
16
+ chdir : /tmp/src
17
+ cmd : " /usr/bin/make docker/build V={{ app_version }}"
16
18
17
19
- name : Create a server Makefile to manage app tasks
18
20
ansible.builtin.template :
24
26
ansible.builtin.template :
25
27
src : app/docker-compose.app.yml.j2
26
28
dest : ./docker-compose.yml
27
- mode : " 0644 "
29
+ mode : " 0640 "
28
30
29
31
- name : Check if the env file exists
30
32
ansible.builtin.stat :
44
46
when : not env_file.stat.exists
45
47
46
48
- name : Start docker compose to see if everything is running
47
- ansible.builtin.shell : " docker compose up -d"
49
+ ansible.builtin.command :
50
+ chdir : {{ ansible_user_dir }}
51
+ cmd : " docker compose up -d"
48
52
49
53
- name : Migrate on prod
50
- ansible.builtin.shell : " make prod/migrate"
54
+ ansible.builtin.shell :
55
+ chdir : /tmp/src
56
+ cmd : " /usr/bin/make prod/migrate"
51
57
52
58
- name : Restart everything and finish
53
- ansible.builtin.shell : " docker compose up -d"
59
+ ansible.builtin.command :
60
+ chdir : {{ ansible_user_dir }}
61
+ cmd : " docker compose up -d"
You can’t perform that action at this time.
0 commit comments