mirror of
https://github.com/tiennm99/blog.git
synced 2026-10-13 08:15:15 +00:00
[Change] use dockerfile instead of nixpacks
This commit is contained in:
1 parent
6042185dc8
commit
b5ff8da65c
2 files changed
+28
-5
No files matched your search
+28
@@ -0,0 +1,28 @@
|
||||
FROM ubuntu:latest
|
||||
|
||||
ENV HUGO_VERSION=0.124.0
|
||||
ENV HUGO_ENVIRONMENT=production
|
||||
ENV HUGO_ENV=production
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
wget \
|
||||
git \
|
||||
nodejs \
|
||||
npm \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN wget -O /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
|
||||
&& dpkg -i /tmp/hugo.deb \
|
||||
&& rm /tmp/hugo.deb
|
||||
|
||||
RUN npm install -g sass
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN [ -f package-lock.json ] && npm ci || echo "No package-lock.json found. Skipping npm ci."
|
||||
|
||||
RUN hugo --gc --minify
|
||||
|
||||
WORKDIR /src/public
|
||||
@@ -1,5 +0,0 @@
|
||||
[phases.setup]
|
||||
nixPkgs = ['hugo']
|
||||
|
||||
[phases.build]
|
||||
cmds = ['hugo']
|
||||
Reference in new issue
Block a user