From edf0499f3d92e6e85b5686c0d3821aded4698d9a Mon Sep 17 00:00:00 2001 From: Anatoliy Poloz Date: Wed, 22 May 2024 22:17:07 +0300 Subject: [PATCH 01/57] test actions --- .gitea/workflows/test_infra.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .gitea/workflows/test_infra.yaml diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml new file mode 100644 index 0000000..45f4141 --- /dev/null +++ b/.gitea/workflows/test_infra.yaml @@ -0,0 +1,19 @@ +name: "infra 0.0.0.1" +on: + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + name: Test + steps: + - uses: actions/checkout@v3 + + - name: init containers + run: make init + + - name: CI + run: make ci + From c9063a027b0bdd6b31be038cf0cce94ca3a1c31d Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:18:15 +0000 Subject: [PATCH 02/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 45f4141..706f9c5 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -14,6 +14,6 @@ jobs: - name: init containers run: make init - - name: CI + - name: run CI run: make ci From 565b759715b49041934958114f81c699c7ffb83e Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:24:38 +0000 Subject: [PATCH 03/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 706f9c5..3786e91 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -11,6 +11,11 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Add the SSH key to known_hosts + run: | + mkdir -p ~/.ssh + ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts + - name: init containers run: make init From 47f47cc630d269d988ac3104f0074fee83debba2 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:30:18 +0000 Subject: [PATCH 04/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 3786e91..4810951 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -14,6 +14,7 @@ jobs: - name: Add the SSH key to known_hosts run: | mkdir -p ~/.ssh + echo ${{ secrets.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts - name: init containers From 2e6fb5f9e15426fefd83c5c7dd9ce55369491c3d Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:31:12 +0000 Subject: [PATCH 05/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 4810951..b55757f 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,6 +15,7 @@ jobs: run: | mkdir -p ~/.ssh echo ${{ secrets.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa + chmod 0644 /root/.ssh/id_rsa ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts - name: init containers From 68ec6eeb9d4c9767f3144c26583c27b31180f80b Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:33:18 +0000 Subject: [PATCH 06/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index b55757f..664038e 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: run: | mkdir -p ~/.ssh echo ${{ secrets.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa - chmod 0644 /root/.ssh/id_rsa + chmod 0600 /root/.ssh/id_rsa ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts - name: init containers From 0ac4690746e41583bb8528744eff0db126545839 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:34:58 +0000 Subject: [PATCH 07/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 664038e..706f9c5 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -11,13 +11,6 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Add the SSH key to known_hosts - run: | - mkdir -p ~/.ssh - echo ${{ secrets.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa - chmod 0600 /root/.ssh/id_rsa - ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts - - name: init containers run: make init From 2f53541cff5d31cbe7daa90c6a48df276ee4d42c Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:35:35 +0000 Subject: [PATCH 08/57] Update .env.infra-example --- .env.infra-example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.infra-example b/.env.infra-example index 55c0279..c1e70cc 100644 --- a/.env.infra-example +++ b/.env.infra-example @@ -11,4 +11,4 @@ MYSQL_ROOT_PASSWORD="nhbnhb22" MYSQL_DATABASE="eatvio" MYSQL_USER="eatvio_user" MYSQL_PASSWORD="eatvio_pass_nhbnhb22" -MY_APP_GIT_URL="ssh://git@10.55.5.123:222/eatvio/eatvio.git" +MY_APP_GIT_URL="http://10.55.5.123:3000/eatvio/eatvio.git" From 9d5bb53cb4079df90df89b446c22ff4fa4a36fae Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:41:54 +0000 Subject: [PATCH 09/57] Update .env.infra-example --- .env.infra-example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.infra-example b/.env.infra-example index c1e70cc..892cb1c 100644 --- a/.env.infra-example +++ b/.env.infra-example @@ -11,4 +11,4 @@ MYSQL_ROOT_PASSWORD="nhbnhb22" MYSQL_DATABASE="eatvio" MYSQL_USER="eatvio_user" MYSQL_PASSWORD="eatvio_pass_nhbnhb22" -MY_APP_GIT_URL="http://10.55.5.123:3000/eatvio/eatvio.git" +MY_APP_GIT_URL="ssh://git@10.55.5.123:222/apoloz/eatvio.git" From d37f9f1fdc1cb7fb9f3fb2c8db2479d1e68fcdd0 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:43:52 +0000 Subject: [PATCH 10/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 706f9c5..a212fbf 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -11,6 +11,13 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Add the SSH key to known_hosts + run: | + mkdir -p ~/.ssh + echo ${{ secrets.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa + chmod 0644 /root/.ssh/id_rsa + ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts + - name: init containers run: make init From 1c7d529531a1e3bb871829275972ece1a09b9279 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:44:25 +0000 Subject: [PATCH 11/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index a212fbf..3d98816 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: run: | mkdir -p ~/.ssh echo ${{ secrets.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa - chmod 0644 /root/.ssh/id_rsa + chmod 0600 /root/.ssh/id_rsa ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts - name: init containers From 53d304d64fa81d2f81a6ec4e700780eb0ee26467 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:48:58 +0000 Subject: [PATCH 12/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 3d98816..fcfbb1f 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -14,7 +14,7 @@ jobs: - name: Add the SSH key to known_hosts run: | mkdir -p ~/.ssh - echo ${{ secrets.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa + echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa chmod 0600 /root/.ssh/id_rsa ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts From 716d0a1b8070a7abf5320064d51f4362863669d8 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:52:17 +0000 Subject: [PATCH 13/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index fcfbb1f..ae96a21 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,6 +15,7 @@ jobs: run: | mkdir -p ~/.ssh echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa + cat ${{ vars.MY_SSH_PRIV_KEY }} chmod 0600 /root/.ssh/id_rsa ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts From 0c145255ad023fc1a58be321abee98d9a3e2e53f Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:53:07 +0000 Subject: [PATCH 14/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index ae96a21..f776c7a 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: run: | mkdir -p ~/.ssh echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa - cat ${{ vars.MY_SSH_PRIV_KEY }} + cat ~/.ssh/id_rsa chmod 0600 /root/.ssh/id_rsa ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts From 9d6ea54266bc3ed2b9d1818c9ae88f4ff7564267 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:54:19 +0000 Subject: [PATCH 15/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index f776c7a..da82367 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -16,7 +16,7 @@ jobs: mkdir -p ~/.ssh echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa cat ~/.ssh/id_rsa - chmod 0600 /root/.ssh/id_rsa + chmod 0600 ~/.ssh/id_rsa ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts - name: init containers From 483f037f557b8d4269799045e1bb7969f6f73a71 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 19:56:44 +0000 Subject: [PATCH 16/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index da82367..4859a3f 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -14,10 +14,9 @@ jobs: - name: Add the SSH key to known_hosts run: | mkdir -p ~/.ssh + ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa - cat ~/.ssh/id_rsa chmod 0600 ~/.ssh/id_rsa - ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts - name: init containers run: make init From ff9e94094b82db2519f91daf158febe648cf27f9 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:00:16 +0000 Subject: [PATCH 17/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 4859a3f..10d8784 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,8 +15,9 @@ jobs: run: | mkdir -p ~/.ssh ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts - echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa - chmod 0600 ~/.ssh/id_rsa + ssh-add - <<< "${{ secrets.MY_SSH_PRIV_KEY }}" + # echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa + # chmod 0600 ~/.ssh/id_rsa - name: init containers run: make init From 029b9b3cba1fbe3289f2e1deed9dbe14806e9734 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:01:55 +0000 Subject: [PATCH 18/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 10d8784..4ce7e7c 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -12,10 +12,13 @@ jobs: - uses: actions/checkout@v3 - name: Add the SSH key to known_hosts + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | mkdir -p ~/.ssh - ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts + ssh-agent -a $SSH_AUTH_SOCK > /dev/null ssh-add - <<< "${{ secrets.MY_SSH_PRIV_KEY }}" + ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts # echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa # chmod 0600 ~/.ssh/id_rsa From 2bd55c1f4970a4969b8a15165826354af8b95375 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:03:03 +0000 Subject: [PATCH 19/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 4ce7e7c..afd5e45 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -17,7 +17,7 @@ jobs: run: | mkdir -p ~/.ssh ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add - <<< "${{ secrets.MY_SSH_PRIV_KEY }}" + ssh-add - <<< "${{ vars.MY_SSH_PRIV_KEY }}" ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts # echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa # chmod 0600 ~/.ssh/id_rsa From 4746ececb4f4a4c543ec717d538ce41933f70121 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:12:22 +0000 Subject: [PATCH 20/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index afd5e45..1c4ed49 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,9 +15,9 @@ jobs: env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | - mkdir -p ~/.ssh + # mkdir -p ~/.ssh ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add - <<< "${{ vars.MY_SSH_PRIV_KEY }}" + ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts # echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa # chmod 0600 ~/.ssh/id_rsa From ece73cafe09e1c75aa3cad58eb61a2d047d71bd8 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:17:25 +0000 Subject: [PATCH 21/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 1c4ed49..70b4ae2 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -17,7 +17,7 @@ jobs: run: | # mkdir -p ~/.ssh ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" + ssh-add <(echo "${{ secrets.SSH_PRIVATE_KEY }}" | base64 -d) ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts # echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa # chmod 0600 ~/.ssh/id_rsa From 040f9589780534c048f0508dca340b611e876aa3 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:18:08 +0000 Subject: [PATCH 22/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 70b4ae2..6bbd879 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -17,7 +17,7 @@ jobs: run: | # mkdir -p ~/.ssh ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add <(echo "${{ secrets.SSH_PRIVATE_KEY }}" | base64 -d) + ssh-add - <(echo "${{ secrets.SSH_PRIVATE_KEY }}" | base64 -d) ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts # echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa # chmod 0600 ~/.ssh/id_rsa From 1b0efb8cc4d4ce1ea8b063e2840dc9471d6e499b Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:19:38 +0000 Subject: [PATCH 23/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 6bbd879..33e16e4 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -17,6 +17,7 @@ jobs: run: | # mkdir -p ~/.ssh ssh-agent -a $SSH_AUTH_SOCK > /dev/null + echo "${{ secrets.SSH_PRIVATE_KEY }}" | base64 -d ssh-add - <(echo "${{ secrets.SSH_PRIVATE_KEY }}" | base64 -d) ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts # echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa From ee459376bdf7e37d03d26d3b0b485517eb550f72 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:24:35 +0000 Subject: [PATCH 24/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 33e16e4..bbe7326 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,13 +15,8 @@ jobs: env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | - # mkdir -p ~/.ssh ssh-agent -a $SSH_AUTH_SOCK > /dev/null - echo "${{ secrets.SSH_PRIVATE_KEY }}" | base64 -d - ssh-add - <(echo "${{ secrets.SSH_PRIVATE_KEY }}" | base64 -d) - ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts - # echo ${{ vars.MY_SSH_PRIV_KEY }} > ~/.ssh/id_rsa - # chmod 0600 ~/.ssh/id_rsa + ssh-add - <<<"${{ secrets.SSH_PRIVATE_KEY }}" - name: init containers run: make init From 40de7ed07e8a248367a64435b7efbc4f59bc1e17 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:32:55 +0000 Subject: [PATCH 25/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index bbe7326..03d8f56 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -14,9 +14,10 @@ jobs: - name: Add the SSH key to known_hosts env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock + SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} run: | ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add - <<<"${{ secrets.SSH_PRIVATE_KEY }}" + ssh-add - <<< $SSH_PRIVATE_KEY - name: init containers run: make init From d401f64f1b68437c3f768cd283f1c7d30694a644 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:36:11 +0000 Subject: [PATCH 26/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 03d8f56..8a4cc83 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -17,9 +17,11 @@ jobs: SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} run: | ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add - <<< $SSH_PRIVATE_KEY + echo $SSH_PRIVATE_KEY | ssh-add - $SSH_PRIVATE_KEY - name: init containers + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: make init - name: run CI From 2939bfe4e9b123595737ea8fdac1dfb241ba0167 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:38:54 +0000 Subject: [PATCH 27/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 8a4cc83..ca4ce8f 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -14,10 +14,9 @@ jobs: - name: Add the SSH key to known_hosts env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock - SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} run: | ssh-agent -a $SSH_AUTH_SOCK > /dev/null - echo $SSH_PRIVATE_KEY | ssh-add - $SSH_PRIVATE_KEY + ssh-add - <<< ${{ secrets.SSH_PRIVATE_KEY }} - name: init containers env: From 8ddb03cd303cc085255e59b6fa802360683478d7 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:40:34 +0000 Subject: [PATCH 28/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index ca4ce8f..5a382a6 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -16,7 +16,7 @@ jobs: SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add - <<< ${{ secrets.SSH_PRIVATE_KEY }} + ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" - name: init containers env: From 59b36f1390a45f350af2f5a7d3cc2df76aa7a4b0 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:41:43 +0000 Subject: [PATCH 29/57] Update .env.infra-example --- .env.infra-example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.infra-example b/.env.infra-example index 892cb1c..9889820 100644 --- a/.env.infra-example +++ b/.env.infra-example @@ -11,4 +11,4 @@ MYSQL_ROOT_PASSWORD="nhbnhb22" MYSQL_DATABASE="eatvio" MYSQL_USER="eatvio_user" MYSQL_PASSWORD="eatvio_pass_nhbnhb22" -MY_APP_GIT_URL="ssh://git@10.55.5.123:222/apoloz/eatvio.git" +MY_APP_GIT_URL="http://10.55.5.123:3000/eatvio/eatvio" From dfff2abb65804a16515e1df29f678bfbdd5e47d0 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:42:40 +0000 Subject: [PATCH 30/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 5a382a6..4e6eab2 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -11,16 +11,16 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Add the SSH key to known_hosts - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock - run: | - ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" +# - name: Add the SSH key to known_hosts +# env: +# SSH_AUTH_SOCK: /tmp/ssh_agent.sock +# run: | +# ssh-agent -a $SSH_AUTH_SOCK > /dev/null +# ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" - name: init containers - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock +# env: +# SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: make init - name: run CI From 851349814ca7281d5537d43967741cefb656e687 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 20:46:05 +0000 Subject: [PATCH 31/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 4e6eab2..512ca71 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -11,6 +11,11 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: actions/checkout@v3 + with: + repository: eatvio/eatvio + path: app + # - name: Add the SSH key to known_hosts # env: # SSH_AUTH_SOCK: /tmp/ssh_agent.sock From f1619fee9fe3c68ceb4aa50630ec46464b427fdc Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:03:39 +0000 Subject: [PATCH 32/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 512ca71..8c03809 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,6 +15,7 @@ jobs: with: repository: eatvio/eatvio path: app + token: ${{ secrets.local_token }} # - name: Add the SSH key to known_hosts # env: From 473591668c6b5bcbcd76f6a4653d80e7a9c400af Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:04:37 +0000 Subject: [PATCH 33/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 8c03809..51fe691 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: with: repository: eatvio/eatvio path: app - token: ${{ secrets.local_token }} + token: ${{ secrets.LOCAL_TOKEN }} # - name: Add the SSH key to known_hosts # env: From 66335416619d778f189d04083fcf7fd9f0077c9c Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:10:47 +0000 Subject: [PATCH 34/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 51fe691..6e1dbcc 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: with: repository: eatvio/eatvio path: app - token: ${{ secrets.LOCAL_TOKEN }} + token: ${{ vars.LOCAL_TOKEN }} # - name: Add the SSH key to known_hosts # env: From 7557c00b2887d4a9fcc8880d9cc5890012f59a71 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:25:26 +0000 Subject: [PATCH 35/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 6e1dbcc..51fe691 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: with: repository: eatvio/eatvio path: app - token: ${{ vars.LOCAL_TOKEN }} + token: ${{ secrets.LOCAL_TOKEN }} # - name: Add the SSH key to known_hosts # env: From 3b3966f3e8349205d6693e624c76c8307bb2c674 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:26:33 +0000 Subject: [PATCH 36/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 51fe691..6e1dbcc 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: with: repository: eatvio/eatvio path: app - token: ${{ secrets.LOCAL_TOKEN }} + token: ${{ vars.LOCAL_TOKEN }} # - name: Add the SSH key to known_hosts # env: From cddb338bafbc28136e56d4d59ed0f5bef0b71040 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:31:47 +0000 Subject: [PATCH 37/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 6e1dbcc..846c184 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: with: repository: eatvio/eatvio path: app - token: ${{ vars.LOCAL_TOKEN }} + token: ${{ vars.REPO_TOKEN }} # - name: Add the SSH key to known_hosts # env: From d5b01ad23c62123849649f1ca0ead9d90883e799 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:32:20 +0000 Subject: [PATCH 38/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 846c184..d04fe78 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: with: repository: eatvio/eatvio path: app - token: ${{ vars.REPO_TOKEN }} + token: ${{ secrets.REPO_TOKEN }} # - name: Add the SSH key to known_hosts # env: From 43428aab4c70854af15046b04ddcd870afb2cce7 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:32:48 +0000 Subject: [PATCH 39/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index d04fe78..4b2a475 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: with: repository: eatvio/eatvio path: app - token: ${{ secrets.REPO_TOKEN }} + token: ${{ secret.REPO_TOKEN }} # - name: Add the SSH key to known_hosts # env: From 6d9ee3cccc1d2223b138477833618c9db06a6838 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:39:54 +0000 Subject: [PATCH 40/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 4b2a475..0a3395a 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: with: repository: eatvio/eatvio path: app - token: ${{ secret.REPO_TOKEN }} + token: ${{ secrets.MY_INFRA }} # - name: Add the SSH key to known_hosts # env: From 02726200c1d5cfd821b2577eff148885a77e4692 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:40:30 +0000 Subject: [PATCH 41/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 0a3395a..f068924 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: with: repository: eatvio/eatvio path: app - token: ${{ secrets.MY_INFRA }} + token: ${{ vars.MY_INFRA }} # - name: Add the SSH key to known_hosts # env: From 09f95788bf4635817a61800f7284e412fe6689da Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:41:06 +0000 Subject: [PATCH 42/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index f068924..9bdfcc4 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: with: repository: eatvio/eatvio path: app - token: ${{ vars.MY_INFRA }} + token: ${{ env.MY_INFRA }} # - name: Add the SSH key to known_hosts # env: From 9e2d930b7c738b26f680c1076de766863cd14f8a Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:41:29 +0000 Subject: [PATCH 43/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 9bdfcc4..f3f6b5c 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: with: repository: eatvio/eatvio path: app - token: ${{ env.MY_INFRA }} + token: ${{ MY_INFRA }} # - name: Add the SSH key to known_hosts # env: From 148da23e803bebbf5ff7d0586dcdbd5b43665534 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:44:21 +0000 Subject: [PATCH 44/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index f3f6b5c..6e1dbcc 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: with: repository: eatvio/eatvio path: app - token: ${{ MY_INFRA }} + token: ${{ vars.LOCAL_TOKEN }} # - name: Add the SSH key to known_hosts # env: From 74f8c69d3c077e3115a39941b0a9818979450791 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:47:31 +0000 Subject: [PATCH 45/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 6e1dbcc..42a897b 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -11,22 +11,16 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/checkout@v3 - with: - repository: eatvio/eatvio - path: app - token: ${{ vars.LOCAL_TOKEN }} - -# - name: Add the SSH key to known_hosts -# env: -# SSH_AUTH_SOCK: /tmp/ssh_agent.sock -# run: | -# ssh-agent -a $SSH_AUTH_SOCK > /dev/null -# ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" + - name: Add the SSH key to known_hosts + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: | + ssh-agent -a $SSH_AUTH_SOCK > /dev/null + ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" - name: init containers -# env: -# SSH_AUTH_SOCK: /tmp/ssh_agent.sock + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: make init - name: run CI From 988496a490d9a2b6fd1423987ac2dc874e553f17 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:48:45 +0000 Subject: [PATCH 46/57] Update .env.infra-example --- .env.infra-example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.infra-example b/.env.infra-example index 9889820..55c0279 100644 --- a/.env.infra-example +++ b/.env.infra-example @@ -11,4 +11,4 @@ MYSQL_ROOT_PASSWORD="nhbnhb22" MYSQL_DATABASE="eatvio" MYSQL_USER="eatvio_user" MYSQL_PASSWORD="eatvio_pass_nhbnhb22" -MY_APP_GIT_URL="http://10.55.5.123:3000/eatvio/eatvio" +MY_APP_GIT_URL="ssh://git@10.55.5.123:222/eatvio/eatvio.git" From 04d2e8b75d4baa1dbe4a39e5f09f7a8490799e9b Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:50:03 +0000 Subject: [PATCH 47/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 42a897b..bcb6cbf 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -21,7 +21,9 @@ jobs: - name: init containers env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock - run: make init + run: | + ssh-agent -a $SSH_AUTH_SOCK > /dev/null + make init - name: run CI run: make ci From e88413f3d84f0daf27f81ac451170eb193ab0734 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:51:02 +0000 Subject: [PATCH 48/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index bcb6cbf..98c0608 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -22,7 +22,6 @@ jobs: env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | - ssh-agent -a $SSH_AUTH_SOCK > /dev/null make init - name: run CI From 76e5e845737fd13a57a52b144344b7295abc21e1 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:54:37 +0000 Subject: [PATCH 49/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 98c0608..e2cef0e 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -12,15 +12,19 @@ jobs: - uses: actions/checkout@v3 - name: Add the SSH key to known_hosts - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock + #env: + #SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | - ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" + # ssh-agent -a $SSH_AUTH_SOCK > /dev/null + mkdir -p ~/.ssh + echo "${{ vars.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts + #ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" - name: init containers - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock + #env: + #SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | make init From 101f1c670d6b0e1e197626128e854df2a32d3bd7 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:55:46 +0000 Subject: [PATCH 50/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index e2cef0e..7bbb691 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -17,10 +17,11 @@ jobs: run: | # ssh-agent -a $SSH_AUTH_SOCK > /dev/null mkdir -p ~/.ssh - echo "${{ vars.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" + # echo "${{ vars.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts - #ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" + # ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" - name: init containers #env: From 79c98d52fc420deb01a1e93a221ef6b2c78cc096 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:56:35 +0000 Subject: [PATCH 51/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 7bbb691..ea541ad 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -15,7 +15,7 @@ jobs: #env: #SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | - # ssh-agent -a $SSH_AUTH_SOCK > /dev/null + ssh-agent -a $SSH_AUTH_SOCK > /dev/null mkdir -p ~/.ssh ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" # echo "${{ vars.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa From 19d427b34d7cae0545e64fec1e77106c15ec6979 Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 21:57:11 +0000 Subject: [PATCH 52/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index ea541ad..0bd8d4e 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -12,8 +12,8 @@ jobs: - uses: actions/checkout@v3 - name: Add the SSH key to known_hosts - #env: - #SSH_AUTH_SOCK: /tmp/ssh_agent.sock + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | ssh-agent -a $SSH_AUTH_SOCK > /dev/null mkdir -p ~/.ssh @@ -24,8 +24,8 @@ jobs: # ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" - name: init containers - #env: - #SSH_AUTH_SOCK: /tmp/ssh_agent.sock + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | make init From 368b1734643b1085bb2b2db774791a88d13d7d5b Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 22:09:45 +0000 Subject: [PATCH 53/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 0bd8d4e..0a379f7 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -17,16 +17,17 @@ jobs: run: | ssh-agent -a $SSH_AUTH_SOCK > /dev/null mkdir -p ~/.ssh - ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" - # echo "${{ vars.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts - # ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" + ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" || true + ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts || true + chmod 644 ~/.ssh/known_hosts || true + chmod 600 ~/.ssh/id_rsa || true + chmod 700 ~/.ssh || true - name: init containers env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | + cat ~/.ssh/known_hosts make init - name: run CI From a3002c9da5c0ccd150163f859717a7bd2ef6191e Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 22:12:36 +0000 Subject: [PATCH 54/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index 0a379f7..c7fac3c 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -20,14 +20,14 @@ jobs: ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" || true ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts || true chmod 644 ~/.ssh/known_hosts || true - chmod 600 ~/.ssh/id_rsa || true chmod 700 ~/.ssh || true - name: init containers env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | - cat ~/.ssh/known_hosts + apt-get update + apt-get install -y apt-transport-https ca-certificates curl software-properties-common docker.io make init - name: run CI From 2fd47cd342ab6263a8586eb0aa23c7ffb94b6d8f Mon Sep 17 00:00:00 2001 From: apoloz Date: Wed, 22 May 2024 22:15:28 +0000 Subject: [PATCH 55/57] Update .gitea/workflows/test_infra.yaml --- .gitea/workflows/test_infra.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/test_infra.yaml b/.gitea/workflows/test_infra.yaml index c7fac3c..1f4ccf1 100644 --- a/.gitea/workflows/test_infra.yaml +++ b/.gitea/workflows/test_infra.yaml @@ -28,6 +28,9 @@ jobs: run: | apt-get update apt-get install -y apt-transport-https ca-certificates curl software-properties-common docker.io + curl -L "https://github.com/docker/compose/releases/download/v2.17.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + chmod +x /usr/local/bin/docker-compose + docker-compose --version make init - name: run CI From c59731d75645d15a10199d09d06c3e6c91e7054b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=82=D0=BE=D0=BB=D0=B8=D0=B9=20=D0=9F?= =?UTF-8?q?=D0=BE=D0=BB=D0=BE=D0=B7?= Date: Fri, 20 Dec 2024 17:32:55 +0300 Subject: [PATCH 56/57] feat(memcached, schedule) --- phpdocker/front-end/Dockerfile | 12 ++++++------ phpdocker/php-fpm/Dockerfile | 18 +++++++++--------- phpdocker/worker/Dockerfile | 7 +++++-- phpdocker/worker/laravel-worker.conf | 14 ++++++++++++++ 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/phpdocker/front-end/Dockerfile b/phpdocker/front-end/Dockerfile index 95fc7c4..181e976 100644 --- a/phpdocker/front-end/Dockerfile +++ b/phpdocker/front-end/Dockerfile @@ -1,14 +1,14 @@ -FROM phpdockerio/php:8.2-fpm +FROM phpdockerio/php:8.3-fpm WORKDIR "/application" -RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - +RUN curl -sL https://deb.nodesource.com/setup_22.x | bash - RUN apt-get update && \ apt-get -y --no-install-recommends install \ git \ - php8.2-gd \ - php8.2-mysql \ - php8.2-sqlite3 \ - php8.2-pgsql \ + php8.3-gd \ + php8.3-mysql \ + php8.3-sqlite3 \ + php8.3-pgsql \ nodejs && npm install -g npm@10.1.0 \ apt-get clean; \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* diff --git a/phpdocker/php-fpm/Dockerfile b/phpdocker/php-fpm/Dockerfile index ec5ae24..5696c6f 100644 --- a/phpdocker/php-fpm/Dockerfile +++ b/phpdocker/php-fpm/Dockerfile @@ -1,18 +1,18 @@ -FROM phpdockerio/php:8.2-fpm +FROM phpdockerio/php:8.3-fpm WORKDIR "/application" -RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - +RUN curl -sL https://deb.nodesource.com/setup_22.x | bash - RUN apt-get update && \ apt-get -y --no-install-recommends install \ git \ - php8.2-gd \ - php8.2-mysql \ - php8.2-sqlite3 \ - php8.2-intl \ - php8.2-pgsql \ + imagemagick php8.3-imagick \ + php8.3-gd \ + php8.3-mysql \ + php8.3-sqlite3 \ + php8.3-intl \ + php8.3-memcached \ + php8.3-pgsql \ python3-pkg-resources supervisor ffmpeg jpegoptim \ - php8.2-intl \ - python3-pkg-resources supervisor \ nodejs && npm install -g npm@10.1.0 \ apt-get clean; \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* diff --git a/phpdocker/worker/Dockerfile b/phpdocker/worker/Dockerfile index d1c30cf..df4f50b 100644 --- a/phpdocker/worker/Dockerfile +++ b/phpdocker/worker/Dockerfile @@ -1,9 +1,12 @@ -FROM phpdockerio/php:8.2-fpm +FROM phpdockerio/php:8.3-fpm WORKDIR "/application" RUN apt-get update && \ apt-get -y --no-install-recommends install git \ - php8.2-gd php8.2-mysql php8.2-sqlite3 php8.2-pgsql ffmpeg jpegoptim \ + php8.3-gd php8.3-mysql php8.3-sqlite3 php8.3-pgsql ffmpeg jpegoptim \ + php8.3-intl \ + php8.3-memcached \ + imagemagick php8.3-imagick \ python3-pkg-resources supervisor && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* diff --git a/phpdocker/worker/laravel-worker.conf b/phpdocker/worker/laravel-worker.conf index cd2a642..3d47d14 100644 --- a/phpdocker/worker/laravel-worker.conf +++ b/phpdocker/worker/laravel-worker.conf @@ -13,3 +13,17 @@ numprocs=2 redirect_stderr=true stdout_logfile=/application/storage/logs/worker.log stopwaitsecs=3600 + +[program:laravel-schedule] +process_name=%(program_name)s_%(process_num)02d +command=php /application/artisan schedule:work +directory=/application +autostart=true +autorestart=true +stopasgroup=true +killasgroup=true +user=www-data +numprocs=1 +redirect_stderr=true +stdout_logfile=/application/storage/logs/schedule.log +stopwaitsecs=3600 From 9510ba1054c9c7127dbb55f5cb3cd4df4c613080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=82=D0=BE=D0=BB=D0=B8=D0=B9=20=D0=9F?= =?UTF-8?q?=D0=BE=D0=BB=D0=BE=D0=B7?= Date: Fri, 20 Dec 2024 17:38:03 +0300 Subject: [PATCH 57/57] updates from main --- Makefile | 24 +++++++---- docker-compose.yml | 42 ++++++++++--------- phpdocker/nginx/nginx.conf | 86 ++++++++++++++++++++++++++++++++++++-- 3 files changed, 121 insertions(+), 31 deletions(-) diff --git a/Makefile b/Makefile index 71d10cd..27cb6fc 100644 --- a/Makefile +++ b/Makefile @@ -80,14 +80,17 @@ make-storage-link: node-frontend-deps: docker-compose exec php-fpm npm i --legacy-peer-deps -test: - docker-compose exec php-fpm vendor/bin/paratest +paratest-bin: + docker-compose exec -u www-data php-fpm vendor/bin/paratest + +paratest-artisan: + docker-compose exec -u www-data php-fpm ./artisan test --parallel --stop-on-failure --env=testing fix-insights: - docker-compose exec php-fpm ./artisan insights --fix + docker-compose exec php-fpm vendor/bin/phpinsights --fix --config-path=./config/insights.php --no-interaction --min-quality=80 --min-complexity=90 --min-architecture=75 --min-style=95 insights: - docker-compose exec php-fpm vendor/bin/phpinsights --config-path=./config/insights.php --no-interaction --min-quality=80 --min-complexity=90 --min-architecture=75 --min-style=95 + docker-compose exec php-fpm vendor/bin/phpinsights --config-path=./config/insights.php --no-interaction --min-quality=80 --min-complexity=90 --min-architecture=75 --min-style=95 --flush-cache rector: docker-compose exec php-fpm vendor/bin/rector process --dry-run @@ -96,12 +99,19 @@ static-analysis: docker-compose exec php-fpm composer static-analysis detect-magic-numbers: - docker-compose exec php-fpm vendor/bin/phpmnd app/ tests/ + docker-compose exec -u www-data php-fpm vendor/bin/phpmnd app/ tests/ -ci: fix-code-style detect-magic-numbers test rector insights static-analysis +fix-web-permissions: + docker-compose exec -T php-fpm chown -R www-data:www-data bootstrap/cache storage -local-ci: +ci: fix-web-permissions fix-code-style detect-magic-numbers test rector insights static-analysis fix-web-permissions + +local-composer-ci: docker-compose exec -T php-fpm composer ci +test: fix-web-permissions paratest-artisan + +local-ci: fix-web-permissions local-composer-ci fix-web-permissions + init: clone copy-infra-env restart setup-laravel-packages copy-laravel-env setup-laravel-key run-migrations node-frontend-deps build-frontend-prod fix-permissions make-storage-link diff --git a/docker-compose.yml b/docker-compose.yml index 7c4ce54..eb89f31 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,18 +15,22 @@ services: - "${SOKETI_PORT:-6001}:6001" - "${SOKETI_METRICS_SERVER_PORT:-9601}:9601" networks: - ns-eatvio: - ipv4_address: 172.118.0.5 + - ns-eatvio labels: - "traefik.enable=false" restart: always + memcached: + image: "memcached:alpine" + networks: + - ns-eatvio + restart: always + mysql: image: "mysql:8.0" working_dir: /application networks: - ns-eatvio: - ipv4_address: 172.118.0.3 + - ns-eatvio volumes: - ".:/application" - "./mysql_data:/var/lib/mysql" @@ -48,12 +52,16 @@ services: - TZ=Europe/Moscow depends_on: - mysql + - worker + - frontend + - memcached + - typesense networks: - ns-eatvio: - ipv4_address: 172.118.0.2 + - ns-eatvio volumes: - "./app:/application" - - "./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/8.2/fpm/conf.d/99-overrides.ini" + - "./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/8.3/fpm/conf.d/99-overrides.ini" + - "./tbank_certs:/tbank_certs" labels: - "traefik.enable=false" restart: always @@ -64,9 +72,6 @@ services: working_dir: /application environment: - TZ=Europe/Moscow - depends_on: - - mysql - - php-fpm networks: - ns-eatvio volumes: @@ -83,13 +88,13 @@ services: command: "service supervisor start" depends_on: - mysql - - php-fpm networks: - ns-eatvio volumes: - "./app:/application" - - "./phpdocker/worker/php-ini-overrides.ini:/etc/php/8.2/fpm/conf.d/99-overrides.ini" + - "./phpdocker/worker/php-ini-overrides.ini:/etc/php/8.3/fpm/conf.d/99-overrides.ini" - "./phpdocker/worker/laravel-worker.conf:/etc/supervisor/conf.d/laravel-worker.conf" + - "./tbank_certs:/tbank_certs" labels: - "traefik.enable=false" restart: always @@ -104,8 +109,10 @@ services: volumes: - "./app:/application" - "./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf" + - "./phpdocker/nginx/shalom.eatvio.local+2.pem:/etc/nginx/shalom.eatvio.local+2.pem" + - "./phpdocker/nginx/shalom.eatvio.local+2-key.pem:/etc/nginx/shalom.eatvio.local+2-key.pem" ports: - - "1092:80" + - "10443:5000" networks: - web - ns-eatvio @@ -121,15 +128,13 @@ services: ports: - "8082:8025" networks: - ns-eatvio: - ipv4_address: 172.118.0.4 + - ns-eatvio typesense: image: typesense/typesense:26.0 restart: on-failure networks: - ns-eatvio: - ipv4_address: 172.118.0.6 + - ns-eatvio volumes: - ./typesense-data:/data command: "--data-dir /data --api-key=typesense --enable-cors" @@ -139,6 +144,3 @@ networks: external: true ns-eatvio: external: false - ipam: - config: - - subnet: 172.118.0.0/28 diff --git a/phpdocker/nginx/nginx.conf b/phpdocker/nginx/nginx.conf index 24046bb..e5d20b7 100644 --- a/phpdocker/nginx/nginx.conf +++ b/phpdocker/nginx/nginx.conf @@ -4,7 +4,7 @@ upstream phpupstream { server { listen 80; - server_name dev2.eatvio.com; + server_name shalom.eatvio.local; client_max_body_size 108M; @@ -40,11 +40,89 @@ server { } } server { - listen 80; - server_name socket.eatvio.com; + listen 5000 ssl; + server_name localhost; + + ssl_certificate /etc/nginx/shalom.eatvio.local+2.pem; + ssl_certificate_key /etc/nginx/shalom.eatvio.local+2-key.pem; + ssl_protocols TLSv1.2; + rewrite_log on; + error_log /dev/stdout debug; + + charset UTF-8; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $server_name; + + add_header X-Frame-Options "SAMEORIGIN" always; + add_header X-Content-Type-Options "nosniff" always; + add_header Referrer-Policy "strict-origin-when-cross-origin" always; + # add_header Content-Security-Policy "default-src 'self';"; + + + server_tokens off; + client_max_body_size 100M; + root /application/public; + index index.php; + + # location ^~ /visualization/ { + # rewrite /visualization/(.*) /$1 break; + # proxy_pass http://imageproxy:8080; + # } + + # try to serve file directly, fallback to index.php + location / { + try_files $uri /index.php$is_args$args; + } + + # if (!-e $request_filename) { + # rewrite ^.*$ /index.php last; + # } + + location ~ \.php$ { + fastcgi_pass phpupstream; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log"; + fastcgi_buffers 16 16k; + fastcgi_buffer_size 32k; + include fastcgi_params; + } + } +server { + listen 5000 ssl; + server_name socket.shalom.eatvio.local; + + ssl_certificate /etc/nginx/shalom.eatvio.local+2.pem; + ssl_certificate_key /etc/nginx/shalom.eatvio.local+2-key.pem; + ssl_protocols TLSv1.2; location / { - proxy_pass http://172.118.0.5:6001; + proxy_pass http://soketi:6001; + proxy_read_timeout 60; + proxy_connect_timeout 60; + proxy_redirect off; + + # Allow the use of websockets + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } + + error_log /dev/stdout info; + access_log /dev/stdout; +} + +server { + listen 80; + server_name socket.shalom.eatvio.local; + + location / { + proxy_pass http://soketi:6001; proxy_read_timeout 60; proxy_connect_timeout 60; proxy_redirect off;