Skip to content

Commit

Permalink
Merge branch 'release/1.1.0' into feature/issue-1835
Browse files Browse the repository at this point in the history
  • Loading branch information
sashapanasiuk5 authored Dec 28, 2024
2 parents 016976b + 3d14643 commit 8c52ed0
Show file tree
Hide file tree
Showing 47 changed files with 963 additions and 700 deletions.
4 changes: 4 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ pipeline {
}
}
}
/*
stage('Deploy prod') {
agent {
label 'production'
Expand Down Expand Up @@ -260,6 +261,7 @@ pipeline {
}
}
}
*/
stage('Sync after release') {
when {
expression { isSuccess == '1' }
Expand All @@ -286,6 +288,7 @@ pipeline {
}
}
}
/*
stage('Rollback Prod') {
agent {
label 'production'
Expand All @@ -311,6 +314,7 @@ pipeline {
}
}
}
*/
}

}
188 changes: 94 additions & 94 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,99 +1,99 @@
services:
certbot:
restart: always
image: certbot/certbot:latest
volumes:
- /etc/certbot/www/:/var/www/certbot/:rw
- /etc/certbot/conf/:/etc/letsencrypt/:rw
# services:
# certbot:
# restart: always
# image: certbot/certbot:latest
# volumes:
# - /etc/certbot/www/:/var/www/certbot/:rw
# - /etc/certbot/conf/:/etc/letsencrypt/:rw

nginx:
restart: always
image: nginx:latest
ports:
- "80:80"
- "443:443"
environment:
FRONTEND_SERVER_NAME: ${FRONTEND_SERVER_NAME}
BACKEND_SERVER_NAME: ${BACKEND_SERVER_NAME}
volumes:
- ./templates:/etc/nginx/templates
- /etc/certbot/www:/var/www/certbot/:ro
- /etc/certbot/conf:/etc/nginx/ssl/:ro
# nginx:
# restart: always
# image: nginx:latest
# ports:
# - "80:80"
# - "443:443"
# environment:
# FRONTEND_SERVER_NAME: ${FRONTEND_SERVER_NAME}
# BACKEND_SERVER_NAME: ${BACKEND_SERVER_NAME}
# volumes:
# - ./templates:/etc/nginx/templates
# - /etc/certbot/www:/var/www/certbot/:ro
# - /etc/certbot/conf:/etc/nginx/ssl/:ro


loki:
restart: always
container_name: loki
image: grafana/loki:latest
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
volumes:
- ./loki/config:/etc/loki
# loki:
# restart: always
# container_name: loki
# image: grafana/loki:latest
# ports:
# - "3100:3100"
# command: -config.file=/etc/loki/local-config.yaml
# volumes:
# - ./loki/config:/etc/loki

frontend:
restart: always
image: streetcodeua/streetcode_client:${DOCKER_TAG_FRONTEND}
pull_policy: always
expose:
- "80"
healthcheck:
test: curl --fail http://localhost || exit 1
interval: 30s
timeout: 10s
retries: 5
environment:
API_URL: ${ENV_API_BACKEND}
REACT_APP_GOOGLE_ANALYTICS: ${ENV_GOOGLE_ANALYTICS}
RECAPTCHA_SITE_KEY: ${RECAPTCHA_SITE_KEY}
logging:
driver: loki
options:
loki-url: "http://localhost:3100/loki/api/v1/push"
# frontend:
# restart: always
# image: streetcodeua/streetcode_client:${DOCKER_TAG_FRONTEND}
# pull_policy: always
# expose:
# - "80"
# healthcheck:
# test: curl --fail http://localhost || exit 1
# interval: 30s
# timeout: 10s
# retries: 5
# environment:
# API_URL: ${ENV_API_BACKEND}
# REACT_APP_GOOGLE_ANALYTICS: ${ENV_GOOGLE_ANALYTICS}
# RECAPTCHA_SITE_KEY: ${RECAPTCHA_SITE_KEY}
# logging:
# driver: loki
# options:
# loki-url: "http://localhost:3100/loki/api/v1/push"

backend:
restart: always
image: streetcodeua/streetcode:${DOCKER_TAG_BACKEND}
pull_policy: always
expose:
- "80"
environment:
STREETCODE_ConnectionStrings__DefaultConnection: ${DB_CONNECTION_STRING}
STREETCODE_Blob__BlobStoreKey: ${BLOB_STORAGE_KEY}
STREETCODE_Blob__BlobStorePath: /mnt/data/
STREETCODE_Instagram__InstagramID: ${INSTAGRAM_ID}
STREETCODE_Instagram__InstagramToken: ${INSTAGRAM_TOKEN}
STREETCODE_Payment__Token: ${PAYMENT_TOKEN}
STREETCODE_EMAILCONFIGURATION__PASSWORD: ${EMAIL_PASSWORD}
STREETCODE_RECAPTCHA__SECRETKEY: ${RECAPTCHA_SECRET_KEY}
STREETCODE_CORS__AllowedOrigins: ${CORS_ALLOWED_ORIGINS}
STREETCODE_CORS__AllowedHeaders: ${CORS_ALLOWED_HEADERS}
STREETCODE_CORS__AllowedMethods: ${CORS_ALLOWED_METHODS}
STREETCODE_CORS__ExposedHeaders: ${CORS_EXPOSED_HEADERS}
STREETCODE_CORS__PreflightMaxAge: "600"
STREETCODE_IPRATELIMITING__GENERALRULES__0__LIMIT: 500
ASPNETCORE_ENVIRONMENT: ${SWAGGER_APP_ENVIRONMENT}
volumes:
- type: bind
source: /imagestorage
target: /mnt/data
healthcheck:
test: curl --fail http://localhost/api/partners/getAll || exit 1
interval: 30s
timeout: 10s
retries: 5
extra_hosts:
- "host.docker.internal:host-gateway"
logging:
driver: loki
options:
loki-url: "http://localhost:3100/loki/api/v1/push"
volumes:
backend:
networks:
backend:
external:
name: backend
frontend:
external:
name: frontend
# backend:
# restart: always
# image: streetcodeua/streetcode:${DOCKER_TAG_BACKEND}
# pull_policy: always
# expose:
# - "80"
# environment:
# STREETCODE_ConnectionStrings__DefaultConnection: ${DB_CONNECTION_STRING}
# STREETCODE_Blob__BlobStoreKey: ${BLOB_STORAGE_KEY}
# STREETCODE_Blob__BlobStorePath: /mnt/data/
# STREETCODE_Instagram__InstagramID: ${INSTAGRAM_ID}
# STREETCODE_Instagram__InstagramToken: ${INSTAGRAM_TOKEN}
# STREETCODE_Payment__Token: ${PAYMENT_TOKEN}
# STREETCODE_EMAILCONFIGURATION__PASSWORD: ${EMAIL_PASSWORD}
# STREETCODE_RECAPTCHA__SECRETKEY: ${RECAPTCHA_SECRET_KEY}
# STREETCODE_CORS__AllowedOrigins: ${CORS_ALLOWED_ORIGINS}
# STREETCODE_CORS__AllowedHeaders: ${CORS_ALLOWED_HEADERS}
# STREETCODE_CORS__AllowedMethods: ${CORS_ALLOWED_METHODS}
# STREETCODE_CORS__ExposedHeaders: ${CORS_EXPOSED_HEADERS}
# STREETCODE_CORS__PreflightMaxAge: "600"
# STREETCODE_IPRATELIMITING__GENERALRULES__0__LIMIT: 500
# ASPNETCORE_ENVIRONMENT: ${SWAGGER_APP_ENVIRONMENT}
# volumes:
# - type: bind
# source: /imagestorage
# target: /mnt/data
# healthcheck:
# test: curl --fail http://localhost/api/partners/getAll || exit 1
# interval: 30s
# timeout: 10s
# retries: 5
# extra_hosts:
# - "host.docker.internal:host-gateway"
# logging:
# driver: loki
# options:
# loki-url: "http://localhost:3100/loki/api/v1/push"
# volumes:
# backend:
# networks:
# backend:
# external:
# name: backend
# frontend:
# external:
# name: frontend
2 changes: 1 addition & 1 deletion public/env-config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
window._env_ = {
REACT_APP_BACKEND_URL: "https://localhost:5001/api",
API_URL: "https://stageback.streetcode.com.ua/api",
API_URL: "https://backend.historycode.online//api",
REACT_APP_GOOGLE_ANALYTICS: "REACT_APP_GOOGLE_ANALYTICS_VALUE",
RECAPTCHA_SITE_KEY: "6LeUO3ApAAAAAOC7F4v0qTsSwIR9mZu33SWjAAtM",
VERSION: "1.1.0"
Expand Down
1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<head>
<script src="/env-config.js"></script>
<meta charset="utf-8" />
<meta name="robots" content="noindex" />
<link rel="icon" href="favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#000000" />
Expand Down
4 changes: 1 addition & 3 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:

Sitemap: https://streetcode.com.ua/sitemap.xml
Disallow: /
5 changes: 3 additions & 2 deletions src/app/api/donates/donation.api.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Agent from '@api/agent.api';
import { API_ROUTES } from '@constants/api-routes.constants';

import Donation from '@/models/feedback/donation.model';
import Donation, { DonationResponse } from '@/models/feedback/donation.model';

const DonationApi = {
create: (donation: Donation) => Agent.post<Donation>(`${API_ROUTES.DONATION.CREATE}`, donation),
create: (donation: Donation)
: Promise<DonationResponse> => Agent.post<DonationResponse>(`${API_ROUTES.DONATION.CREATE}`, donation),
};

export default DonationApi;
1 change: 1 addition & 0 deletions src/app/common/components/Editor/QEditor.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

.quillEditor {
margin-bottom: f.pxToRem(35px);
white-space: pre-wrap;
}

.editorInfoContainer {
Expand Down
25 changes: 25 additions & 0 deletions src/app/common/components/SelectWithCustomSuffix.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React, { useState } from 'react';
import { DownOutlined } from '@ant-design/icons';

import type { SelectProps } from 'antd';
import { Select } from 'antd';

const SelectWithCustomSuffix: React.FC<SelectProps<any>> = ({ children, ...props }) => {
const [isOpen, setIsOpen] = useState(false);

const toggleDropdown = () => {
setIsOpen((prevState) => !prevState);
};
return (
<Select
{...props}
open={isOpen}
onDropdownVisibleChange={(open) => setIsOpen(open)}
suffixIcon={<DownOutlined onClick={toggleDropdown} />}
>
{children}
</Select>
);
};

export default SelectWithCustomSuffix;
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ const RelatedFiguresItemModal = () => {
const { relatedFiguresStore: { relatedFiguresMap } } = useMobx();
const { modalStore } = useModalContext();
const { setModal, modalsState: { relatedFigureItem } } = modalStore;

const relationId = relatedFigureItem.fromCardId!;
const relation = relatedFiguresMap.get(relationId);
const relation = relatedFiguresMap.get(relatedFigureItem.fromCardId!);

const handleClick = () => {
relatedFigureItem.isOpen = false;
Expand All @@ -42,17 +40,13 @@ const RelatedFiguresItemModal = () => {
<div className="figureSlideText">
<div className="heading">
<p>{relation?.title}</p>
{
relation?.alias !== null
? (
<p className="aliasText">
{relation?.alias && (
<p className="aliasText">
(
{relation?.alias}
)
</p>
{relation.alias}
)
: undefined
}
</p>
)}
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import './RelatedFiguresModal.styles.scss';
import { observer } from 'mobx-react-lite';
import CancelBtn from '@assets/images/utils/Cancel_btn.svg';
import ModalBg from '@assets/images/utils/ModalBg.webp';
import { useAsync } from '@hooks/stateful/useAsync.hook';
import useMobx, { useModalContext } from '@stores/root-store';
import RelatedFigureItem from '@streetcode/RelatedFiguresBlock/RelatedFigureItem/RelatedFigureItem.component';

Expand All @@ -13,18 +12,12 @@ const RelatedFiguresModal = () => {
const { relatedFiguresStore } = useMobx();
const { modalStore } = useModalContext();
const { setModal, modalsState: { relatedFigures } } = modalStore;
const { fetchRelatedFiguresByStreetcodeId, getRelatedFiguresArray } = relatedFiguresStore;

const { getRelatedFiguresArray } = relatedFiguresStore;
const streetcodeId = relatedFigures.fromCardId!;

useAsync(
() => {
if (streetcodeId) {
fetchRelatedFiguresByStreetcodeId(streetcodeId);
}
},
[streetcodeId],
);
const handleMoreInfoClick = () => {
setModal('relatedFigures', streetcodeId, false);
};

return (
<Modal
Expand All @@ -33,7 +26,7 @@ const RelatedFiguresModal = () => {
maskClosable
centered
footer={null}
onCancel={() => setModal('relatedFigures', streetcodeId, false)}
onCancel={() => setModal('relatedFigures', streetcodeId)}
closeIcon={<CancelBtn />}
>
<div
Expand All @@ -44,12 +37,10 @@ const RelatedFiguresModal = () => {
</div>
<div className="relatedFiguresReadMoreContentContainer">
{getRelatedFiguresArray?.map((figure) => (
<div key={figure.id} onClick={() => setModal('relatedFigures', streetcodeId, false)}>
<div key={figure.id} onClick={handleMoreInfoClick}>
<RelatedFigureItem
key={figure.id}
relatedFigure={figure}
filterTags={false}
setActiveTagId={() => {}}
/>
</div>
))}
Expand Down
Loading

0 comments on commit 8c52ed0

Please sign in to comment.