aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-06-09 18:55:30 +0000
committerFuwn <[email protected]>2021-06-09 18:55:30 +0000
commita496a3b2c791b3f3f5adc7417eb9de14716f5f7c (patch)
tree6faacf2ef3856eee0647be531cdd2e6c7cd75d06
parentfeat(cli): create `.whirl` directory and log (diff)
downloadwhirl-a496a3b2c791b3f3f5adc7417eb9de14716f5f7c.tar.xz
whirl-a496a3b2c791b3f3f5adc7417eb9de14716f5f7c.zip
feat(docker): expose .whirl directory to host as a volume
Previously, Whirl would grab the default configuration data from the the `Default` trait of `Config`, this means that the configuration of a Docker container could not be modified. As well, the database would be reset upon the restart of the Docker container... This solution introduces a shared Volume directory with the label `.whirl-data` which acts as a means of persistant data storage for Whirl.
-rw-r--r--.gitignore3
-rw-r--r--docker-compose.yml2
-rw-r--r--docker.nix4
3 files changed, 7 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 8d69777..41a7938 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,6 @@ result*
# NPM
/node_modules/
+
+# Docker
+/.whirl-data/
diff --git a/docker-compose.yml b/docker-compose.yml
index 0ff6de5..214dcf8 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -7,3 +7,5 @@ services:
- '5673:5673'
container_name: Whirlsplash
image: whirlsplash/whirl
+ volumes:
+ - ./.whirl-data:/.whirl
diff --git a/docker.nix b/docker.nix
index 7e92487..8db3607 100644
--- a/docker.nix
+++ b/docker.nix
@@ -34,8 +34,8 @@ let
WorkingDir = "/";
Env = [
"DATABASE_URl=.whirl/db.sqlite3"
- "DISABLE_PROMPT=true"
- "LOG_FILE=false"
+ # "DISABLE_PROMPT=true"
+ # "LOG_FILE=false"
];
ExposedPorts = {
"80/tcp" = { }; # API