Add Dockerfile to deploy site
This commit is contained in:
parent
2b08c90749
commit
fbb61ebdd1
5 changed files with 42 additions and 1 deletions
2
.dockerignore
Normal file
2
.dockerignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
public
|
||||
.hugo_build.lock
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
# hugo files
|
||||
.hugo_build.lock
|
||||
**/_gen
|
||||
**/_gen
|
||||
public
|
7
Dockerfile
Normal file
7
Dockerfile
Normal file
|
@ -0,0 +1,7 @@
|
|||
FROM klakegg/hugo:ext-alpine-ci as builder
|
||||
COPY . /src/
|
||||
RUN hugo
|
||||
|
||||
FROM nginx:1.25 as dest
|
||||
COPY --from=builder /src/public /usr/share/nginx/html
|
||||
COPY nginx/nginx.conf /etc/nginx/nginx.conf
|
5
Makefile
Normal file
5
Makefile
Normal file
|
@ -0,0 +1,5 @@
|
|||
rundev:
|
||||
hugo server --buildDrafts
|
||||
|
||||
run:
|
||||
hugo server
|
26
nginx/nginx.conf
Normal file
26
nginx/nginx.conf
Normal file
|
@ -0,0 +1,26 @@
|
|||
# user www www; ## Default: nobody
|
||||
worker_processes 1; ## Default: 1
|
||||
error_log /var/log/nginx/error.log;
|
||||
pid /var/run/nginx.pid;
|
||||
worker_rlimit_nofile 8192;
|
||||
|
||||
events {
|
||||
worker_connections 4096; ## Default: 1024
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
# include /etc/nginx/proxy.conf;
|
||||
# include /etc/nginx/fastcgi.conf;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
server_name faercol.me www.faercol.me;
|
||||
|
||||
index index.html;
|
||||
root /usr/share/nginx/html/;
|
||||
error_page 404 404.html;
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue