forked from blockscout/frontend
-
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.
Optimize of the workflow. Optimize nginx container usage
- Loading branch information
1 parent
9c9a4d4
commit 4913840
Showing
7 changed files
with
20 additions
and
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,20 +11,18 @@ jobs: | |
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Create Image Tarball for explorer-frontend | ||
run: | | ||
docker build --build-arg GIT_COMMIT_SHA=$(git rev-parse --short HEAD) --build-arg GIT_TAG=$(git describe --tags --abbrev=0) -t explorer-frontend . | ||
docker save -o explorer-frontend.tar explorer-frontend | ||
mkdir -p artifacts | ||
mv explorer-frontend.tar artifacts/ | ||
docker build --build-arg GIT_COMMIT_SHA=$(git rev-parse --short HEAD) --build-arg GIT_TAG=$(git describe --tags --abbrev=0) --tag explorer-frontend . | ||
docker save --output artifacts/explorer-frontend.tar explorer-frontend | ||
- name: Create Image Tarball for nginx | ||
run: | | ||
docker build --build-arg GIT_COMMIT_SHA=$(git rev-parse --short HEAD) --build-arg GIT_TAG=$(git describe --tags --abbrev=0) -t nginx-explorer nginx-docker/ | ||
docker save -o nginx-explorer.tar nginx-explorer | ||
mv nginx-explorer.tar artifacts/ | ||
docker build --tag nginx-explorer docker/nginx | ||
docker save --output artifacts/nginx-explorer.tar nginx-explorer | ||
- name: Set up SSH | ||
run: | | ||
|
@@ -40,7 +38,6 @@ jobs: | |
scp -r artifacts/* ${{ secrets.HOST_USER}}@${{ secrets.EXPLORER_HOST }}:/blockscout/ | ||
scp -r deploy/* ${{ secrets.HOST_USER}}@${{ secrets.EXPLORER_HOST }}:/blockscout/ | ||
- name: SSH into Server and Deploy | ||
uses: appleboy/[email protected] | ||
with: | ||
|
@@ -49,8 +46,8 @@ jobs: | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
script: | | ||
cd /blockscout | ||
docker load -i explorer-frontend.tar | ||
docker load -i nginx-explorer.tar | ||
docker load --input explorer-frontend.tar | ||
docker load --input nginx-explorer.tar | ||
docker compose down | ||
docker compose pull | ||
docker compose up -d --build --remove-orphans | ||
docker compose up --detach --build --remove-orphans |
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 |
---|---|---|
|
@@ -19,5 +19,4 @@ services: | |
- 443:443 | ||
- 8080:8080 | ||
- 8081:8081 | ||
command: /bin/sh -c "/check_ssl.sh & nginx -g 'daemon off;'" | ||
|
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,11 @@ | ||
FROM nginx:stable-alpine | ||
|
||
COPY check_ssl.sh / | ||
|
||
ENTRYPOINT ["/bin/sh", "-c"] | ||
|
||
EXPOSE 80 | ||
|
||
STOPSIGNAL SIGQUIT | ||
|
||
CMD ["/check_ssl.sh & exec /docker-entrypoint.sh nginx -g 'daemon off;'"] |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.