Skip to content

Commit eeda108

Browse files
committed
added Dockerfiles
1 parent 4b5ecc8 commit eeda108

File tree

3 files changed

+44
-12
lines changed

3 files changed

+44
-12
lines changed

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM alpine:3.20
2+
3+
RUN apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community "hugo=~v0.134.2"
4+
5+
RUN apk add --no-cache vim bash
6+
7+
WORKDIR /root/src
8+
9+
CMD ["hugo", "server"]

docker-compose.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: "3"
2+
3+
services:
4+
hugo:
5+
build: .
6+
tty: true
7+
network_mode: "host"
8+
volumes:
9+
- .:/root/src

readme.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,24 @@ To see the website locally, run
99
```
1010
hugo server
1111
```
12-
and navigate to the url, usually `http://localhost:1313/`.
12+
and navigate to the url, usually `http://localhost:1313/`.
1313

14-
After the changes have been made, commit them onto a new branch, and create a PR to merge the content into `main`.
15-
The github workflows will automatically deploy the new version of the website.
14+
After the changes have been made, commit them onto a new branch, and create a PR to merge the content into `main`.
15+
The github workflows will automatically deploy the new version of the website.
16+
17+
## Docker
18+
19+
You can also use the dockerfiles here to do this. Simply run
20+
```
21+
docker compose build
22+
```
23+
to build the image, and then to run the container
24+
```
25+
docker compose up -d
26+
docker exec -it dasc-labgithubio-hugo-1 hugo server
27+
```
28+
29+
This should print the location where the web server is available, and you can open it in a browser. Updates made to the local repo should automatically get rendered.
1630

1731
## Adding Content
1832

@@ -23,31 +37,31 @@ To add a new person, starting from the root directory, run
2337
```
2438
hugo new content people/id.md
2539
```
26-
where `id` must be replaced by the id you want to create.
40+
where `id` must be replaced by the id you want to create.
2741

2842
Navigate to `/content/people/id.md` and edit the front matter.
29-
After the front matter, you can add more details. These will be rendered on `dasc-lab.github.io/people/id` page.
43+
After the front matter, you can add more details. These will be rendered on `dasc-lab.github.io/people/id` page.
3044

3145
### Adding a paper
3246

33-
Similarly, to add a paper, run
47+
Similarly, to add a paper, run
3448
```
3549
hugo new content papers/id.md
3650
```
37-
and then edit `/contents/papers/id.md`. Again, you can add more info after the front matter, to have it render on the individual page.
51+
and then edit `/contents/papers/id.md`. Again, you can add more info after the front matter, to have it render on the individual page.
3852

39-
If you link the author id correctly, each author's page will be automatically updated to include all the papers too.
53+
If you link the author id correctly, each author's page will be automatically updated to include all the papers too.
4054

4155
## Styles and Layout
4256

43-
This website uses boostrap https://getbootstrap.com/ v5.3.3 to create styles.
57+
This website uses boostrap https://getbootstrap.com/ v5.3.3 to create styles.
4458

45-
To customize additional css, edit `/layouts/partials/style.html`.
46-
To customize how the `person` and `papers` render, edit `/layouts/partials/person-card` or `/layouts/partials/paper-card`.
59+
To customize additional css, edit `/layouts/partials/style.html`.
60+
To customize how the `person` and `papers` render, edit `/layouts/partials/person-card` or `/layouts/partials/paper-card`.
4761

4862

4963
## TODO
50-
- add search functionality
64+
- add search functionality
5165
- add projects
5266
- add news
5367
- fix homepage

0 commit comments

Comments
 (0)