File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 1212 ansible.builtin.template :
1313 src : nginx/Makefile.nginx.j2
1414 dest : ./Makefile
15- mode : " 0644 "
15+ mode : " 0640 "
1616
1717 - name : Set up docker-compose.yml on the remote server
1818 ansible.builtin.template :
1919 src : nginx/docker-compose.nginx.yml.j2
2020 dest : ./docker-compose.yml
21- mode : " 0644 "
21+ mode : " 0640 "
2222
2323 - name : Make sure the directory structure for certs exist
2424 ansible.builtin.file :
Original file line number Diff line number Diff line change 1212 - name : Build with a given commit hash
1313 # This will be stored in local registry, and available as version to docker-compose
1414 # 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 }}"
1618
1719 - name : Create a server Makefile to manage app tasks
1820 ansible.builtin.template :
2426 ansible.builtin.template :
2527 src : app/docker-compose.app.yml.j2
2628 dest : ./docker-compose.yml
27- mode : " 0644 "
29+ mode : " 0640 "
2830
2931 - name : Check if the env file exists
3032 ansible.builtin.stat :
4446 when : not env_file.stat.exists
4547
4648 - 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"
4852
4953 - 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"
5157
5258 - 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