Skip to content

Commit

Permalink
Merge pull request #52 from aura-nw/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
harisato authored Aug 29, 2024
2 parents f5a5a08 + 12ac71b commit 39dbea5
Show file tree
Hide file tree
Showing 112 changed files with 2,530 additions and 226 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ COPY package.json yarn.lock ./

RUN yarn install --ignore-scripts
RUN yarn add mmmagic
RUN yarn add sharp@^0.33.4 --ignore-engines
RUN yarn global add pm2

COPY . .
Expand Down
9 changes: 5 additions & 4 deletions docker-compose-authorizer.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: '3.6'
services:
authorizer:
image: ghcr.io/aura-nw/authorizer:0.1.22.4
# image: quochai194/authorizer:0.1.20.8
# image: ghcr.io/aura-nw/authorizer:0.1.22.4
image: quochai194/authorizer:0.1.23
# image: lakhansamani/authorizer:1.1.50
restart: always
ports:
Expand All @@ -18,10 +18,11 @@ services:
ADMIN_SECRET: BtfpvmBDJ8b3SGsw
ORGANIZATION_NAME: AuraNetwork
ORGANIZATION_LOGO: 'https://aura-explorer-assets.s3.ap-southeast-1.amazonaws.com/aura.png'
ROLES: user,creator,admin
DEFAULT_ROLES: user
PROTECTED_ROLES: admin
PROTECTED_ROLES: creator,admin
ACCESS_TOKEN_EXPIRY_TIME: 3h
CUSTOM_ACCESS_TOKEN_SCRIPT: function(user,tokenPayload) {var data = tokenPayload; data['https://hasura.io/jwt/claims'] = {'x-hasura-user-id':user.id,'x-hasura-default-role':tokenPayload.allowed_roles[0], 'x-hasura-allowed-roles':user.roles }; return data;}
CUSTOM_ACCESS_TOKEN_SCRIPT: function(user,tokenPayload) {var data = tokenPayload; data['https://hasura.io/jwt/claims'] = {'x-hasura-user-id':user.id,'x-hasura-default-role':tokenPayload.allowed_roles[0], 'x-hasura-allowed-roles':user.roles, 'x-hasura-user-email':user.email }; return data;}
ZALO_APP_ID: 2318977898294005000
ZALO_APP_SECRET: JmS4L81B99c5cp2sbnSw
PORT: 8090
Expand Down
11 changes: 11 additions & 0 deletions hasura/metadata/databases/punkga-pg/tables/public_albums.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
table:
name: albums
schema: public
array_relationships:
- name: artworks
using:
foreign_key_constraint_on:
column: album_id
table:
name: artworks
schema: public
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
table:
name: artworks
schema: public
object_relationships:
- name: album
using:
foreign_key_constraint_on: album_id
select_permissions:
- role: anonymous
permission:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ object_relationships:
table:
name: user_wallet
schema: public
- name: creator
using:
manual_configuration:
column_mapping:
email: email
insertion_order: null
remote_table:
name: creators
schema: public
array_relationships:
- name: authorizer_users_social_activities
using:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
table:
name: chapter_collection
schema: public
object_relationships:
- name: chapter_collection
using:
foreign_key_constraint_on: launchpad_id
- name: collection_chapter
using:
foreign_key_constraint_on: chapter_id
select_permissions:
- role: anonymous
permission:
columns:
- chapter_id
- id
- launchpad_id
- created_at
- updated_at
filter: {}
allow_aggregations: true
- role: user
permission:
columns:
- chapter_id
- id
- launchpad_id
- created_at
- updated_at
filter: {}
allow_aggregations: true
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ object_relationships:
using:
foreign_key_constraint_on: manga_id
array_relationships:
- name: chapter_collections
using:
foreign_key_constraint_on:
column: chapter_id
table:
name: chapter_collection
schema: public
- name: chapter_languages
using:
foreign_key_constraint_on:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ array_relationships:
table:
name: artworks
schema: public
- name: contest_i18ns
using:
foreign_key_constraint_on:
column: contest_id
table:
name: i18n
schema: public
- name: contest_mangas
using:
foreign_key_constraint_on:
Expand All @@ -20,6 +27,7 @@ select_permissions:
- role: anonymous
permission:
columns:
- isLive
- id
- slug
- created_at
Expand All @@ -31,6 +39,7 @@ select_permissions:
- role: user
permission:
columns:
- isLive
- id
- slug
- created_at
Expand Down
27 changes: 27 additions & 0 deletions hasura/metadata/databases/punkga-pg/tables/public_creators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,30 @@ select_permissions:
filter: {}
limit: 20
allow_aggregations: true
update_permissions:
- role: creator
permission:
columns:
- isActive
- id
- subcribers
- socials
- avatar_url
- bio
- dob
- email
- gender
- name
- pen_name
- slug
- wallet_address
- created_at
- updated_at
filter:
email:
_eq: X-Hasura-User-Email
check: null
delete_permissions:
- role: creator
permission:
filter: {}
6 changes: 6 additions & 0 deletions hasura/metadata/databases/punkga-pg/tables/public_i18n.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ select_permissions:
- role: anonymous
permission:
columns:
- banner_id
- campaign_id
- contest_id
- id
- language_id
- launchpad_id
- quest_id
- data
- created_at
Expand All @@ -20,9 +23,12 @@ select_permissions:
- role: user
permission:
columns:
- banner_id
- campaign_id
- contest_id
- id
- language_id
- launchpad_id
- quest_id
- data
- created_at
Expand Down
7 changes: 7 additions & 0 deletions hasura/metadata/databases/punkga-pg/tables/public_manga.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ array_relationships:
table:
name: chapters
schema: public
- name: manga_collections
using:
foreign_key_constraint_on:
column: manga_id
table:
name: manga_collection
schema: public
- name: manga_creators
using:
foreign_key_constraint_on:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
table:
name: manga_collection
schema: public
object_relationships:
- name: collection_manga
using:
foreign_key_constraint_on: manga_id
- name: manga_collection
using:
foreign_key_constraint_on: launchpad_id
select_permissions:
- role: anonymous
permission:
columns:
- id
- launchpad_id
- manga_id
- created_at
- updated_at
filter: {}
allow_aggregations: true
- role: user
permission:
columns:
- id
- launchpad_id
- manga_id
- created_at
- updated_at
filter: {}
allow_aggregations: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
table:
name: telegram_users
schema: public
object_relationships:
- name: authorizer_user
using:
foreign_key_constraint_on: user_id
4 changes: 4 additions & 0 deletions hasura/metadata/databases/punkga-pg/tables/tables.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
- "!include public_albums.yaml"
- "!include public_artworks.yaml"
- "!include public_authorizer_sessions.yaml"
- "!include public_authorizer_users.yaml"
- "!include public_authorizer_verification_requests.yaml"
- "!include public_banners.yaml"
- "!include public_campaign.yaml"
- "!include public_chains.yaml"
- "!include public_chapter_collection.yaml"
- "!include public_chapter_languages.yaml"
- "!include public_chapter_total_likes.yaml"
- "!include public_chapters.yaml"
Expand All @@ -16,6 +18,7 @@
- "!include public_launchpad.yaml"
- "!include public_likes.yaml"
- "!include public_manga.yaml"
- "!include public_manga_collection.yaml"
- "!include public_manga_creator.yaml"
- "!include public_manga_languages.yaml"
- "!include public_manga_tag.yaml"
Expand All @@ -31,6 +34,7 @@
- "!include public_system_key.yaml"
- "!include public_tag_languages.yaml"
- "!include public_tags.yaml"
- "!include public_telegram_users.yaml"
- "!include public_user_campaign.yaml"
- "!include public_user_campaign_reward.yaml"
- "!include public_user_level.yaml"
Expand Down
Loading

0 comments on commit 39dbea5

Please sign in to comment.