diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a54478cf3c5fe7abb3534d49e997646110137754..53fc91e207b6922d76df985f0a769404f078b890 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ stages: - stop - uninstall - remove + - removeall build-explorer: stage: build @@ -20,6 +21,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 +37,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 +54,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 +70,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 +86,8 @@ uninstall-explorer: - chmod +x setenv && . setenv script: - deploy/uninstall + after_script: + - cp -Rf ../${CI_PROJECT_NAME}.tmp/* ./env_file/ remove-explorer: stage: remove @@ -86,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: @@ -105,3 +130,5 @@ status-explorer: - chmod +x ./setenv && . setenv script: - console/status + after_script: + - cp -Rf ../${CI_PROJECT_NAME}.tmp/* ./env_file/ diff --git a/README.md b/README.md index 11b272dbab9924604ee8d65c9d775079f577e7e6..7f2b5f67b26f3b2e75cacfcaf9f95b0f43ee1a0d 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 diff --git a/deploy/help b/deploy/help index ef1e174418558a4fe0742d20c4810c338765b635..12e1cd66ccb8d0e43463da0d4d6e3077ae539bd0 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 8691e284eb7fdabcea673ea0cfb25fde17adad97..aaeaa73cb82d7f128868a566fe86b6726f909da1 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 0000000000000000000000000000000000000000..8691e284eb7fdabcea673ea0cfb25fde17adad97 --- /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/env_file/SERVER_CONF b/env_file/SERVER_CONF index 3203551291b4ac823a1ad04255a813453f763df2..53d8b5e7e67d71a489879e18842a26c0b0196497 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' diff --git a/setenv b/setenv index 2e8d44bd9f08c497a799ce7cfe64d18446c04ef4..d118747f86bb3fea3f5f98ed05a8501c33376fd2 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