-
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.
Browse files
Browse the repository at this point in the history
Feat/#141
- Loading branch information
Showing
101 changed files
with
4,523 additions
and
67 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,5 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"liveServer.settings.port": 5501 | ||
} |
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 @@ | ||
node_modules | ||
dist | ||
.env | ||
.env.dev |
File renamed without changes.
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
File renamed without changes.
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,9 @@ | ||
FROM node:16 | ||
|
||
WORKDIR /myfolder/ | ||
COPY ./package.json /myfolder/ | ||
COPY ./yarn.lock /myfolder/ | ||
RUN yarn install | ||
|
||
COPY . /myfolder/ | ||
CMD yarn start:dev |
File renamed without changes.
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,48 @@ | ||
version: '3.3' | ||
|
||
services: | ||
my_backend: | ||
platform: linux/x86_64 | ||
image: asia.gcr.io/artiful-a1/my_backend:1.9 | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
env_file: | ||
- ./.env.dev | ||
ports: | ||
- 3000:3000 | ||
volumes: | ||
- ./src:/myfolder/src | ||
|
||
my_database: | ||
platform: linux/x86_64 | ||
image: mysql:8.0.28 | ||
environment: | ||
MYSQL_DATABASE: 'ars' | ||
MYSQL_ROOT_PASSWORD: '3160' | ||
command: | ||
- --character-set-server=utf8mb4 | ||
- --collation-server=utf8mb4_unicode_ci | ||
- --skip-character-set-client-handshake | ||
cap_add: | ||
- SYS_NICE | ||
ports: | ||
- 3307:3306 | ||
|
||
my_redis: | ||
image: redis:6.2.6 | ||
ports: | ||
- 6379:6379 | ||
|
||
elasticsearch: | ||
image: elasticsearch:7.17.0 | ||
environment: | ||
discovery.type: single-node | ||
ports: | ||
- 9200:9200 | ||
|
||
logstash: | ||
image: logstash:7.17.0 | ||
volumes: | ||
- ./elk/logstash/logstash.conf:/usr/share/logstash/pipeline/logstash.conf | ||
- ./elk/logstash/mysql-connector-java-8.0.28.jar:/usr/share/logstash/mysql-connector-java-8.0.28.jar |
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,45 @@ | ||
version: '3.3' | ||
|
||
services: | ||
my_backend: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- 3000:3000 | ||
volumes: | ||
- ./src:/myfolder/src | ||
- ./.env:/myfolder/.env | ||
|
||
my_database: | ||
platform: linux/x86_64 | ||
image: mysql:8.0.28 | ||
environment: | ||
MYSQL_DATABASE: 'ars' | ||
MYSQL_ROOT_PASSWORD: '3160' | ||
command: | ||
- --character-set-server=utf8mb4 | ||
- --collation-server=utf8mb4_unicode_ci | ||
- --skip-character-set-client-handshake | ||
cap_add: | ||
- SYS_NICE | ||
ports: | ||
- 3306:3306 | ||
|
||
my_redis: | ||
image: redis:6.2.6 | ||
ports: | ||
- 6379:6379 | ||
|
||
elasticsearch: | ||
image: elasticsearch:7.17.0 | ||
environment: | ||
discovery.type: single-node | ||
ports: | ||
- 9200:9200 | ||
|
||
logstash: | ||
image: logstash:7.17.0 | ||
volumes: | ||
- ./elk/logstash/logstash.conf:/usr/share/logstash/pipeline/logstash.conf | ||
- ./elk/logstash/mysql-connector-java-8.0.28.jar:/usr/share/logstash/mysql-connector-java-8.0.28.jar |
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,32 @@ | ||
input { | ||
jdbc { | ||
jdbc_driver_library => "/usr/share/logstash/mysql-connector-java-8.0.28.jar" | ||
jdbc_driver_class => "com.mysql.cj.jdbc.Driver" | ||
jdbc_connection_string => "jdbc:mysql://my_database:3306/ars" | ||
jdbc_user => "root" | ||
jdbc_password => "3160" | ||
schedule => "* * * * *" | ||
|
||
use_column_value => true | ||
tracking_column => "updatedat" | ||
last_run_metadata_path => "./aaa.txt" | ||
|
||
tracking_column_type => "numeric" | ||
statement => "select art.id, title, start_price, instant_bid, thumbnail, createdAt, deletedAt, deadline, is_soldout, tag1, tag2, tag3, tag4, updatedat, u.nickname, unix_timestamp(art.updatedat) as updatedat from art left join user as u ON art.userId = u.id where unix_timestamp(art.updatedat) > :sql_last_value order by updatedat asc" | ||
} | ||
} | ||
|
||
filter { | ||
if [deletedat] { | ||
drop{} | ||
} | ||
} | ||
|
||
output { | ||
elasticsearch { | ||
hosts => "elasticsearch:9200" | ||
index => "artipul00" | ||
document_id => "%{id}" | ||
} | ||
stdout { } | ||
} |
Binary file not shown.
File renamed without changes.
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,9 @@ | ||
import { IoAdapter } from '@nestjs/platform-socket.io'; | ||
|
||
export class SocketIoAdapter extends IoAdapter { | ||
createIOServer(port: number, options?: any): any { | ||
const server = super.createIOServer(port, options); | ||
|
||
return server; | ||
} | ||
} |
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,43 @@ | ||
import { Module } from '@nestjs/common'; | ||
import { ElasticsearchModule } from '@nestjs/elasticsearch'; | ||
import { TypeOrmModule } from '@nestjs/typeorm'; | ||
import { ArtImage } from '../artImage/entities/artImage.entity'; | ||
import { Engage } from '../engage/entities/engage.entity'; | ||
import { EventGateway } from '../event/event.gateway'; | ||
import { EventModule } from '../event/event.module'; | ||
import { FileService } from '../file/file.service'; | ||
import { LikeArtService } from '../likeArt/likeArt.service'; | ||
import { Payment } from '../payment/entities/payment.entity'; | ||
import { PaymentService } from '../payment/payment.service'; | ||
import { User } from '../user/entities/user.entity'; | ||
import { ArtResolver } from './art.resolver'; | ||
import { ArtService } from './art.service'; | ||
import { Art } from './entities/art.entity'; | ||
import { ArtsSearch } from './entities/artsSearch.entity'; | ||
import { LikeArt } from './entities/likeArt.entity'; | ||
|
||
@Module({ | ||
imports: [ | ||
TypeOrmModule.forFeature([ | ||
Art, // | ||
ArtImage, | ||
LikeArt, | ||
User, | ||
Payment, | ||
Engage, | ||
ArtsSearch, | ||
]), | ||
ElasticsearchModule.register({ | ||
node: 'http://elasticsearch:9200', | ||
}), | ||
EventModule, | ||
], | ||
providers: [ | ||
ArtResolver, // | ||
ArtService, | ||
FileService, | ||
LikeArtService, | ||
PaymentService, | ||
], | ||
}) | ||
export class ArtModule {} |
Oops, something went wrong.