github ci/cd
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
# Step 1: Build the Hugo site
|
||||
FROM klakegg/hugo:ext-alpine AS build-stage
|
||||
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy all files to the working directory
|
||||
COPY . .
|
||||
|
||||
# Build the Hugo site
|
||||
RUN hugo --minify
|
||||
|
||||
# Step 2: Use an Apache httpd image to serve the site
|
||||
FROM httpd:2.4-alpine
|
||||
|
||||
# Copy the public folder from the build stage to the Apache document root
|
||||
COPY --from=build-stage /app/public/ /usr/local/apache2/htdocs/
|
||||
|
Reference in New Issue
Block a user