Skip to content

Commit

Permalink
🏗️ Dockerfile + docker-compose.yaml build/running
Browse files Browse the repository at this point in the history
Add Dockerfile for building with the latest and the docker-compose,
building the site and running.

$ docker-compose up
Starting docsy-example_site_1 ... done
Attaching to docsy-example_site_1
site_1  | Start building sites …
site_1  |
site_1  |                    | FA | NO | EN
site_1  | -------------------+----+----+-----
site_1  |   Pages            | 18 | 76 | 46
site_1  |   Paginator pages  |  0 |  0 |  0
site_1  |   Non-page files   |  3 |  1 |  3
site_1  |   Static files     | 38 | 38 | 38
site_1  |   Processed images |  8 |  2 |  7
site_1  |   Aliases          |  3 |  0 |  3
site_1  |   Sitemaps         |  2 |  1 |  1
site_1  |   Cleaned          |  0 |  0 |  0
site_1  |
site_1  | Built in 837 ms
site_1  | Watching for changes in /src/{assets,content,layouts,package.json,themes}
site_1  | Watching for config changes in /src/config.toml, /src/themes/docsy/config.toml
site_1  | Environment: "DEV"
site_1  | Serving pages from memory
site_1  | Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
site_1  | Web Server is available at //localhost:1313/ (bind address 0.0.0.0)
site_1  | Press Ctrl+C to stop

Open a new terminal and test it

$ curl -X HEAD -i localhost:1313
Warning: Setting custom HTTP method to HEAD with -X/--request may not work the
Warning: way you want. Consider using -I/--head instead.
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 27590
Content-Type: text/html; charset=utf-8
Last-Modified: Thu, 17 Dec 2020 08:47:13 GMT
Date: Thu, 17 Dec 2020 08:47:25 GMT
  • Loading branch information
Marcello de Sales committed Dec 17, 2020
1 parent e46e165 commit bd80f02
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM klakegg/hugo:0.78.2-asciidoctor

RUN apk add git
8 changes: 0 additions & 8 deletions dev.Dockerfile

This file was deleted.

13 changes: 13 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "3.3"

services:

site:
image: servicenow/github-pages-hugo
build:
context: .
command: server
ports:
- "1313:1313"
volumes:
- .:/src

0 comments on commit bd80f02

Please sign in to comment.