add Env-testnet.ts

This commit is contained in:
Alex Ant
2025-03-06 13:53:31 +05:00
parent bc3836b316
commit b0186a1baa
4 changed files with 122 additions and 92 deletions
+2 -1
View File
@@ -2,7 +2,8 @@ import dotenv from 'dotenv';
import { z } from 'zod';
import path from 'path';
dotenv.config({ path: path.join(__dirname, '../../.env') });
dotenv.config({ path: path.join(__dirname, '../../../../.env') });
console.log('CONFIG PATH: ', path.join(__dirname, '../../../../.env'));
const envVarsSchema = z.object({
NODE_ENV: z.enum(['production', 'development', 'test']),
+12
View File
@@ -0,0 +1,12 @@
export const BASE_URL = 'testnet.coopenomics.world';
export const NODE_ENV = 'development';
export const APP_NAME = 'COOPENOMICS';
export const BACKEND_URL = 'https://testnet.coopenomics.world/backend';
export const COOPNAME = 'voskhod';
export const CURRENCY = 'RUB';
export const STORAGE_URL = 'https://testnet.coopenomics.world/uploaded/';
export const UPLOAD_URL = 'https://testnet.coopenomics.world/upload';
export const CHAIN_URL = 'https://testnet.coopenomics.world/api';
export const COOP_SHORT_NAME = 'Цифровой Кооператив';
export const CHAIN_ID = 'f0364a3f9fd913081f1c0b05c6f8f50a59b2ba60bb928cb321ba3a9a36316624';
export const SENTRY_DSN ='https://b8151ac0239b44339e0e8c65c9aa59c4@o245142.ingest.sentry.io/5739100';
@@ -8,13 +8,13 @@ import { agreementsBase } from 'src/shared/lib/consts/workspaces';
import { ConnectionPage } from 'src/pages/Union/Connection';
import { ListOfDocumentsPage } from 'src/pages/Documentor/ListOfDocuments';
import { CoopCardPage } from 'src/pages/User/CardPage';
import { MainMarketplacePage } from 'src/pages/Marketplace/MainPage';
import { ModerationPage } from 'src/pages/Marketplace/Moderation';
import { CreateParentOfferPage } from 'src/pages/Marketplace/CreateParentOffer';
import { ShowcasePage } from 'src/pages/Marketplace/Showcase';
import { UserParentOffersPage } from 'src/pages/Marketplace/UserParentOffers';
import { UserSuppliesListPage } from 'src/pages/Marketplace/UserSuppliesList';
import { SuppliesListPage } from 'src/pages/Marketplace/SuppliesList';
// import { MainMarketplacePage } from 'src/pages/Marketplace/MainPage';
// import { ModerationPage } from 'src/pages/Marketplace/Moderation';
// import { CreateParentOfferPage } from 'src/pages/Marketplace/CreateParentOffer';
// import { ShowcasePage } from 'src/pages/Marketplace/Showcase';
// import { UserParentOffersPage } from 'src/pages/Marketplace/UserParentOffers';
// import { UserSuppliesListPage } from 'src/pages/Marketplace/UserSuppliesList';
// import { SuppliesListPage } from 'src/pages/Marketplace/SuppliesList';
export const manifest = {
'name': 'UserDesktop',
@@ -170,87 +170,87 @@ export const manifest = {
roles: [],
},
},
{
path: '/:coopname/marketplace',
name: 'marketplace',
component: markRaw(MainMarketplacePage),
children: [
{
path: 'moderation',
name: 'marketplace-moderation',
component: markRaw(ModerationPage),
meta: {
title: 'Модерация',
icon: '',
roles: ['member', 'chairman'],
},
},
{
path: 'create-offer',
name: 'marketplace-create-offer',
component: markRaw(CreateParentOfferPage),
meta: {
title: 'Создать объявление',
icon: '',
roles: [],
},
},
{
path: 'showcase',
name: 'marketplace-showcase',
component: markRaw(ShowcasePage),
children: [
{
path: ':id',
name: 'marketplace-showcase-id',
component: markRaw(ShowcasePage),
},
],
meta: {
title: 'Витрина',
icon: '',
roles: [],
},
},
{
path: 'user-offers',
name: 'marketplace-user-offers',
component: markRaw(UserParentOffersPage),
children: [
{
path: ':id',
name: 'marketplace-user-offer-id',
component: markRaw(UserParentOffersPage),
},
],
meta: {
title: 'Мои объявления',
icon: '',
roles: [],
},
},
{
path: 'supplies',
name: 'marketplace-supplies',
component: markRaw(SuppliesListPage),
meta: {
title: 'Все заказы',
icon: '',
roles: ['member', 'chairman'],
},
},
{
path: 'user-supplies',
name: 'marketplace-user-supplies',
component: markRaw(UserSuppliesListPage),
meta: {
title: 'Мои заказы',
icon: '',
roles: [],
},
},
],
},
// {
// path: '/:coopname/marketplace',
// name: 'marketplace',
// component: markRaw(MainMarketplacePage),
// children: [
// {
// path: 'moderation',
// name: 'marketplace-moderation',
// component: markRaw(ModerationPage),
// meta: {
// title: 'Модерация',
// icon: '',
// roles: ['member', 'chairman'],
// },
// },
// {
// path: 'create-offer',
// name: 'marketplace-create-offer',
// component: markRaw(CreateParentOfferPage),
// meta: {
// title: 'Создать объявление',
// icon: '',
// roles: [],
// },
// },
// {
// path: 'showcase',
// name: 'marketplace-showcase',
// component: markRaw(ShowcasePage),
// children: [
// {
// path: ':id',
// name: 'marketplace-showcase-id',
// component: markRaw(ShowcasePage),
// },
// ],
// meta: {
// title: 'Витрина',
// icon: '',
// roles: [],
// },
// },
// {
// path: 'user-offers',
// name: 'marketplace-user-offers',
// component: markRaw(UserParentOffersPage),
// children: [
// {
// path: ':id',
// name: 'marketplace-user-offer-id',
// component: markRaw(UserParentOffersPage),
// },
// ],
// meta: {
// title: 'Мои объявления',
// icon: '',
// roles: [],
// },
// },
// {
// path: 'supplies',
// name: 'marketplace-supplies',
// component: markRaw(SuppliesListPage),
// meta: {
// title: 'Все заказы',
// icon: '',
// roles: ['member', 'chairman'],
// },
// },
// {
// path: 'user-supplies',
// name: 'marketplace-user-supplies',
// component: markRaw(UserSuppliesListPage),
// meta: {
// title: 'Мои заказы',
// icon: '',
// roles: [],
// },
// },
// ],
// },
// {
// meta: {
// title: 'Поддержка',
+20 -3
View File
@@ -7,13 +7,29 @@ services:
restart: always
volumes:
- mongo_data:/data/db
ports:
ports:
- 127.0.0.1:27017:27017
entrypoint: >
/bin/bash -c "
mongod --replSet rs0 --bind_ip_all &
sleep 5;
mongosh --eval '
try {
rs.status();
} catch (e) {
rs.initiate({
_id: \"rs0\",
members: [{ _id: 0, host: \"127.0.0.1:27017\" }]
});
}
';
tail -f /dev/null"
redis:
image: redis:latest
container_name: redis
restart: always
ports:
ports:
- 127.0.0.1:6379:6379
postgres:
@@ -26,8 +42,9 @@ services:
POSTGRES_DB: voskhod
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
ports:
- 127.0.0.1:5432:5432
volumes:
mongo_data:
postgres_data: