File tree Expand file tree Collapse file tree 5 files changed +105
-5
lines changed Expand file tree Collapse file tree 5 files changed +105
-5
lines changed File renamed without changes.
Original file line number Diff line number Diff line change
1
+ ARG JEKYLL_BASEURL=''
2
+
3
+ # ###################################
4
+
5
+ FROM alpine:3.7 as builder
6
+
7
+ ENV LANGUAGE en_US.UTF-8
8
+ ENV LANG en_US.UTF-8
9
+ ENV LC_ALL en_US.UTF-8
10
+
11
+ ENV BUILD_PACKAGES \
12
+ ruby \
13
+ ruby-dev \
14
+ ruby-rdoc \
15
+ ruby-irb \
16
+ gcc \
17
+ make \
18
+ libc-dev \
19
+ libffi-dev \
20
+ build-base
21
+
22
+ RUN apk add --no-cache $BUILD_PACKAGES \
23
+ && gem install bundle
24
+
25
+ WORKDIR /jekyll
26
+ ADD . /jekyll
27
+ RUN bundle install
28
+
29
+ ARG JEKYLL_BASEURL
30
+ RUN jekyll build --baseurl $JEKYLL_BASEURL
31
+
32
+ # ###################################
33
+
34
+ FROM nginx:alpine
35
+
36
+ ARG JEKYLL_BASEURL
37
+ COPY --from=builder /jekyll/_site /usr/share/nginx/html/$JEKYLL_BASEURL
38
+ COPY nginx.conf /etc/nginx/nginx.conf
39
+
40
+ EXPOSE 80
Original file line number Diff line number Diff line change 37
37
jekyll (~> 3.3 )
38
38
jekyll-sitemap (1.2.0 )
39
39
jekyll (~> 3.3 )
40
- jekyll-watch (2.0.0 )
40
+ jekyll-watch (2.1.1 )
41
41
listen (~> 3.0 )
42
42
kramdown (1.17.0 )
43
- liquid (4.0.0 )
43
+ liquid (4.0.1 )
44
44
listen (3.1.5 )
45
45
rb-fsevent (~> 0.9 , >= 0.9.4 )
46
46
rb-inotify (~> 0.9 , >= 0.9.7 )
52
52
rb-fsevent (0.10.3 )
53
53
rb-inotify (0.9.10 )
54
54
ffi (>= 0.5.0 , < 2 )
55
- rouge (3.2.1 )
55
+ rouge (3.3.0 )
56
56
ruby_dep (1.5.0 )
57
57
safe_yaml (1.0.4 )
58
58
sass (3.6.0 )
@@ -73,7 +73,7 @@ DEPENDENCIES
73
73
tzinfo-data
74
74
75
75
RUBY VERSION
76
- ruby 2.5.1p57
76
+ ruby 2.3.7p456
77
77
78
78
BUNDLED WITH
79
- 1.16.5
79
+ 1.16.2
Original file line number Diff line number Diff line change @@ -18,6 +18,23 @@ cd jekyll-doc-theme
18
18
bundle exec jekyll serve
19
19
```
20
20
21
+ ## Docker
22
+
23
+ Alternatively, you can deploy it using the multi-stage [ Dockerfile] ( Dockerfile )
24
+ that serves files from Nginx for better performance in production.
25
+
26
+ Build the image for your site's ` JEKYLL_BASEURL ` :
27
+
28
+ ```
29
+ docker build --build-arg JEKYLL_BASEURL="/" -t jekyll-doc-theme .
30
+ ```
31
+
32
+ and serve it:
33
+
34
+ ```
35
+ docker run -p 8080:80 jekyll-doc-theme
36
+ ```
37
+
21
38
## License
22
39
23
40
Released under [ the MIT license] ( LICENSE ) .
Original file line number Diff line number Diff line change
1
+ user nginx;
2
+ worker_processes 1 ;
3
+
4
+
5
+ error_log /dev/stderr warn ;
6
+ pid /var/run/nginx.pid;
7
+
8
+
9
+ events
10
+ {
11
+ worker_connections 1024 ;
12
+ }
13
+
14
+
15
+ http
16
+ {
17
+ include /etc/nginx/mime.types;
18
+ default_type application/octet-stream;
19
+
20
+ log_format main '$remote_addr - $remote_user [$time_local ] "$request " '
21
+ '$status $body_bytes_sent "$http_referer " '
22
+ '"$http_user_agent " "$http_x_forwarded_for "' ;
23
+
24
+ access_log /dev/stdout;
25
+
26
+ sendfile off ;
27
+ # tcp_nopush on;
28
+
29
+ keepalive_timeout 65 ;
30
+
31
+ gzip on ;
32
+
33
+ # serve static files
34
+ server
35
+ {
36
+
37
+ location /
38
+ {
39
+
40
+ root /usr/share/nginx/html;
41
+ }
42
+ }
43
+ }
You can’t perform that action at this time.
0 commit comments