-
Notifications
You must be signed in to change notification settings - Fork 1
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
9f45293
commit 57e9826
Showing
6 changed files
with
86 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export HERE_API=YOUR API KEY | ||
export PORT=8080 |
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,15 @@ | ||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
release-linux-amd64: | ||
name: release linux/amd64 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: wangyoucao577/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
goos: linux | ||
goarch: amd64 |
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,9 @@ | ||
ANSIPLAY = ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook --inventory hosts.toml --ssh-common-args '-o StrictHostKeyChecking=accept-new -o IdentitiesOnly=yes' --private-key ./sshkey $(1) | ||
|
||
##@ General | ||
help: ## Display this help. | ||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' Makefile | ||
|
||
##@ Server management | ||
install: ## Install controller | ||
$(call ANSIPLAY, install-proxy.yml) |
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 @@ | ||
116.203.117.144 ansible_port=22010 |
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,54 @@ | ||
--- | ||
- name: Create non root user | ||
hosts: all | ||
remote_user: root | ||
tasks: | ||
- name: Add the user 'proxy' | ||
ansible.builtin.user: | ||
name: proxy | ||
shell: /bin/bash | ||
- name: Create .ssh directory | ||
file: | ||
path: /home/proxy/.ssh | ||
state: directory | ||
owner: proxy | ||
group: proxy | ||
- name: Set authorized keys for user controller | ||
copy: | ||
src: /root/.ssh/authorized_keys | ||
remote_src: true | ||
dest: /home/controller/.ssh/authorized_keys | ||
owner: controller | ||
group: controller | ||
- name: Install zenflows proxy | ||
hosts: all | ||
remote_user: root | ||
become_user: proxy | ||
become_method: su | ||
tasks: | ||
- name: Install package dependencies | ||
ansible.builtin.package: | ||
name: | ||
- nginx | ||
- tmux | ||
state: latest | ||
- name: Build app | ||
command: make | ||
args: | ||
chdir: .. | ||
delegate_to: localhost | ||
- name: copy executable | ||
copy: | ||
dest: "/zf-proxy" | ||
src: "../zf-proxy" | ||
owner: proxy | ||
group: proxy | ||
- name: copy executable | ||
copy: | ||
dest: "/.env" | ||
src: "../.env.production" | ||
owner: proxy | ||
group: proxy | ||
- name: run proxy | ||
# become: true | ||
command: tmux new-session -d -s zenflows-proxy "source /.env && /zf-proxy" |
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