[Change] use dockerfile instead of nixpacks

This commit is contained in:
tiennm99 committed 2024-09-14 14:22:01 +07:00
1 parent 6042185dc8
commit b5ff8da65c
2 files changed
+28 -5

No files matched your search

+28
View File
@@ -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
-5
View File
@@ -1,5 +0,0 @@
[phases.setup]
nixPkgs = ['hugo']
[phases.build]
cmds = ['hugo']