Skip to content

Commit

Permalink
Add Cloudmos projects
Browse files Browse the repository at this point in the history
  • Loading branch information
baktun14 committed Aug 15, 2023
1 parent e00027a commit 9d53822
Show file tree
Hide file tree
Showing 772 changed files with 179,784 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**/node_modules
**/data
**/npm-debug.log
**/.git
**/.env
*.md
build.ps1
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
29 changes: 29 additions & 0 deletions .github/workflows/docker-build-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: API CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Check for changes
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
api:
- 'api/**'
shared:
- 'shared/**'
- name: Build the Docker image for API
if: steps.filter.outputs.api == 'true' || steps.filter.outputs.shared == 'true'
run: docker build . --file ./api/Dockerfile
27 changes: 27 additions & 0 deletions .github/workflows/docker-build-deploy-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy Web CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Check for changes in deploy-web folder
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
deploy-web:
- 'deploy-web/**'
- name: Build the Docker image
if: steps.filter.outputs.deploy-web == 'true'
run: docker build ./deploy-web/
29 changes: 29 additions & 0 deletions .github/workflows/docker-build-indexer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Indexer CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Check for changes
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
indexer:
- 'indexer/**'
shared:
- 'shared/**'
- name: Build the Docker image
if: steps.filter.outputs.indexer == 'true' || steps.filter.outputs.shared == 'true'
run: docker build . --file ./indexer/Dockerfile
27 changes: 27 additions & 0 deletions .github/workflows/docker-build-landing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Landing CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Check for changes
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
landing:
- 'landing/**'
- name: Build the Docker image for LANDING
if: steps.filter.outputs.landing == 'true'
run: docker build . --file ./landing/Dockerfile
27 changes: 27 additions & 0 deletions .github/workflows/docker-build-provider-proxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Provider Proxy CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Check for changes
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
provider-proxy:
- 'provider-proxy/**'
- name: Build the Docker image
if: steps.filter.outputs.provider-proxy == 'true'
run: docker build ./provider-proxy/
101 changes: 101 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# Next.js build output
.next
out
dist

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# Scripts
build.ps1

# Data Folder
data
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"files.exclude": {
"**/api/data/": true,
"**/node_modules": true
}
}
17 changes: 17 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Cloudmos Monorepo

## Projects

- [Explorer](/explorer/README.md) - Website API + NextJS frontend
- [Indexer](/indexer/) - The main indexer process
- [Shared](/shared/) - Shared project

## Create docker images

`./build.ps1 (web|api|indexer|notifications) [version] [-deploy]`

The image version can be set by passing a second arguments or by using the `-version` parameter. If it is not specified it will be parsed from the `package.json`.

If the `-deploy` flag is set, the vm instance will be updated to the new version. There will be a downtime of ~2min while the vm restarts. **Only works for the API.**

The script will use the docker username of the current user (parsed from the `docker-credential-desktop list` command).
Loading

0 comments on commit 9d53822

Please sign in to comment.