Skip to content

Commit 64e5b4f

Browse files
authored
Merge pull request #38 from YSSofer/yaniv/nginx-proxy-conf
feat: add ability to specify nginx_proxy.conf file
2 parents 6ac6c92 + de40681 commit 64e5b4f

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/commitlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/checkout@master
10+
- uses: actions/checkout@v1
1111
- run: npm install --no-save
1212
- run:
1313
npm run lint:commit -- --from="origin/${{ github.base_ref }}"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@master
13+
- uses: actions/checkout@v1
1414

1515
- uses: actions/setup-node@v1
1616
with:

.github/workflows/validate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
node: [12.x]
1515

1616
steps:
17-
- uses: actions/checkout@master
17+
- uses: actions/checkout@v1
1818

1919
- uses: actions/setup-node@v1
2020
with:

src/containers/proxyConfig.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import { homedir } from 'os';
22
import { resolve } from 'path';
3+
import fs from 'fs';
4+
5+
const nginxProxyPath = resolve(homedir(), '.dotdocker/nginx_proxy.conf');
6+
const nginxProxyBindings = fs.existsSync(nginxProxyPath)
7+
? [`${nginxProxyPath}:/etc/nginx/conf.d/nginx_proxy.conf:ro`]
8+
: [];
39

410
export default {
511
Image: 'codekitchen/dinghy-http-proxy:latest',
@@ -14,6 +20,7 @@ export default {
1420
Binds: [
1521
'/var/run/docker.sock:/tmp/docker.sock:ro',
1622
`${resolve(homedir(), '.dotdocker/certs')}:/etc/nginx/certs:ro`,
23+
...nginxProxyBindings,
1724
],
1825
PortBindings: {
1926
'19322/udp': [

0 commit comments

Comments
 (0)