Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pnpm warning,issue#969 #980

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
212 changes: 106 additions & 106 deletions .github/ansible/production/nest.yaml
Original file line number Diff line number Diff line change
@@ -1,106 +1,106 @@
- name: Deploy Nest to Production
hosts: production_nest
tasks:
- name: Copy docker-compose.yaml
ansible.builtin.copy:
src: '{{ github_workspace }}/docker/docker-compose-production.yaml'
dest: ~/docker-compose.yaml
mode: '0644'

- name: Ensure backend directory exists
ansible.builtin.file:
path: ~/backend
state: directory
mode: '0755'

- name: Copy backend makefile
ansible.builtin.copy:
src: '{{ github_workspace }}/backend/Makefile'
dest: ~/backend/Makefile
mode: '0644'

- name: Update backend makefile for the production environment
shell:
cmd: sed -i 's/\bnest-backend\b/production-nest-backend/' ~/backend/Makefile

- name: Ensure cspell directory exists
ansible.builtin.file:
path: ~/cspell
state: directory
mode: '0755'

- name: Copy cspell makefile
ansible.builtin.copy:
src: '{{ github_workspace }}/cspell/Makefile'
dest: ~/cspell/Makefile
mode: '0644'

- name: Ensure frontend directory exists
ansible.builtin.file:
path: ~/frontend
state: directory
mode: '0755'

- name: Copy frontend makefile
ansible.builtin.copy:
src: '{{ github_workspace }}/frontend/Makefile'
dest: ~/frontend/Makefile
mode: '0644'

- name: Update frontend makefile for the production environment
shell:
cmd: sed -i 's/\bnest-frontend\b/production-nest-frontend/' ~/frontend/Makefile

- name: Copy main makefile
ansible.builtin.copy:
src: '{{ github_workspace }}/Makefile'
dest: ~/Makefile
mode: '0644'

- name: Ensure schema directory exists
ansible.builtin.file:
path: ~/schema
state: directory
mode: '0755'

- name: Copy schema makefile
ansible.builtin.copy:
src: '{{ github_workspace }}/schema/Makefile'
dest: ~/schema/Makefile
mode: '0644'

- name: Copy directory recursively
copy:
src: '{{ github_workspace }}/backend/data'
dest: ~/
mode: '0755'

- name: Copy .env.backend
copy:
src: '{{ github_workspace }}/.env.backend'
dest: ~/
mode: '0400'

- name: Copy .env.db
copy:
src: '{{ github_workspace }}/.env.db'
dest: ~/
mode: '0400'

- name: Prune docker images
shell:
cmd: docker image prune -f

- name: Update Docker images
shell:
cmd: docker compose pull

- name: Retart services
shell:
cmd: docker compose up -d

- name: Index data
async: 1800 # 30 minutes
poll: 0
shell: |
make index-data > /var/log/nest/production/index-data.log 2>&1
- name: Deploy Nest to Production
hosts: production_nest
tasks:
- name: Copy docker-compose.yaml
ansible.builtin.copy:
src: "{{ github_workspace }}/docker/docker-compose-production.yaml"
dest: ~/docker-compose.yaml
mode: "0644"

- name: Ensure backend directory exists
ansible.builtin.file:
path: ~/backend
state: directory
mode: "0755"

- name: Copy backend makefile
ansible.builtin.copy:
src: "{{ github_workspace }}/backend/Makefile"
dest: ~/backend/Makefile
mode: "0644"

- name: Update backend makefile for the production environment
shell:
cmd: sed -i 's/\bnest-backend\b/production-nest-backend/' ~/backend/Makefile

- name: Ensure cspell directory exists
ansible.builtin.file:
path: ~/cspell
state: directory
mode: "0755"

- name: Copy cspell makefile
ansible.builtin.copy:
src: "{{ github_workspace }}/cspell/Makefile"
dest: ~/cspell/Makefile
mode: "0644"

- name: Ensure frontend directory exists
ansible.builtin.file:
path: ~/frontend
state: directory
mode: "0755"

- name: Copy frontend makefile
ansible.builtin.copy:
src: "{{ github_workspace }}/frontend/Makefile"
dest: ~/frontend/Makefile
mode: "0644"

- name: Update frontend makefile for the production environment
shell:
cmd: sed -i 's/\bnest-frontend\b/production-nest-frontend/' ~/frontend/Makefile

- name: Copy main makefile
ansible.builtin.copy:
src: "{{ github_workspace }}/Makefile"
dest: ~/Makefile
mode: "0644"

- name: Ensure schema directory exists
ansible.builtin.file:
path: ~/schema
state: directory
mode: "0755"

- name: Copy schema makefile
ansible.builtin.copy:
src: "{{ github_workspace }}/schema/Makefile"
dest: ~/schema/Makefile
mode: "0644"

- name: Copy directory recursively
copy:
src: "{{ github_workspace }}/backend/data"
dest: ~/
mode: "0755"

- name: Copy .env.backend
copy:
src: "{{ github_workspace }}/.env.backend"
dest: ~/
mode: "0400"

- name: Copy .env.db
copy:
src: "{{ github_workspace }}/.env.db"
dest: ~/
mode: "0400"

- name: Prune docker images
shell:
cmd: docker image prune -f

- name: Update Docker images
shell:
cmd: docker compose pull

- name: Retart services
shell:
cmd: docker compose up -d

- name: Index data
async: 1800 # 30 minutes
poll: 0
shell: |
make index-data > /var/log/nest/production/index-data.log 2>&1
38 changes: 19 additions & 19 deletions .github/ansible/production/proxy.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
- name: Deploy Production Nest Proxy
hosts: production_nest_proxy
tasks:
- name: Copy proxy docker-compose.yaml
ansible.builtin.copy:
src: '{{ github_workspace }}/proxy/docker-compose.yaml'
dest: ~/docker-compose.yaml
mode: '0644'
- name: Deploy Production Nest Proxy
hosts: production_nest_proxy
tasks:
- name: Copy proxy docker-compose.yaml
ansible.builtin.copy:
src: "{{ github_workspace }}/proxy/docker-compose.yaml"
dest: ~/docker-compose.yaml
mode: "0644"

- name: Copy proxy configuration file
ansible.builtin.copy:
src: '{{ github_workspace }}/proxy/production.conf'
dest: ~/production.conf
mode: '0644'
- name: Copy proxy configuration file
ansible.builtin.copy:
src: "{{ github_workspace }}/proxy/production.conf"
dest: ~/production.conf
mode: "0644"

- name: Update Docker images
shell:
cmd: docker compose pull
- name: Update Docker images
shell:
cmd: docker compose pull

- name: Retart proxy server
shell:
cmd: docker compose restart
- name: Retart proxy server
shell:
cmd: docker compose restart
16 changes: 8 additions & 8 deletions .github/ansible/production/sync-data.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- name: Run Nest Production Data Sync
hosts: production_nest
tasks:
- name: Sync Nest data
async: 72000 # 20 hours
poll: 0
shell: |
make sync-data > /var/log/nest/production/sync-data.log 2>&1
- name: Run Nest Production Data Sync
hosts: production_nest
tasks:
- name: Sync Nest data
async: 72000 # 20 hours
poll: 0
shell: |
make sync-data > /var/log/nest/production/sync-data.log 2>&1
Loading