aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rwxr-xr-xscripts/purge-except-git.sh31
2 files changed, 33 insertions, 4 deletions
diff --git a/README.md b/README.md
index 9ab192f8..f191da3e 100644
--- a/README.md
+++ b/README.md
@@ -23,11 +23,9 @@ This repository contains the code for the backend API server which is implemente
cp -rf sampleconfig ./config
cp .env.sample .env
cp fx.sample fx
- mkdir mysql
- cp db/schema.sql mysql/
cp sample.override.yml docker-compose.override.yml
docker-compose up -d --force-recreate maria
- docker exec -i mariadb mysql -u root -ppassword < mysql/schema.sql
+ docker exec -i mariadb mysql -u root -ppassword < db/schema.sql
docker-compose up
Note the last step will take some time on first run as it will download the aforementioned docker images.
@@ -36,7 +34,7 @@ After successful creation of all docker containers coinos will be available at h
To shutdown coinos and all of its containers/services, run `docker-compose down` again.
-At anypoint to purge the database and start with a new one run `rm -rf mysql` and then `mkdir mysql` and then the same steps following from that point as outlined above.
+At anypoint to purge the database and start with a new one run `rm -rf mysql` and then `mkdir mysql` and then the same steps following from that point as outlined above. Or run `purge-except-git.sh` from `./scripts`
To review a log of individual containers use `docker-compose app` or `docker-compose maria` etc; container names are available in `docker-compose.yml` or via `docker-compose ps` when they are running. `docker images` will show you a list of the images installed on your system and `docker image rm [IMAGE ID]` removes them.
diff --git a/scripts/purge-except-git.sh b/scripts/purge-except-git.sh
new file mode 100755
index 00000000..066b082f
--- /dev/null
+++ b/scripts/purge-except-git.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+# purge coinos-ui and coinos-server
+# ie- fresh install/clean working dirs but without the clone -
+# useful for local dev when you have stashed changes or branches
+# you don't want to destroy
+
+# start script from coinos-server/scripts ie:
+# $ cd /var/node/coinos-server/scripts
+# $ ./purge-except-git.sh
+
+# you may have to run it with sudo to remove the directories created by docker
+
+# and now the script will move up a dir and do its thing:
+cd ../
+
+# if you have docker-compose process running
+docker-compose down
+
+#purge:
+rm -rf config
+rm -rf mysql
+rm -rf node_modules
+rm .env
+rm fx
+rm docker-compose.override.yml
+
+#also on ui:
+cd ../coinos-ui
+rm -rf node_modules
+
+# (and then follow instructions in root README to rebuild/install)