-
Notifications
You must be signed in to change notification settings - Fork 2
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 #39 from Gearonix/develop
merge(develop): updates
- Loading branch information
Showing
215 changed files
with
5,144 additions
and
3,946 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.override.env |
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,24 @@ | ||
version: '3.9' | ||
|
||
services: | ||
workspace: | ||
build: | ||
dockerfile: .docker/dockerfile/dev.Dockerfile | ||
context: . | ||
restart: always | ||
profiles: | ||
- workspace | ||
env_file: | ||
- .env | ||
- .docker/.override.env | ||
volumes: | ||
- ./apps:/opt/app/apps | ||
- ./packages:/opt/app/packages | ||
- /opt/app/node_modules | ||
container_name: workspace | ||
networks: | ||
- cgnet | ||
entrypoint: sh entrypoint.sh | ||
ports: | ||
- 3000:3000 | ||
- 6868:6868 |
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,47 @@ | ||
version: '3.9' | ||
|
||
services: | ||
client: | ||
build: | ||
dockerfile: apps/client/Dockerfile | ||
context: . | ||
container_name: client | ||
restart: always | ||
env_file: | ||
- .env | ||
- .docker/.override.env | ||
networks: | ||
- cgnet | ||
ports: | ||
- 3000:80 | ||
|
||
gateway: | ||
build: | ||
dockerfile: apps/server/gateway/Dockerfile | ||
context: . | ||
container_name: gateway | ||
depends_on: | ||
- kafka | ||
- mysql | ||
networks: | ||
- cgnet | ||
ports: | ||
- 6868:6868 | ||
restart: always | ||
env_file: | ||
- .env | ||
- .docker/.override.env | ||
|
||
service-code-executor: | ||
build: | ||
dockerfile: apps/server/service-code-executor/Dockerfile | ||
context: . | ||
container_name: service-code-executor | ||
depends_on: | ||
- kafka | ||
networks: | ||
- cgnet | ||
restart: always | ||
env_file: | ||
- .env | ||
- .docker/.override.env |
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,59 @@ | ||
version: '3.9' | ||
|
||
services: | ||
mysql: | ||
image: mysql:latest | ||
restart: always | ||
container_name: db | ||
networks: | ||
- cgnet | ||
ports: | ||
- 3306:3306 | ||
volumes: | ||
- ./data:/var/lib/mysql | ||
- ./tools/database:/docker-entrypoint-initdb.d | ||
env_file: | ||
- .env | ||
- .docker/.override.env | ||
|
||
zookeeper: | ||
image: confluentinc/cp-zookeeper:latest | ||
container_name: zookeeper | ||
networks: | ||
- cgnet | ||
env_file: | ||
- .env | ||
- .docker/.override.env | ||
ports: | ||
- 22181:2181 | ||
|
||
kafka: | ||
image: confluentinc/cp-kafka:latest | ||
container_name: kafka | ||
hostname: kafka | ||
networks: | ||
- cgnet | ||
depends_on: | ||
- zookeeper | ||
ports: | ||
- 29092:29092 | ||
env_file: | ||
- .env | ||
- .docker/.override.env | ||
|
||
kafka_ui: | ||
image: provectuslabs/kafka-ui:latest | ||
container_name: kafka-ui | ||
networks: | ||
- cgnet | ||
depends_on: | ||
- kafka | ||
ports: | ||
- 8080:8080 | ||
env_file: | ||
- .env | ||
- .docker/.override.env | ||
|
||
networks: | ||
cgnet: | ||
driver: bridge |
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,37 @@ | ||
#/** | ||
# * This docker file is used only in development mode | ||
# * It runs all processes, microservices and libraries | ||
# * in one large container so as not to take up a lot of | ||
# * space. Hot reload enabled. | ||
# */ | ||
|
||
FROM --platform=linux/amd64 node:20.8.0-alpine as build | ||
WORKDIR /opt/app | ||
|
||
## Installing dependencies ## | ||
|
||
COPY package.json yarn.lock .yarnrc.yml ./ | ||
COPY .yarn .yarn | ||
|
||
COPY packages/config/package.json packages/config/package.json | ||
|
||
RUN yarn install | ||
|
||
## Copying source code ## | ||
|
||
COPY packages packages | ||
|
||
COPY apps apps | ||
|
||
RUN yarn install | ||
|
||
COPY . . | ||
|
||
## Copying entrypoint scripts ## | ||
|
||
COPY .docker/sh/entrypoint.dev.sh entrypoint.sh | ||
|
||
|
||
RUN chmod +x entrypoint.sh; | ||
|
||
RUN echo "done." |
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,64 @@ | ||
{ | ||
"name": "docker", | ||
"$schema": "node_modules/nx/schemas/project-schema.json", | ||
"targets": { | ||
"run:dev": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"command": "docker compose -f .docker/compose/docker-compose.services.yml -f .docker/compose/docker-compose.dev.yml --project-directory . up -d" | ||
}, | ||
"dependsOn": ["update:dev"] | ||
}, | ||
"run:dev:workspace": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"command": "docker compose -f .docker/compose/docker-compose.services.yml -f .docker/compose/docker-compose.dev.yml --project-directory . --profile workspace up -d" | ||
}, | ||
"dependsOn": ["update:dev:workspace"] | ||
}, | ||
"run:prod": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"command": "docker compose -f .docker/compose/docker-compose.services.yml -f .docker/compose/docker-compose.prod.yml --project-directory . up -d" | ||
}, | ||
"dependsOn": ["update:prod"] | ||
}, | ||
"update:dev": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"command": "docker compose -f .docker/compose/docker-compose.services.yml -f .docker/compose/docker-compose.dev.yml --project-directory . --progress plain build" | ||
} | ||
}, | ||
"update:dev:workspace": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"command": "docker compose -f .docker/compose/docker-compose.services.yml -f .docker/compose/docker-compose.dev.yml --project-directory . --profile workspace --progress plain build" | ||
} | ||
}, | ||
"update:prod": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"command": "docker compose -f .docker/compose/docker-compose.services.yml -f .docker/compose/docker-compose.prod.yml --project-directory . --progress plain build" | ||
} | ||
}, | ||
"down:dev": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"commands": [ | ||
"docker compose -f .docker/compose/docker-compose.services.yml -f .docker/compose/docker-compose.dev.yml --project-directory . --profile full down", | ||
"docker ps" | ||
] | ||
} | ||
}, | ||
"down:prod": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"commands": [ | ||
"docker compose -f .docker/compose/docker-compose.services.yml -f .docker/compose/docker-compose.prod.yml --project-directory . down", | ||
"docker ps" | ||
] | ||
} | ||
} | ||
}, | ||
"tags": ["docker"] | ||
} |
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,5 @@ | ||
#!/bin/bash | ||
|
||
yarn nx run gateway:prisma:init | ||
|
||
yarn nx serve --host=0.0.0.0 |
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,21 @@ | ||
dist | ||
tmp | ||
node_modules | ||
.idea | ||
.husky | ||
.editorconfig | ||
.lintstagedrc | ||
commitlint.config.js | ||
CHANGELOG.md | ||
LICENSE | ||
README.md | ||
jest.config.ts | ||
jest.preset.js | ||
local | ||
data | ||
tmp | ||
.github | ||
.gitignore | ||
.gitattributes | ||
.yarn/cache | ||
.yarn/install-state.gz |
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ node_modules | |
/.idea | ||
local | ||
*.env | ||
data |
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,34 @@ | ||
FROM --platform=linux/amd64 node:20.8.0-alpine as build | ||
WORKDIR /opt/app | ||
|
||
## Installing dependencies ## | ||
|
||
COPY package.json yarn.lock .yarnrc.yml ./ | ||
COPY .yarn .yarn | ||
|
||
COPY packages/config/package.json packages/config/package.json | ||
|
||
RUN yarn install | ||
|
||
## Copying source code ## | ||
|
||
COPY apps/client apps/client | ||
|
||
COPY packages packages | ||
|
||
RUN yarn install | ||
|
||
COPY . . | ||
|
||
## Building app to produciton ## | ||
|
||
RUN yarn nx run client:build | ||
|
||
## Nginx setup ## | ||
|
||
FROM nginx:1.24-alpine | ||
|
||
COPY --from=build /opt/app/dist/apps/client /usr/share/nginx/html | ||
COPY ./apps/client/nginx.conf /etc/nginx/conf.d/default.conf | ||
|
||
EXPOSE 80 |
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,14 @@ | ||
server { | ||
listen 80; | ||
root /usr/share/nginx/html; | ||
|
||
location / { | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
error_page 404 /index.html; | ||
location = /404 { | ||
return 404; | ||
} | ||
} |
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,4 @@ | ||
module.exports = { | ||
extends: ['../../.eslintrc.js'], | ||
ignorePatterns: ['!**/*', '.vitepress/cache'] | ||
} |
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 @@ | ||
.vitepress/cache |
Oops, something went wrong.