add .gitignore, remove .DS_Store, change to busybox webserver
Some checks are pending
Build and Push Docker Container / build-and-push (push) Waiting to run
Some checks are pending
Build and Push Docker Container / build-and-push (push) Waiting to run
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.DS_Store
|
||||
20
Dockerfile
20
Dockerfile
@@ -1,13 +1,13 @@
|
||||
# Compile the hugo site
|
||||
FROM ubuntu:latest AS builder
|
||||
|
||||
RUN apt-get update && apt-get install -y hugo
|
||||
|
||||
COPY ./hugo /app
|
||||
RUN hugo -s /app
|
||||
FROM klakegg/hugo:ext-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY ./hugo .
|
||||
RUN hugo --minify --destination /output
|
||||
|
||||
# Setup deployment
|
||||
FROM nginx:alpine AS final
|
||||
|
||||
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY --from=0 /var/www/rezepte /var/www
|
||||
FROM alpine:latest
|
||||
WORKDIR /www
|
||||
COPY --from=builder /output /www
|
||||
RUN apk add --no-cache busybox-extras
|
||||
EXPOSE 80
|
||||
CMD ["httpd", "-f", "-p", "80", "-h", "/www"]
|
||||
|
||||
BIN
hugo/.DS_Store
vendored
BIN
hugo/.DS_Store
vendored
Binary file not shown.
BIN
hugo/assets/.DS_Store
vendored
BIN
hugo/assets/.DS_Store
vendored
Binary file not shown.
BIN
hugo/layouts/.DS_Store
vendored
BIN
hugo/layouts/.DS_Store
vendored
Binary file not shown.
BIN
hugo/static/.DS_Store
vendored
BIN
hugo/static/.DS_Store
vendored
Binary file not shown.
@@ -1,43 +0,0 @@
|
||||
# nginx.conf
|
||||
worker_processes auto;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
# Logging
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
# Gzip compression
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
gzip_min_length 256;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name example.com;
|
||||
|
||||
root /var/www/;
|
||||
index index.html;
|
||||
|
||||
# Error pages
|
||||
#error_page 404 /404.html;
|
||||
#location = /404.html {
|
||||
# internal;
|
||||
#}
|
||||
|
||||
# Serve static files
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
# Optional: Caching for static assets
|
||||
location ~* \.(?:ico|css|js|gif|jpe?g|png|svg|woff2?|ttf|otf|eot|html|xml|json)$ {
|
||||
expires 10M;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user