Skip to content
This repository was archived by the owner on Nov 23, 2022. It is now read-only.

Commit 4e0fea9

Browse files
committed
Merge branch 'develop', prepare 0.21.0
2 parents d926aed + cf882bd commit 4e0fea9

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Currently it contains list of users for basic auth, debug and letsencrypt settin
6969
debug: false # whether debug mode is enabled, default "false"
7070
letsencrypt: false # whether to enable letsencrypt, default "false"
7171
letsencryptEmail: your@email.com # email used for letsencrypt
72+
compress: true # whether to apply gzip compression, default "true"
7273
baseDomain: false # base domain to use for deployments without domains specified, default "false"
7374
publicKeysPath: '/path/to/your/public/keys' # path to folder with authorized_keys, default "~/.ssh"
7475
```

src/config/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const defaultConfig = {
3131
debug: false,
3232
letsencrypt: false,
3333
letsencryptEmail: 'admin@domain.com',
34+
compress: true,
3435
baseDomain: false,
3536
publicKeysPath,
3637
};

src/docker/init.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,20 +104,25 @@ exports.initDocker = async () => {
104104
`--acme.email=${config.letsencryptEmail}`,
105105
'--acme.storage=/var/acme/acme.json',
106106
'--acme.entrypoint=https',
107-
'--acme.ondemand=true',
108107
'--acme.onhostrule=true',
109108
'--accesslogsfile=/var/acme/access.log',
110-
'--entryPoints=Name:https Address::443 TLS',
111-
'--entryPoints=Name:http Address::80 Redirect.EntryPoint:https',
112-
'--defaultEntryPoints=http,https',
109+
`--entryPoints=Name:https Address::443 TLS ${config.compress ? 'Compress:on' : 'Compress:off'}`,
110+
`--entryPoints=Name:http Address::80 Redirect.EntryPoint:https ${config.compress ? 'Compress:on' : 'Compress:off'}`,
111+
'--defaultEntryPoints=https,http',
112+
];
113+
114+
// entrypoints without letsencrypt
115+
const entrypoints = [
116+
`--entryPoints=Name:http Address::80 ${config.compress ? 'Compress:on' : 'Compress:off'}`,
117+
'--defaultEntryPoints=http',
113118
];
114119

115120
// construct command
116121
const Cmd = [
117122
'-c',
118123
'/dev/null',
119124
'--docker',
120-
...(config.letsencrypt ? letsencrypt : []),
125+
...(config.letsencrypt ? letsencrypt : entrypoints),
121126
...(config.debug ? debug : []),
122127
];
123128

0 commit comments

Comments
 (0)