Skip to content

Commit

Permalink
Init project
Browse files Browse the repository at this point in the history
  • Loading branch information
hiveer committed Jan 12, 2024
1 parent 2fb738f commit 9e91754
Show file tree
Hide file tree
Showing 309 changed files with 17,493 additions and 248 deletions.
4 changes: 4 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SUPER_USERS=17708176693,17708176692
LEAD_SOURCES=Events,Others,Digital,Content
ON_PREMISE=true
SENSITIVE_CHECK=false
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
/tmp/**/*.keep
!/log/.keep
!/tmp/.keep

Expand All @@ -32,3 +33,23 @@

/app/assets/builds/*
!/app/assets/builds/.keep

.vite/
docker-compose-staging.yml
docker-compose-production.yml

/node_modules

yarn-error.log
**/*.icloud
**/.DS_Store

/.idea

config/database.yml

coverage/

config/credentials.yml.enc.backup
config/master.key.main
config/master.key.starhub
32 changes: 32 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
image: docker:24.0.6

include:
- template: Security/Secret-Detection.gitlab-ci.yml

variables:
CI_USER: $GITLAB_USER
CI_TOKEN: $GITLAB_USER_TOKEN_HIVEER
GIT_DEPTH: 100

stages:
- test
- build

# 判断是不是正确的project,正确的branch,以及是不是forked repo过来的MR
.if-starhub-main-original-repo: &if-starhub-main-original-repo
if: '$CI_COMMIT_REF_NAME == "starhub-main" && $CI_PROJECT_ID == "32" && $CI_MERGE_REQUEST_SOURCE_PROJECT_ID == null'

starhub-build:
stage: build
services:
- docker:24.0.6-dind
tags:
- linux-medium-amd64
rules:
- <<: *if-starhub-main-original-repo
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
script:
- docker login $CI_REGISTRY -u $CI_USER -p $CI_TOKEN
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ruby 3.2.2
nodejs 18.6.0
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM git-devops.opencsg.com:5050/product/community/open-portal/ruby-node

SHELL ["/bin/bash", "-c"]
RUN mkdir /myapp
WORKDIR /myapp
ADD . /myapp
RUN yarn config set registry 'https://mirrors.huaweicloud.com/repository/npm/'
RUN yarn install
RUN bundle install
54 changes: 42 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "https://rubygems.org"
source 'https://gems.ruby-china.com/'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "3.2.2"
Expand All @@ -15,18 +15,9 @@ gem "pg", "~> 1.1"
# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"

# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem "importmap-rails"

# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem "turbo-rails"

# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem "stimulus-rails"

# Use Tailwind CSS [https://github.com/rails/tailwindcss-rails]
gem "tailwindcss-rails"

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem "jbuilder"

Expand All @@ -37,7 +28,7 @@ gem "jbuilder"
# gem "kredis"

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"
gem "bcrypt", "~> 3.1.7"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
Expand All @@ -49,11 +40,48 @@ gem "bootsnap", require: false
# gem "sassc-rails"

# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
# gem "image_processing", "~> 1.2"
gem "image_processing", "~> 1.2"

gem "authing_ruby"
gem "jwt"

# Aliyun OSS SDK
gem 'aliyun-sdk'

gem 'activestorage-aliyun'

# aws s3
gem 'aws-sdk-s3', '~> 1'

gem 'faraday'
gem 'typhoeus'

# pagination
gem 'kaminari'

gem "jsbundling-rails", "~> 1.2"

gem "tailwindcss-rails", "~> 2.0"

gem "administrate", "~> 0.19.0"
# support active storage
gem 'administrate-field-active_storage'
gem 'administrate_exportable'

gem "pundit", "~> 2.3"

gem "ruby-pinyin", "~> 0.5.0"

gem 'openid_connect'

gem 'administrate-field-jsonb'

group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem 'rspec-rails'
gem "debug", platforms: %i[ mri mingw x64_mingw ]
gem 'dotenv-rails'
gem 'factory_bot_rails'
end

group :development do
Expand All @@ -72,4 +100,6 @@ group :test do
gem "capybara"
gem "selenium-webdriver"
gem "webdrivers"
gem 'shoulda-matchers', '~> 5.0'
gem 'simplecov'
end
Loading

0 comments on commit 9e91754

Please sign in to comment.