Skip to content

Commit

Permalink
Use our private node for prod
Browse files Browse the repository at this point in the history
  • Loading branch information
olehmell committed Aug 22, 2023
1 parent 1a33a4e commit f246d29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
GH_NEXT_PUBLIC_SQUID_URL=https://squid.subsquid.io/xsocial/graphql
GH_NEXT_PUBLIC_COMMUNITY_HUB_ID=1030
GH_NEXT_PUBLIC_GA_ID=G-FT28TL1W3M
GH_IPFS_PIN_URL=https://pin.crustcloud.io/psa
GH_IPFS_PIN_URL=http://new-ipfs-cluster:9094
GH_CRUST_IPFS_AUTH=${{ secrets.CRUST_IPFS_AUTH }}
GH_SUBSOCIAL_PROMO_SECRET_HEX=${{ secrets.SUBSOCIAL_PROMO_SECRET_HEX }}
GH_USER_ID_SALT=${{ secrets.USER_ID_SALT }}
Expand Down
7 changes: 3 additions & 4 deletions src/server/ipfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { SubsocialIpfsApi } from '@subsocial/api'

export function getIpfsApi() {
const CRUST_IPFS_CONFIG = {
ipfsNodeUrl: 'https://gw-seattle.crustcloud.io',
ipfsNodeUrl: 'http://new-ipfs-cluster:5001',
ipfsClusterUrl: getIpfsPinUrl(),
}
const headers = { authorization: `Bearer ${getCrustIpfsAuth()}` }
Expand All @@ -24,9 +24,8 @@ export function getIpfsApi() {
// await ipfs.pinContent(cid, { 'meta.gatewayId': 1 })
return cid?.toString() ?? ''
},
saveAndPinImage: async (content: any) => {
// const cid = await ipfs.saveFileToOffchain(content as any)!
const cid = await ipfs.saveFile(content)
saveAndPinImage: async (file: any) => {
const cid = await ipfs.saveFile(file)
await ipfs.pinContent(cid, { 'meta.gatewayId': 1 })
return cid?.toString() ?? ''
},
Expand Down

0 comments on commit f246d29

Please sign in to comment.