Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/dashmate/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ services:
command:
- dashd
stop_grace_period: 30s
environment:
# Solving issue under WSL when after restart container volume is not being mounted properly
# https://github.com/docker/for-win/issues/4812
# Following fix forces container recreation
- WSL2_FIX=${WSL2_FIX:-0}

volumes:
core_data:
Expand Down
1 change: 1 addition & 0 deletions packages/dashmate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"enquirer": "^2.3.6",
"glob": "^7.1.6",
"hasbin": "^1.2.3",
"is-wsl": "2.2.0",
"jayson": "^3.3.4",
"listr2": "3.5.0",
"lodash": "^4.17.21",
Expand Down
9 changes: 9 additions & 0 deletions packages/dashmate/src/docker/DockerCompose.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const path = require('path');
const { Observable } = require('rxjs');

const isWsl = require('is-wsl');

const dockerCompose = require('@dashevo/docker-compose');

const hasbin = require('hasbin');
Expand Down Expand Up @@ -401,6 +403,13 @@ class DockerCompose {
DASHMATE_HOME_DIR: HOME_DIR_PATH,
};

if (isWsl) {
// Solving issue under WSL when after restart container volume is not being mounted properly
// https://github.com/docker/for-win/issues/4812
// Following fix forces container recreation
env.WSL2_FIX = (new Date()).getTime();
}

return {
cwd: path.join(__dirname, '..', '..'),
env,
Expand Down
3 changes: 2 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5750,6 +5750,7 @@ __metadata:
glob: ^7.1.6
globby: ^11
hasbin: ^1.2.3
is-wsl: 2.2.0
jayson: ^3.3.4
listr2: 3.5.0
lodash: ^4.17.21
Expand Down Expand Up @@ -8567,7 +8568,7 @@ fsevents@~2.3.2:
languageName: node
linkType: hard

"is-wsl@npm:^2.2.0":
"is-wsl@npm:2.2.0, is-wsl@npm:^2.2.0":
version: 2.2.0
resolution: "is-wsl@npm:2.2.0"
dependencies:
Expand Down