summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2023-08-10 15:57:04 +0300
committerAhmed Abdelhalim <[email protected]>2023-08-10 15:57:04 +0300
commit7cfc751cc84743b8e2bba8c8d614966526dc83a9 (patch)
tree373007aa075e2688d75f58560c60d22b8a28b113
parentf722d20725586ee4744d077770ef7a89ab05e360 (diff)
Update Readme and deploy hugo site
-rw-r--r--.build.yml6
-rw-r--r--Dockerfile16
-rw-r--r--README.md15
-rw-r--r--docker-compose.yml2
4 files changed, 12 insertions, 27 deletions
diff --git a/.build.yml b/.build.yml
index c9d5c82..3d244bd 100644
--- a/.build.yml
+++ b/.build.yml
@@ -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: |
diff --git a/Dockerfile b/Dockerfile
index 98c4f35..545dff8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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"]
diff --git a/README.md b/README.md
index e850d32..4962260 100644
--- a/README.md
+++ b/README.md
@@ -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"