Skip to content

Commit 1c6de77

Browse files
committed
Add ENV
1 parent 36a0716 commit 1c6de77

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
APP_PORT=4000
2+
WATCH_PORT=35729
3+
CONFIG="_config.yml"

docker-compose.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,8 @@ services:
77
context: .
88
dockerfile: Dockerfile
99
ports:
10-
- '4000:4000'
11-
- '35729:35729'
10+
- '${APP_PORT}:4000'
11+
- '${WATCH_PORT}:35729'
1212
volumes:
1313
- .:/srv/jekyll
14-
command:
15-
[
16-
'bundle',
17-
'exec',
18-
'jekyll',
19-
'serve',
20-
'--force_polling',
21-
'--host',
22-
'0.0.0.0',
23-
'--port',
24-
'4000',
25-
'--config',
26-
'_config.yml,_config_development.yml',
27-
'--livereload',
28-
]
14+
command: bundle exec jekyll serve --force_polling --host 0.0.0.0 --port 4000 --config ${CONFIG:-'_config.yml,_config_development.yml'} --livereload

0 commit comments

Comments
 (0)