From 5073330a43954cca6b9c8e7f33fc8ed23446f707 Mon Sep 17 00:00:00 2001 From: TonyFord Date: Mon, 26 Apr 2021 08:23:05 +0200 Subject: [PATCH 1/4] add image folder --- env_file/SERVER_CONF | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/env_file/SERVER_CONF b/env_file/SERVER_CONF index 3203551..53d8b5e 100644 --- a/env_file/SERVER_CONF +++ b/env_file/SERVER_CONF @@ -25,3 +25,7 @@ tools.staticdir.dir = '/home/faircoin/explorer/assets/fonts' [/js] tools.staticdir.on = True tools.staticdir.dir = '/home/faircoin/explorer/assets/js' + +[/image] +tools.staticdir.on = True +tools.staticdir.dir = '/home/faircoin/explorer/assets/image' -- GitLab From 418c726e987f050172db5f94853a8cba624e60a5 Mon Sep 17 00:00:00 2001 From: TonyFord Date: Mon, 26 Apr 2021 08:24:00 +0200 Subject: [PATCH 2/4] copy env files to env_file folder for manual deploy. --- .gitlab-ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a54478c..e2be229 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,6 +20,8 @@ build-explorer: - chmod +x setenv && . setenv script: - deploy/build + after_script: + - cp -Rf ../${CI_PROJECT_NAME}.tmp/* ./env_file/ init-explorer: stage: init @@ -34,6 +36,8 @@ init-explorer: - chmod +x setenv && . setenv script: - deploy/init + after_script: + - cp -Rf ../${CI_PROJECT_NAME}.tmp/* ./env_file/ timeout: 10h start-explorer: @@ -49,6 +53,8 @@ start-explorer: - chmod +x setenv && . setenv script: - deploy/start + after_script: + - cp -Rf ../${CI_PROJECT_NAME}.tmp/* ./env_file/ stop-explorer: stage: stop @@ -63,6 +69,8 @@ stop-explorer: - chmod +x setenv && . setenv script: - deploy/stop + after_script: + - cp -Rf ../${CI_PROJECT_NAME}.tmp/* ./env_file/ uninstall-explorer: stage: uninstall @@ -77,6 +85,8 @@ uninstall-explorer: - chmod +x setenv && . setenv script: - deploy/uninstall + after_script: + - cp -Rf ../${CI_PROJECT_NAME}.tmp/* ./env_file/ remove-explorer: stage: remove @@ -105,3 +115,5 @@ status-explorer: - chmod +x ./setenv && . setenv script: - console/status + after_script: + - cp -Rf ../${CI_PROJECT_NAME}.tmp/* ./env_file/ -- GitLab From 25ffcf36b07159838d88ba3c22649770582bcf34 Mon Sep 17 00:00:00 2001 From: TonyFord Date: Mon, 26 Apr 2021 08:31:07 +0200 Subject: [PATCH 3/4] add removeall --- .gitlab-ci.yml | 17 ++++++++++++++++- deploy/help | 3 ++- deploy/remove | 2 +- deploy/removeall | 3 +++ setenv | 1 + 5 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 deploy/removeall diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e2be229..53fc91e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ stages: - stop - uninstall - remove + - removeall build-explorer: stage: build @@ -96,12 +97,26 @@ remove-explorer: refs: - master variables: - - $CMD =~ /remove/ + - $CMD =~ /^remove$/ before_script: - chmod +x setenv && . setenv script: - deploy/remove +removeall-explorer: + stage: removeall + tags: + - FairCoin.Co + only: + refs: + - master + variables: + - $CMD =~ /^removeall$/ + before_script: + - chmod +x setenv && . setenv + script: + - deploy/removeall + status-explorer: stage: status tags: diff --git a/deploy/help b/deploy/help index ef1e174..12e1cd6 100755 --- a/deploy/help +++ b/deploy/help @@ -5,5 +5,6 @@ echo -e "deploy/start \t\t( start container )" echo -e "deploy/stop \t\t( stop container )" echo -e "deploy/install \t( run steps build + start + new_ssl )" echo -e "deploy/uninstall \t( stop and remove container, named volumes will NOT removed )" -echo -e "deploy/remove \t\t( stop and remove container and images, named volumes WILL REMOVED )" +echo -e "deploy/remove \t\t( stop and remove container, named volumes WILL REMOVED )" +echo -e "deploy/removeall \t\t( stop and remove container and images, named volumes WILL REMOVED )" echo "" diff --git a/deploy/remove b/deploy/remove index 8691e28..aaeaa73 100755 --- a/deploy/remove +++ b/deploy/remove @@ -1,3 +1,3 @@ #!/bin/bash docker-compose stop -docker-compose down -v --rmi all --remove-orphans +docker-compose down -v --remove-orphans diff --git a/deploy/removeall b/deploy/removeall new file mode 100644 index 0000000..8691e28 --- /dev/null +++ b/deploy/removeall @@ -0,0 +1,3 @@ +#!/bin/bash +docker-compose stop +docker-compose down -v --rmi all --remove-orphans diff --git a/setenv b/setenv index 2e8d44b..d118747 100644 --- a/setenv +++ b/setenv @@ -53,4 +53,5 @@ chmod +x deploy/stop chmod +x deploy/install chmod +x deploy/uninstall chmod +x deploy/remove +chmod +x deploy/removeall chmod +x deploy/help -- GitLab From a3f83e254c8fa436e568c155cd7db6544f266f62 Mon Sep 17 00:00:00 2001 From: TonyFord Date: Mon, 26 Apr 2021 08:33:56 +0200 Subject: [PATCH 4/4] remove MYSQL_DATABASE_PORT and add removeall to README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 11b272d..7f2b5f6 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ FAIRCHAINS_CONF # conf file to run the faircoind or fairchains daemon #### env vars ########################################################################### MYSQL_USER # mysql user ( used to run the explorer ) MYSQL_PASSWORD # mysql user password -MYSQL_DATABASE_PORT # mysql database port ( default 3306 ) MYSQL_ROOT_PASSWORD # mysql root user password ( used to admin the database ) LH_PORT_explorer # port running explorer by localhost ( default 8222 / use nginx proxy to make it available by remote ) @@ -36,6 +35,7 @@ stop # stop container install # runs build, init, start stages uninstall # remove container without to delete the data remove # remove all data +removeall # remove all data and docker images ~~~ ### by SSH access ( manually without gitlab-runner ) @@ -58,6 +58,7 @@ deploy/stop deploy/install deploy/uninstall deploy/remove +deploy/removeall ~~~ #### Troubleshooting -- GitLab