-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
962462b
commit 17d7d42
Showing
2 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
- name: Deploy the app | ||
hosts: all | ||
remote_user: deploy | ||
tasks: | ||
- name: Copy prisma migrations | ||
copy: | ||
src: "{{ item.src }}" | ||
dest: "{{ item.dest }}" | ||
loop: "{{ deploy_files }}" | ||
|
||
- name: Install npm deps | ||
shell: | ||
cmd: "source /home/deploy/.nvm/nvm.sh && nvm exec default npm install" | ||
chdir: /home/{{ domain }} | ||
args: | ||
executable: /bin/bash | ||
|
||
- name: Run migrations | ||
shell: | ||
cmd: "source /home/deploy/.nvm/nvm.sh && nvm exec default npx prisma migrate deploy" | ||
chdir: /home/{{ domain }} | ||
args: | ||
executable: /bin/bash | ||
|
||
- name: Start the app with systemd | ||
shell: "sudo systemctl start {{ domain }}" |