Merge branch 'dev' of penahub.gitlab.yandexcloud.net:frontend/admin into dev
This commit is contained in:
commit
44d6972ffa
31
.gitlab-ci.yml
Normal file
31
.gitlab-ci.yml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
include:
|
||||||
|
- project: "devops/pena-continuous-integration"
|
||||||
|
file: "/templates/docker/build-template.gitlab-ci.yml"
|
||||||
|
- project: "devops/pena-continuous-integration"
|
||||||
|
file: "/templates/docker/clean-template.gitlab-ci.yml"
|
||||||
|
- project: "devops/pena-continuous-integration"
|
||||||
|
file: "/templates/docker/deploy-template.gitlab-ci.yml"
|
||||||
|
stages:
|
||||||
|
- clean
|
||||||
|
- build
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
clear-old-images:
|
||||||
|
extends: .clean_template
|
||||||
|
variables:
|
||||||
|
STAGING_BRANCH: "main"
|
||||||
|
PRODUCTION_BRANCH: "main"
|
||||||
|
|
||||||
|
build-app:
|
||||||
|
extends: .build_template
|
||||||
|
variables:
|
||||||
|
DOCKER_BUILD_PATH: "./Dockerfile"
|
||||||
|
STAGING_BRANCH: "main"
|
||||||
|
PRODUCTION_BRANCH: "main"
|
||||||
|
|
||||||
|
deploy-to-staging:
|
||||||
|
extends: .deploy_template
|
||||||
|
variables:
|
||||||
|
DEPLOY_TO: "staging"
|
||||||
|
BRANCH: "main"
|
||||||
|
|
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
FROM node:19.1-alpine as build
|
||||||
|
|
||||||
|
RUN apk update && rm -rf /var/cache/apk/*
|
||||||
|
WORKDIR /usr/app
|
||||||
|
COPY package.json .
|
||||||
|
COPY tsconfig.json .
|
||||||
|
|
||||||
|
RUN yarn install --ignore-scripts --non-interactive --frozen-lockfile && yarn cache clean
|
||||||
|
COPY . .
|
||||||
|
RUN ls
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
|
|
||||||
|
FROM nginx:latest as result
|
||||||
|
WORKDIR /usr/share/nginx/html
|
||||||
|
COPY --from=build /usr/app/build/ /usr/share/nginx/html
|
||||||
|
COPY admin.conf /etc/nginx/conf.d/default.conf
|
12
admin.conf
Normal file
12
admin.conf
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html index.htm;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
}
|
0
deployments/docker-compose.yaml
Normal file
0
deployments/docker-compose.yaml
Normal file
11
deployments/staging/docker-compose.yaml
Normal file
11
deployments/staging/docker-compose.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
services:
|
||||||
|
admin:
|
||||||
|
container_name: admin_front
|
||||||
|
restart: unless-stopped
|
||||||
|
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID
|
||||||
|
networks:
|
||||||
|
- penahub_frontend
|
||||||
|
hostname: hub
|
||||||
|
networks:
|
||||||
|
penahub_frontend:
|
||||||
|
external: true
|
32061
package-lock.json
generated
32061
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user