- Add Gitea Actions workflow for auto-deploy on push to main - Add Dockerfile (nginx:alpine based, with layer caching) - Add nginx.conf (gzip, autoindex, static caching) - Add .dockerignore - Migrate cache.html → cache/index.html for directory-based routing
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copy nginx config first (changes less often → cached layer)
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copy site content
|
||||
COPY . /usr/share/nginx/html/
|
||||
|
||||
# Remove non-web files from the image
|
||||
RUN rm -rf /usr/share/nginx/html/.git \
|
||||
/usr/share/nginx/html/.gitea \
|
||||
/usr/share/nginx/html/.dockerignore \
|
||||
/usr/share/nginx/html/Dockerfile \
|
||||
/usr/share/nginx/html/LICENSE \
|
||||
/usr/share/nginx/html/README.md
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user