-
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
Showing
15 changed files
with
99 additions
and
673 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 @@ | ||
wift-demo |
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
vars: | ||
root_dir: /srv/wift | ||
root_site: wift.local | ||
root_site: "{{ 'wift.local' if target == 'local' else 'wift.io' }}" | ||
|
||
tasks: | ||
- name: Add pipenv repository | ||
|
@@ -28,27 +28,72 @@ | |
- git | ||
- vim | ||
- nginx | ||
|
||
- name: Create wift user | ||
become: true | ||
user: | ||
name: wift | ||
groups: www-data | ||
state: present | ||
createhome: true | ||
when: target != 'local' | ||
|
||
- name: Add .ssh directory for the wift user | ||
file: | ||
path: /home/wift/.ssh | ||
state: directory | ||
mode: 0700 | ||
owner: wift | ||
group: wift | ||
when: target != 'local' | ||
|
||
- name: Copy wift app user ssh key | ||
copy: | ||
src: secrets/wift_demo | ||
dest: /home/wift/.ssh/id_ed25519 | ||
owner: wift | ||
group: wift | ||
mode: 0700 | ||
when: target != 'local' | ||
|
||
- name: Ensure github.com is a known host | ||
become: true | ||
become_user: wift | ||
lineinfile: | ||
dest: ~/.ssh/known_hosts | ||
state: present | ||
create: true | ||
line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}" | ||
regexp: "^github\\.com" | ||
|
||
- name: Clone the source code | ||
become: true | ||
become_user: wift | ||
git: | ||
repo: [email protected]:meronym/wift.git | ||
dest: /home/wift/wift | ||
when: target != 'local' | ||
|
||
- name: Create wift root directory | ||
become: true | ||
file: | ||
path: '{{ root_dir }}' | ||
owner: vagrant | ||
owner: "{{ 'vagrant' if target == 'local' else 'wift' }}" | ||
group: www-data | ||
state: directory | ||
mode: 0755 | ||
|
||
- name: Link code repositories | ||
file: | ||
src: '/vagrant/{{ item }}' | ||
src: "/{{ 'vagrant' if target == 'local' else '/home/wift/wift' }}/{{ item }}" | ||
dest: '{{ root_dir }}/{{ item }}' | ||
state: link | ||
with_items: | ||
- wift-api | ||
- wift-checkout | ||
- wift-landing | ||
- wift-store | ||
|
||
- name: Disable the default site | ||
become: true | ||
file: | ||
|
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,8 @@ | ||
-----BEGIN OPENSSH PRIVATE KEY----- | ||
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW | ||
QyNTUxOQAAACBpIbVmo+TOhsWXoOyi+Zo0J2mTJJa9bWhmUB9VWgPe/gAAALCddrFDnXax | ||
QwAAAAtzc2gtZWQyNTUxOQAAACBpIbVmo+TOhsWXoOyi+Zo0J2mTJJa9bWhmUB9VWgPe/g | ||
AAAEBkwXw/kanbxrqNqOEvQOBEpjbAK+qGDNQkpj1TPONnY2khtWaj5M6GxZeg7KL5mjQn | ||
aZMklr1taGZQH1VaA97+AAAAJmx1Y2lhbmJvY2FATHVjaWFucy1NYWNCb29rLVByby0yLm | ||
xvY2FsAQIDBAUGBw== | ||
-----END OPENSSH PRIVATE KEY----- |
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 @@ | ||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGkhtWaj5M6GxZeg7KL5mjQnaZMklr1taGZQH1VaA97+ wift@wift-demo |
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ name = "pypi" | |
|
||
[packages] | ||
flask = "*" | ||
"web3" = "*" | ||
redis = "*" | ||
mongoengine = "*" | ||
qrcode = "*" | ||
|
Oops, something went wrong.