Skip to content

Commit 995f6e4

Browse files
Add docker setup
1 parent 9352dd2 commit 995f6e4

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:23.6-alpine3.20
2+
3+
COPY package.json .
4+
COPY package-lock.json .
5+
6+
RUN npm i
7+
8+
WORKDIR /src
9+
10+
ENTRYPOINT ["npx", "tailwindcss", "-i", "./static/css/input.css", "-o", "./static/dist/output.css", "--watch", "--verbose"]

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ CI/CD will push a built copy onto branch `production`, which is what is running
66
the actual website.
77

88
## Developing
9-
First install `npm`, `git` and `Hugo`. Then, to install tailwind, run
9+
First [install `git`](https://git-scm.com/downloads) and clone the repository:
1010
```
11-
npm install
11+
git clone https://github.com/tjphysicsteam/physicsteam-website
1212
```
13-
To start working on the site, run the following commands in two different terminals:
14-
13+
After that, [install Docker compose](https://docs.docker.com/compose/install/). To build
14+
the dependencies, run
15+
```
16+
docker compose build
17+
```
18+
Finally, to start working on the site run
1519
```
16-
npx tailwindcss -i ./static/css/input.css -o ./static/dist/output.css --watch
17-
hugo server -D
20+
docker compose up
1821
```
22+
and visit http://127.0.0.1:1313/

compose.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
services:
2+
hugo:
3+
image: hugomods/hugo:std-base-0.141.0
4+
command: server -D
5+
volumes:
6+
- .:/src
7+
ports:
8+
- 1313:1313
9+
10+
tailwind:
11+
build: .
12+
tty: true
13+
volumes:
14+
- .:/src

0 commit comments

Comments
 (0)