Skip to content

Commit 5b3ee60

Browse files
authored
removed: NFS setting (#190)
* removed: NFS setting * nolog: fix test * nolog: fix lint
1 parent b308e46 commit 5b3ee60

File tree

6 files changed

+82
-101
lines changed

6 files changed

+82
-101
lines changed

README.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -80,24 +80,6 @@ to other developers. An example would be if you want to use a different PHP vers
8080
#### Custom Services
8181
→ see [📚 in-depth docs about custom service container](docs/services.md).
8282

83-
#### Using NFS Mount for Host Volume
84-
85-
On macOS or Windows, you may instruct ssdev to mount the host directory via NFS. In the past, this has worked
86-
well for improving performance, but with the addition of new and faster file-sharing implementations,
87-
this has become a legacy feature and has been disabled by default in version `1.3.0`.
88-
89-
If you want to re-enable it, simply add the `--use-nfs` flag or add the following to your config:
90-
```json
91-
{
92-
"ssdev": {
93-
"use-nfs": true
94-
}
95-
}
96-
```
97-
98-
99-
→ see [📚 Configuring NFS on macOS](docs/nfs/macos.md).
100-
10183

10284
## ➕ More Infos
10385
Check out the following for more informations:

cli.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ require('yargs') // eslint-disable-line
3737
description: 'Ports to publish from the database container',
3838
default: ['3306:3306'],
3939
})
40-
.option('use-nfs', {
41-
type: 'boolean',
42-
description: 'flag to enable nfs mount on macOS or Windows systems',
43-
default: false,
44-
})
40+
// .option('use-nfs', {
41+
// type: 'boolean',
42+
// description: 'flag to enable nfs mount on macOS or Windows systems',
43+
// default: false,
44+
// })
4545
// Serve the devenv
4646
.command(
4747
'up',

docker/getRootComposeFile/hostVolumes.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ const os = require('os');
99
*/
1010
function hostVolumes(args) { // eslint-disable-line no-unused-vars
1111
const volumes = {
12-
volumes: [{
13-
type: 'volume',
14-
source: 'host_data',
15-
target: '/var/www/html',
16-
}],
12+
volumes: [
13+
'${PWD}:/var/www/html', // eslint-disable-line no-template-curly-in-string
14+
],
15+
// volumes: [{
16+
// type: 'volume',
17+
// source: 'host_data',
18+
// target: '/var/www/html',
19+
// }],
1720
};
1821
if (os.platform() !== 'darwin' && os.platform() !== 'win32') {
1922
volumes.volumes = [

docker/getRootComposeFile/hostVolumes.test.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ const args = {};
1313
test('contains a default volumes definition', () => {
1414
expect('volumes' in hostVolumes(args)).toBeTruthy();
1515
const volumes = hostVolumes(args).volumes;
16-
expect(volumes).toContainEqual({
17-
type: 'volume',
18-
source: 'host_data',
19-
target: '/var/www/html',
20-
});
16+
expect(volumes).toContainEqual('${PWD}:/var/www/html');
2117
});
2218

2319
test('contains pwd on linux', () => {

docker/getRootComposeFile/volumeDefinition.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const os = require('os');
1+
// const os = require('os');
22

33
/**
44
* getVolumeDefinition - returns the volume definition as needed in the
@@ -12,25 +12,25 @@ const os = require('os');
1212
function getVolumeDefinition(args) { // eslint-disable-line no-unused-vars
1313
const definition = {
1414
db_data: null,
15-
host_data: {
16-
driver: 'local',
17-
driver_opts: {
18-
type: 'none',
19-
o: 'bind',
20-
device: '${PWD}', // eslint-disable-line no-template-curly-in-string
21-
},
22-
},
15+
// host_data: {
16+
// driver: 'local',
17+
// driver_opts: {
18+
// type: 'none',
19+
// o: 'bind',
20+
// device: '${PWD}', // eslint-disable-line no-template-curly-in-string
21+
// },
22+
// },
23+
// };
24+
// if (args['use-nfs'] && (os.platform() === 'darwin' || os.platform() === 'win32')) {
25+
// definition.host_data = {
26+
// driver: 'local',
27+
// driver_opts: {
28+
// type: 'nfs',
29+
// o: 'addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3',
30+
// device: ':${PWD}', // eslint-disable-line no-template-curly-in-string
31+
// },
32+
// };
2333
};
24-
if (args['use-nfs'] && (os.platform() === 'darwin' || os.platform() === 'win32')) {
25-
definition.host_data = {
26-
driver: 'local',
27-
driver_opts: {
28-
type: 'nfs',
29-
o: 'addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3',
30-
device: ':${PWD}', // eslint-disable-line no-template-curly-in-string
31-
},
32-
};
33-
}
3434
return { volumes: definition };
3535
}
3636

docker/getRootComposeFile/volumeDefinition.test.js

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -16,58 +16,58 @@ test('contains a default volumes definition', () => {
1616
expect('db_data' in definition).toBeTruthy();
1717
expect(definition.db_data).toBeNull();
1818

19-
expect('host_data' in definition).toBeTruthy();
19+
// expect('host_data' in definition).toBeTruthy();
2020
});
2121

22-
test('contains a default mount for all systems by default', () => {
23-
os.platform.mockReturnValue('linux');
24-
const linuxDefinition = volumeDefinition(args).volumes.host_data;
25-
expect(linuxDefinition.driver).toBe('local');
26-
expect(linuxDefinition.driver_opts).toEqual({
27-
type: 'none',
28-
o: 'bind',
29-
device: '${PWD}',
30-
});
22+
// test('contains a default mount for all systems by default', () => {
23+
// os.platform.mockReturnValue('linux');
24+
// const linuxDefinition = volumeDefinition(args).volumes.host_data;
25+
// expect(linuxDefinition.driver).toBe('local');
26+
// expect(linuxDefinition.driver_opts).toEqual({
27+
// type: 'none',
28+
// o: 'bind',
29+
// device: '${PWD}',
30+
// });
3131

32-
os.platform.mockReturnValue('win32');
33-
const winDefinition = volumeDefinition(args).volumes.host_data;
34-
expect(winDefinition.driver).toBe('local');
35-
expect(winDefinition.driver_opts).toEqual({
36-
type: 'none',
37-
o: 'bind',
38-
device: '${PWD}',
39-
});
32+
// os.platform.mockReturnValue('win32');
33+
// const winDefinition = volumeDefinition(args).volumes.host_data;
34+
// expect(winDefinition.driver).toBe('local');
35+
// expect(winDefinition.driver_opts).toEqual({
36+
// type: 'none',
37+
// o: 'bind',
38+
// device: '${PWD}',
39+
// });
4040

41-
os.platform.mockReturnValue('darwin');
42-
const darwinDefinition = volumeDefinition(args).volumes.host_data;
43-
expect(darwinDefinition.driver).toBe('local');
44-
expect(darwinDefinition.driver_opts).toEqual({
45-
type: 'none',
46-
o: 'bind',
47-
device: '${PWD}',
48-
});
49-
});
41+
// os.platform.mockReturnValue('darwin');
42+
// const darwinDefinition = volumeDefinition(args).volumes.host_data;
43+
// expect(darwinDefinition.driver).toBe('local');
44+
// expect(darwinDefinition.driver_opts).toEqual({
45+
// type: 'none',
46+
// o: 'bind',
47+
// device: '${PWD}',
48+
// });
49+
// });
5050

51-
test('correctly handles nfs on windows or macOS', () => {
52-
os.platform.mockReturnValue('win32');
53-
var definition = volumeDefinition({
54-
'use-nfs': true,
55-
}).volumes.host_data;
56-
expect(definition.driver).toBe('local');
57-
expect(definition.driver_opts).toEqual({
58-
type: 'nfs',
59-
o: 'addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3',
60-
device: ':${PWD}',
61-
});
51+
// test('correctly handles nfs on windows or macOS', () => {
52+
// os.platform.mockReturnValue('win32');
53+
// var definition = volumeDefinition({
54+
// 'use-nfs': true,
55+
// }).volumes.host_data;
56+
// expect(definition.driver).toBe('local');
57+
// expect(definition.driver_opts).toEqual({
58+
// type: 'nfs',
59+
// o: 'addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3',
60+
// device: ':${PWD}',
61+
// });
6262

63-
os.platform.mockReturnValue('darwin');
64-
definition = volumeDefinition({
65-
'use-nfs': true,
66-
}).volumes.host_data;
67-
expect(definition.driver).toBe('local');
68-
expect(definition.driver_opts).toEqual({
69-
type: 'nfs',
70-
o: 'addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3',
71-
device: ':${PWD}',
72-
});
73-
});
63+
// os.platform.mockReturnValue('darwin');
64+
// definition = volumeDefinition({
65+
// 'use-nfs': true,
66+
// }).volumes.host_data;
67+
// expect(definition.driver).toBe('local');
68+
// expect(definition.driver_opts).toEqual({
69+
// type: 'nfs',
70+
// o: 'addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3',
71+
// device: ':${PWD}',
72+
// });
73+
// });

0 commit comments

Comments
 (0)