diff options
| author | Ahmed Abdelhalim <[email protected]> | 2023-08-10 15:57:04 +0300 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2023-08-10 15:57:04 +0300 |
| commit | 7cfc751cc84743b8e2bba8c8d614966526dc83a9 (patch) | |
| tree | 373007aa075e2688d75f58560c60d22b8a28b113 | |
| parent | f722d20725586ee4744d077770ef7a89ab05e360 (diff) | |
Update Readme and deploy hugo site
| -rw-r--r-- | .build.yml | 6 | ||||
| -rw-r--r-- | Dockerfile | 16 | ||||
| -rw-r--r-- | README.md | 15 | ||||
| -rw-r--r-- | docker-compose.yml | 2 |
4 files changed, 12 insertions, 27 deletions
@@ -2,14 +2,12 @@ image: alpine/latest oauth: pages.sr.ht/PAGES:RW packages: - - yarn - - nodejs + - hugo tasks: - build: | cd a14m.srht.site - yarn install - yarn build + hugo tar -C public -cvz . > ../site.tar.gz - publish: | @@ -1,15 +1,7 @@ -FROM node:18 as build +FROM alpine:3.18 as build +RUN apk add --no-cache hugo WORKDIR /app -COPY package.json yarn.lock . - -RUN yarn install --all COPY . . -RUN yarn build - - -FROM busybox:1.36 -RUN adduser -D static -WORKDIR /home/static -COPY --from=build /app/public . -CMD ["busybox", "httpd", "-f", "-v", "-p", "3333"] +RUN hugo +CMD ["hugo", "serve", "--bind", "0.0.0.0"] @@ -1,20 +1,15 @@ # Local ## Prerequisites : -- Node v12 (or higher): `brew install node` -- Yarn: `brew install yarn` - -## Installation : -- Clone the repo. -- Run `yarn install` +- Hugo: `brew install hugo` ## Development : -- Run `yarn start` +- Run `hugo serve` ## Build : -- Run `yarn build` +- Run `hugo` ## Deploy : -- Run `yarn build` +- Run `hugo` - Copy the generated `public` directory to any hosting environment. (`srht.site`) # Docker @@ -23,7 +18,7 @@ ## Build - Run `docker build . -t website` -- Run `docker run -p 3333:3333 -it website` +- Run `docker run -p 1313:1313 -it website` or - Run `docker-compose build` - Run `docker-compose up` diff --git a/docker-compose.yml b/docker-compose.yml index ee233c5..404472b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,4 +9,4 @@ services: dockerfile: Dockerfile restart: always ports: - - "3333:3333" + - "1313:1313" |
