mirror of
https://github.com/StepanovPlaton/AboutMe.git
synced 2026-04-03 20:30:49 +04:00
deploy
This commit is contained in:
4
.env
4
.env
@@ -1,6 +1,6 @@
|
|||||||
# GitHub OAuth
|
# GitHub OAuth
|
||||||
OAUTH_GITHUB_CLIENT_ID=
|
#OAUTH_GITHUB_CLIENT_ID=
|
||||||
OAUTH_GITHUB_CLIENT_SECRET=
|
#OAUTH_GITHUB_CLIENT_SECRET=
|
||||||
|
|
||||||
# Decap CMS
|
# Decap CMS
|
||||||
PUBLIC_DECAP_CMS_SRC_URL=https://unpkg.com/decap-cms@^3.3.3/dist/decap-cms.js
|
PUBLIC_DECAP_CMS_SRC_URL=https://unpkg.com/decap-cms@^3.3.3/dist/decap-cms.js
|
||||||
|
|||||||
21
Dockerfile
21
Dockerfile
@@ -1,21 +1,22 @@
|
|||||||
# Stage 1: Build
|
# Stage 1: Build
|
||||||
FROM node:22-alpine AS builder
|
FROM node:22-alpine AS builder
|
||||||
|
|
||||||
# Install dependencies for sharp and other native modules
|
|
||||||
RUN apk add --no-cache \
|
|
||||||
python3 \
|
|
||||||
make \
|
|
||||||
g++ \
|
|
||||||
libc6-compat
|
|
||||||
|
|
||||||
# Set working directory
|
# Set working directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Accept build arguments
|
||||||
|
ARG OAUTH_GITHUB_CLIENT_ID
|
||||||
|
ARG OAUTH_GITHUB_CLIENT_SECRET
|
||||||
|
|
||||||
|
# Set environment variables from build args
|
||||||
|
ENV OAUTH_GITHUB_CLIENT_ID=${OAUTH_GITHUB_CLIENT_ID}
|
||||||
|
ENV OAUTH_GITHUB_CLIENT_SECRET=${OAUTH_GITHUB_CLIENT_SECRET}
|
||||||
|
|
||||||
# Copy package files
|
# Copy package files
|
||||||
COPY package.json package-lock.json* ./
|
COPY package.json package-lock.json* ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN npm ci --only=production=false
|
RUN npm ci
|
||||||
|
|
||||||
# Copy source code
|
# Copy source code
|
||||||
COPY . .
|
COPY . .
|
||||||
@@ -32,8 +33,8 @@ COPY --from=builder /app/dist /usr/share/nginx/html
|
|||||||
# Copy nginx configuration
|
# Copy nginx configuration
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
# Expose port 80
|
# Expose port 8091 (for rootless podman)
|
||||||
EXPOSE 80
|
EXPOSE 8091
|
||||||
|
|
||||||
# Start nginx
|
# Start nginx
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 8091;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|||||||
Reference in New Issue
Block a user