mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 20:57:09 +00:00
<type>(scope): <description>
[body] [footer(s)]
This commit is contained in:
@@ -54,6 +54,15 @@ build_backend-staticfiles:
|
||||
DOCKERFILE_PATH: "Dockerfile.staticfiles"
|
||||
IMAGE_NAME: "$CI_REGISTRY_IMAGE/backend-staticfiles"
|
||||
|
||||
build_docs:
|
||||
<<: *build-template
|
||||
rules:
|
||||
- if: '$CI_COMMIT_REF_NAME == "master"'
|
||||
variables:
|
||||
CONTEXT: "${CI_PROJECT_DIR}/docs"
|
||||
DOCKERFILE_PATH: "Dockerfile"
|
||||
IMAGE_NAME: "$CI_REGISTRY_IMAGE/docs"
|
||||
|
||||
deploy:
|
||||
image: kroniak/ssh-client:3.19
|
||||
stage: deploy
|
||||
|
||||
@@ -356,6 +356,20 @@ services:
|
||||
source: prometheus_data
|
||||
target: /prometheus
|
||||
|
||||
docs:
|
||||
image: gitlab.prodcontest.ru:5050/team-15/project/docs:latest
|
||||
build:
|
||||
context: ./docs
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- name: web
|
||||
target: 3000
|
||||
published: 8008
|
||||
host_ip: 0.0.0.0
|
||||
protocol: tcp
|
||||
restart: unless-stopped
|
||||
shm_size: 4mb
|
||||
|
||||
proxy:
|
||||
image: docker.io/nginx:1.27-alpine3.21
|
||||
configs:
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# Stage 1: Base image
|
||||
FROM node:lts AS base
|
||||
|
||||
ENV FORCE_COLOR=0
|
||||
|
||||
RUN corepack enable
|
||||
|
||||
WORKDIR /opt/docusaurus
|
||||
|
||||
# Stage 2: Production build mode
|
||||
FROM base AS prod
|
||||
|
||||
WORKDIR /opt/docusaurus
|
||||
|
||||
COPY . /opt/docusaurus/
|
||||
|
||||
RUN npm ci
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# Stage 3: Serve with docusaurus serve
|
||||
FROM prod AS serve
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["npm", "run", "serve", "--", "--host", "0.0.0.0", "--no-open"]
|
||||
@@ -110,6 +110,24 @@ http {
|
||||
proxy_read_timeout 600s;
|
||||
}
|
||||
|
||||
location /docs {
|
||||
proxy_pass http://docs:3000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_hide_header X-Powered-By;
|
||||
|
||||
proxy_connect_timeout 75s;
|
||||
proxy_send_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
}
|
||||
|
||||
location /static {
|
||||
rewrite ^/static/(.*)$ /$1 break;
|
||||
proxy_pass http://backend-staticfiles:80;
|
||||
|
||||
Reference in New Issue
Block a user