-
Notifications
You must be signed in to change notification settings - Fork 891
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from rairprotocol/dev
Merge Dev branch to main
- Loading branch information
Showing
128 changed files
with
3,101 additions
and
3,500 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Build and Push rair-front Docker Image to Docker Hub | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
#Allow repo secrets | ||
env: | ||
VITE_ALCHEMY_KEY: ${{ secrets.VITE_ALCHEMY_KEY }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: 'dev' | ||
|
||
- name: login to docker registry | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{secrets.DOCKERHUB_USERNAME}} | ||
password: ${{secrets.DOCKERHUB_TOKEN}} | ||
|
||
- name: build and push rair-front docker image to registry | ||
run: cp rair-front/.env.sample rair-front/.env | ||
- name: appending VITE_MATIC_MAINNET_ALCHEMY_KEY in .env file | ||
run: echo "VITE_MATIC_MAINNET_ALCHEMY_KEY"=${{ secrets.VITE_MATIC_MAINNET_ALCHEMY_KEY }} >> rair-front/.env | ||
- name: appending VITE_MATIC_MAINNET_GAS_POLICY in .env file | ||
run: echo "VITE_MATIC_MAINNET_GAS_POLICY"=${{ secrets.VITE_MATIC_MAINNET_GAS_POLICY }} >> rair-front/.env | ||
- name: appending VITE_ETH_MAINNET_ALCHEMY_KEY in .env file | ||
run: echo "VITE_ETH_MAINNET_ALCHEMY_KEY"=${{ secrets.VITE_ETH_MAINNET_ALCHEMY_KEY }} >> rair-front/.env | ||
- name: appending VITE_ETH_MAINNET_GAS_POLICY in .env file | ||
run: echo "VITE_ETH_MAINNET_GAS_POLICY"=${{ secrets.VITE_ETH_MAINNET_GAS_POLICY }} >> rair-front/.env | ||
- name: appending VITE_BASE_MAINNET_ALCHEMY_KEY in .env file | ||
run: echo "VITE_BASE_MAINNET_ALCHEMY_KEY"=${{ secrets.VITE_BASE_MAINNET_ALCHEMY_KEY }} >> rair-front/.env | ||
- name: appending VITE_BASE_MAINNET_GAS_POLICY in .env file | ||
run: echo "VITE_BASE_MAINNET_GAS_POLICY"=${{ secrets.VITE_BASE_MAINNET_GAS_POLICY }} >> rair-front/.env | ||
- name: appending VITE_ETH_SEPOLIA_ALCHEMY_KEY in .env file | ||
run: echo "VITE_ETH_SEPOLIA_ALCHEMY_KEY"=${{ secrets.VITE_ETH_SEPOLIA_ALCHEMY_KEY }} >> rair-front/.env | ||
- name: appending VITE_ETH_SEPOLIA_GAS_POLICY in .env file | ||
run: echo "VITE_ETH_SEPOLIA_GAS_POLICY"=${{ secrets.VITE_ETH_SEPOLIA_GAS_POLICY }} >> rair-front/.env | ||
- name: build rair-front docker image | ||
run: sudo docker build -t rair-front:${{github.sha}} -f rair-front/Dockerfile.prod rair-front | ||
- name: tag image | ||
run: | | ||
docker tag rair-front:${{github.sha}} ${{secrets.DOCKERHUB_USERNAME}}/rair-front:_${{github.sha}} | ||
docker tag rair-front:${{github.sha}} ${{secrets.DOCKERHUB_USERNAME}}/rair-front:_latest | ||
- name: Docker push | ||
run: | | ||
docker push ${{secrets.DOCKERHUB_USERNAME}}/rair-front:_${{github.sha}} | ||
docker push ${{secrets.DOCKERHUB_USERNAME}}/rair-front:_latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,250 @@ | ||
version: '3.9' | ||
|
||
services: | ||
certbot: | ||
image: certbot/certbot | ||
container_name: certbot | ||
volumes: | ||
- ./data/certbot/conf:/etc/letsencrypt | ||
- ./data/certbot/www:/var/www/certbot | ||
command: certonly --webroot -w /var/www/certbot --force-renewal --email {email} -d {domain} --agree-tos | ||
networks: | ||
- rair-local | ||
rair-node: | ||
container_name: 'rair-node' | ||
build: | ||
context: rair-node/ | ||
dockerfile: Dockerfile | ||
volumes: | ||
- ./rair-node/db:/usr/src/rair-node/db | ||
- ./rair-node/bin/Videos:/usr/src/rair-node/bin/Videos | ||
environment: | ||
PRODUCTION: "false" | ||
MONGO_URI: mongodb://${localdbuser}:${localdbpass}@mongo:27017/rair-db?authSource=${localdbuser} | ||
MONGO_URI_LOCAL: mongodb://${localdbuser}:${localdbpass}@mongo:27017/rair-db?authSource=${localdbuser} | ||
GENERATE_MONGO_URI_WITH_VAULT_CREDENTIAL_UTIL: ${rairnode_generate_mongo_uri_with_vault_credential_util} | ||
USE_X509_CERT_AUTH: ${VAULT_RAIRNODE_use_x509_cert_auth} | ||
MONGO_DB_HOSTNAME: ${RAIRNODE_mongo_db_hostname} | ||
MONGO_DB_NAME: ${mongo_db_name} | ||
JWT_SECRET: ${jwt_secret} | ||
PINATA_KEY: ${pinata_key} | ||
PINATA_SECRET: ${pinata_secret} | ||
ADMIN_NETWORK: ${admin_nft_chain} | ||
ADMIN_CONTRACT: ${admin_contract} | ||
SUPER_ADMIN_VAULT_STORE: ${SUPER_ADMIN_VAULT_STORE} | ||
SERVICE_HOST: ${hostname} | ||
DEFAULT_PRODUCT_COVER: ${default_product_cover} | ||
GCP_PROJECT_ID: ${gcp_project_id} | ||
GCP_IMAGE_BUCKET_NAME: ${gcp_image_bucket_name} | ||
GCP_VIDEO_BUCKET_NAME: ${gcp_video_bucket_name} | ||
GCP_GATEWAY: ${gcp_gateway} | ||
GCP_CREDENTIALS: ${gcp_credentials} | ||
IPFS_SERVICE: ${ipfs_service} | ||
IPFS_GATEWAY: ${ipfs_gateway} | ||
IPFS_API: ${ipfs_api} | ||
PINATA_GATEWAY: ${pinata_gateway} | ||
MATIC_TESTNET_RPC: ${matic_testnet_rpc} | ||
MATIC_MAINNET_RPC: ${matic_mainnet_rpc} | ||
BINANCE_MAINNET_RPC: ${binance_mainnet_rpc} | ||
BINANCE_TESTNET_RPC: ${binance_testnet_rpc} | ||
ETHEREUM_MAINNET_RPC: ${ethereum_mainnet_rpc} | ||
ETHEREUM_TESTNET_SEPOLIA_RPC: ${ethereum_testnet_sepolia_rpc} | ||
BASE_MAINNET_RPC: ${base_mainnet_rpc} | ||
ASTAR_MAINNET_RPC: ${astar_mainnet_rpc} | ||
MONGO_LOG_COLLECTION: ${mongo_log_collection} | ||
LOG_LEVEL: ${log_level} | ||
VAULT_URL: ${VAULT_URL} | ||
VAULT_RAIRNODE_APP_ROLE_ID: ${VAULT_RAIRNODE_APP_ROLE_ID} | ||
VAULT_RAIRNODE_APP_ROLE_SECRET_ID: ${VAULT_RAIRNODE_APP_ROLE_SECRET_ID} | ||
REDIS_HOST: ${redisthhost} | ||
REDIS_PORT: ${redisport} | ||
SESSION_SECRET: ${session_secret} | ||
SESSION_TTL: ${session_ttl} | ||
SENTRY_DSN: ${sentry_dsn} | ||
BASE_BCN_URL: ${base_bcn_url} | ||
ZOOM_API_KEY: ${zoom_api_key} | ||
ZOOM_API_SECRET: ${zoom_api_secret} | ||
KOHLER_MEETING_ID: ${kohler_meeting_id} | ||
ALCHEMY_API_KEY: ${alchemy_api_key} | ||
WITHDRAWER_PRIVATE_KEY: ${withdrawer_private_key} | ||
APP_NAME: ${app_name} | ||
SEPOLIA_DIAMOND_MARKETPLACE_ADDRESS: ${sepolia_diamond_marketplace_address} | ||
MATIC_MUMBAI_DIAMOND_MARKETPLACE_ADDRESS: ${matic_mumbai_diamond_marketplace_address} | ||
MATIC_MAINNET_DIAMOND_MARKETPLACE_ADDRESS: ${matic_mainnet_diamond_marketplace_address} | ||
ASTAR_DIAMOND_MARKETPLACE_ADDRESS: ${astar_diamond_marketplace_address} | ||
BASE_DIAMOND_MARKETPLACE_ADDRESS: ${base_diamond_marketplace_address} | ||
AWS_ACCESS_KEY_ID: ${filebase_access_key} | ||
AWS_SECRET_ACCESS_KEY: ${filebase_secret_access_key} | ||
FILEBASE_BUCKET: ${filebase_bucket} | ||
YOTI_CLIENT_ID: ${yoti_client_id} | ||
ports: | ||
- 3000:3000 | ||
- 5000:5000 | ||
depends_on: | ||
- rair-redis | ||
- mongo | ||
networks: | ||
- rair-local | ||
rair-sync: | ||
container_name: 'rair-sync' | ||
build: | ||
context: rair-sync/ | ||
dockerfile: Dockerfile | ||
environment: | ||
PRODUCTION: "false" | ||
MONGO_URI: mongodb+srv://${dbuser}:${dbpass}@${dbhost} | ||
MONGO_URI_LOCAL: mongodb://${localdbuser}:${localdbpass}@mongo:27017/rair-db?authSource=${localdbuser} | ||
MONGO_DB_HOSTNAME: ${BLOCKCHAIN_NETWORK_mongo_db_hostname} | ||
MONGO_DB_NAME: ${mongo_db_name} | ||
GENERATE_MONGO_URI_WITH_VAULT_CREDENTIAL_UTIL: ${blockchain_network_generate_mongo_uri_with_vault_credential_util} | ||
USE_X509_CERT_AUTH: ${VAULT_BLOCKCHAIN_NETWORK_use_x509_cert_auth} | ||
PINATA_KEY: ${pinata_key} | ||
PINATA_SECRET: ${pinata_secret} | ||
PINATA_GATEWAY: ${pinata_gateway} | ||
INFURA_PROJECT_ID: ${infura_project_id} | ||
DEFAULT_PRODUCT_COVER: ${default_product_cover} | ||
BINANCE_TESTNET_FACTORY_ADDRESS: ${binance_testnet_factory_addres} | ||
BINANCE_TESTNET_MINTER_ADDRESS: ${binance_testnet_minter_address} | ||
BINANCE_MAINNET_FACTORY_ADDRESS: ${binance_mainnet_factory_addres} | ||
BINANCE_MAINNET_MINTER_ADDRESS: ${binance_mainnet_minter_address} | ||
SEPOLIA_FACTORY_ADDRESS: ${sepolia_factory_addres} | ||
SEPOLIA_MINTER_ADDRESS: ${sepolia_minter_address} | ||
MATIC_MUMBAI_FACTORY_ADDRESS: ${matic_mumbai_factory_addres} | ||
MATIC_MUMBAI_MINTER_ADDRESS: ${matic_mumbai_minter_address} | ||
MATIC_MAINNET_FACTORY_ADDRESS: ${matic_mainnet_factory_addres} | ||
MATIC_MAINNET_MINTER_ADDRESS: ${matic_mainnet_minter_address} | ||
ETHEREUM_MAINNET_FACTORY_ADDRESS: ${ethereum_mainnet_factory_addres} | ||
ETHEREUM_MAINNET_MINTER_ADDRESS: ${ethereum_mainnet_minter_address} | ||
BINANCE_RESALE_ADDRESS: ${binance_resale_address} | ||
SEPOLIA_RESALE_ADDRESS: ${sepolia_resale_address} | ||
MATIC_MUMBAI_RESALE_ADDRESS: ${matic_mumbai_resale_address} | ||
ASTAR_DIAMOND_FACTORY_ADDRESS: ${astar_diamond_factory_address} | ||
ASTAR_DIAMOND_MARKETPLACE_ADDRESS: ${astar_diamond_marketplace_address} | ||
BASE_DIAMOND_FACTORY_ADDRESS: ${base_diamond_factory_address} | ||
BASE_DIAMOND_MARKETPLACE_ADDRESS: ${base_diamond_marketplace_address} | ||
SYNC_CONTRACT_REPEAT_EVERY: ${sync_contract_repeat_every} | ||
SYNC_CONTRACT_TASK_INTERVAL: ${sync_contract_task_interval} | ||
IPFS_SERVICE: ${ipfs_service} | ||
IPFS_GATEWAY: ${ipfs_gateway} | ||
IPFS_API: ${ipfs_api} | ||
MONGO_LOG_COLLECTION: ${mongo_log_collection} | ||
LOG_LEVEL: ${log_level} | ||
VAULT_URL: ${VAULT_URL} | ||
VAULT_BLOCKCHAIN_NETWORK_APP_ROLE_ID: ${VAULT_BLOCKCHAIN_NETWORK_APP_ROLE_ID} | ||
VAULT_BLOCKCHAIN_NETWORK_APP_ROLE_SECRET_ID: ${VAULT_BLOCKCHAIN_NETWORK_APP_ROLE_SECRET_ID} | ||
TEST_BSCSCAN_GATEWAY: ${test_bscscan_gateway} | ||
TEST_POLYGONSCAN_GATEWAY: ${test_polygonscan_gateway} | ||
TEST_ETHERSCAN_GATEWAY: ${test_etherscan_gateway} | ||
POLYGONSCAN_GATEWAY: ${polygonscan_gateway} | ||
ETHERSCAN_GATEWAY: ${etherscan_gateway} | ||
BSCSCAN_GATEWAY: ${bscscan_gateway} | ||
ASTAR_MAINNET_GATEWAY: ${astar_gateway} | ||
ASTAR_MAINNET_DIAMOND_FACTORY_ADDRESS: ${astar_diamond_factory_address} | ||
ASTAR_MAINNET_DIAMOND_MARKETPLACE_ADDRESS: ${astar_diamond_marketplace_address} | ||
SENTRY_DSN: ${sentry_dsn} | ||
BASE_RAIRNODE_URL: ${base_rairnode_url} | ||
MATIC_TESTNET_RPC: ${matic_testnet_rpc} | ||
MATIC_MAINNET_RPC: ${matic_mainnet_rpc} | ||
BINANCE_MAINNET_RPC: ${binance_mainnet_rpc} | ||
BINANCE_TESTNET_RPC: ${binance_testnet_rpc} | ||
ETHEREUM_MAINNET_RPC: ${ethereum_mainnet_rpc} | ||
ETHEREUM_TESTNET_SEPOLIA_RPC: ${ethereum_testnet_sepolia_rpc} | ||
ASTAR_MAINNET_RPC: ${astar_mainnet_rpc} | ||
REDIS_HOST: ${redisthhost} | ||
REDIS_PORT: ${redisport} | ||
ALCHEMY_API_KEY: ${alchemy_api_key} | ||
ports: | ||
- 5001:5001 | ||
depends_on: | ||
- rair-node | ||
- mongo | ||
networks: | ||
- rair-local | ||
rair-stream: | ||
container_name: 'rair-stream' | ||
build: | ||
context: rair-stream/ | ||
dockerfile: Dockerfile | ||
environment: | ||
PRODUCTION: "false" | ||
MEDIA_SERVICE_PORT: ${media_service_port} | ||
BASE_RAIRNODE_URL: ${base_rairnode_url} | ||
GCP_PROJECT_ID: ${gcp_project_id} | ||
GCP_IMAGE_BUCKET_NAME: ${gcp_image_bucket_name} | ||
GCP_VIDEO_BUCKET_NAME: ${gcp_video_bucket_name} | ||
GCP_CREDENTIALS: ${gcp_credentials} | ||
GCP_GATEWAY: ${gcp_gateway} | ||
USE_X509_CERT_AUTH: ${VAULT_MEDIA_SERVICE_use_x509_cert_auth} | ||
PINATA_KEY: ${pinata_key} | ||
PINATA_SECRET: ${pinata_secret} | ||
PINATA_GATEWAY: ${pinata_gateway} | ||
IPFS_SERVICE: ${ipfs_service} | ||
IPFS_GATEWAY: ${ipfs_gateway} | ||
IPFS_API: ${ipfs_api} | ||
MONGO_LOG_COLLECTION: ${mongo_log_collection} | ||
LOG_LEVEL: ${log_level} | ||
VAULT_URL: ${VAULT_URL} | ||
VAULT_MEDIA_SERVICE_APP_ROLE_ID: ${VAULT_MEDIA_SERVICE_APP_ROLE_ID} | ||
VAULT_MEDIA_SERVICE_APP_ROLE_SECRET_ID: ${VAULT_MEDIA_SERVICE_APP_ROLE_SECRET_ID} | ||
SENTRY_DSN: ${sentry_dsn} | ||
REDIS_HOST: ${redisthhost} | ||
REDIS_PORT: ${redisport} | ||
ports: | ||
- 5002:5002 | ||
networks: | ||
- rair-local | ||
rair-redis: | ||
container_name: "rair-redis" | ||
image: redis | ||
command: redis-server --appendonly yes | ||
restart: always | ||
ports: | ||
- 6379:6379 | ||
networks: | ||
- rair-local | ||
rair-front: | ||
container_name: rair-front | ||
build: | ||
context: rair-front | ||
dockerfile: Dockerfile.prod | ||
environment: | ||
VITE_SENTRY_ENABLED: ${sentry_enabled} | ||
VITE_SENTRY_IO_ENDPOINT: ${sentry_endpoint} | ||
VITE_SENTRY_IO_TRACE_RATE: ${sentry_trace_rate} | ||
VITE_SENTRY_RELEASE: ${sentry_release} | ||
VITE_GOOGLE_ANALYTICS: ${react-app-google-analytics} | ||
VITE_GA_NAME: ${react-app-ga-name} | ||
VITE_DISABLE_CREATOR_VIEWS: ${react-app-disable-creator-views} | ||
VITE_HOME_PAGE: / | ||
VITE_MATIC_MAIN_DIAMOND_FACTORY: ${matic_mainnet_diamond_factory_address} | ||
VITE_MATIC_MAIN_DIAMOND_MARKETPLACE: ${matic_mainnet_diamond_marketplace_address} | ||
VITE_NODE_SOCKET_URI: ${front_socket_uri} | ||
volumes: | ||
- ./rair-front/nginx/nginx.conf:/etc/nginx/nginx.conf | ||
- ./data/certbot/conf:/etc/letsencrypt | ||
- ./data/certbot/www:/var/www/certbot | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
networks: | ||
- rair-local | ||
depends_on: | ||
- rair-node | ||
mongo: | ||
container_name: mongo | ||
image: mongo | ||
restart: always | ||
volumes: | ||
- ./rair-node/dev/db-data:/data/db | ||
- ./rair-node/dev/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: ${localdbuser} | ||
MONGO_INITDB_ROOT_PASSWORD: ${localdbpass} | ||
MONGO_INITDB_DATABASE: rair-db | ||
ports: | ||
- 27017:27017 | ||
networks: | ||
- rair-local | ||
networks: | ||
rair-local: | ||
driver: bridge |
Oops, something went wrong.