Improve SEO in nginx.conf, index.html; update favicon and logos; embedded card now supported; Dockerfile slimmed and modernized
All checks were successful
/ image_build (push) Successful in 1m14s
All checks were successful
/ image_build (push) Successful in 1m14s
This commit is contained in:
33
Dockerfile
33
Dockerfile
@@ -1,21 +1,24 @@
|
||||
FROM node:latest AS build
|
||||
FROM docker.io/node:alpine AS build
|
||||
WORKDIR /blog
|
||||
COPY package.json /blog/
|
||||
RUN npm install
|
||||
COPY . /blog/
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM docker.io/nginx:trixie
|
||||
RUN useradd tymur999 -u 3000
|
||||
RUN chown tymur999:tymur999 -R /etc/logrotate.d/nginx \
|
||||
/etc/nginx \
|
||||
/etc/init.d/nginx \
|
||||
/usr/lib/nginx \
|
||||
/usr/share/nginx \
|
||||
/var/cache/nginx \
|
||||
/var/log/nginx
|
||||
FROM docker.io/nginx:alpine-slim
|
||||
|
||||
RUN addgroup -g 3000 tymur999 && \
|
||||
adduser -u 3000 -G tymur999 -S -D tymur999 && \
|
||||
mkdir -p /var/www/html && \
|
||||
chown -R tymur999:tymur999 /var/cache/nginx /var/log/nginx /etc/nginx/conf.d /var/www/html && \
|
||||
touch /tmp/nginx.pid && \
|
||||
chown tymur999:tymur999 /tmp/nginx.pid
|
||||
|
||||
USER tymur999:tymur999
|
||||
|
||||
COPY --from=build --chown=tymur999:tymur999 /blog/build/ /var/www/html/
|
||||
COPY --link nginx.conf /etc/nginx/
|
||||
EXPOSE 8000
|
||||
COPY --chown=tymur999:tymur999 nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
Reference in New Issue
Block a user