-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
small change to work with private api
- Loading branch information
1 parent
3464d2f
commit 91f2dfd
Showing
19 changed files
with
996 additions
and
992 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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
EMAIL_FROM = | ||
EMAIL_TIPOFF = | ||
SMTP_PASSWORD = | ||
SMTP_PORT = | ||
SMTP_SERVER = | ||
JMOD_TAG = | ||
|
||
SERVER_LOGIN = | ||
SERVER_PASSWORD = | ||
SERVER_ADDRESS = | ||
DATABASE = | ||
|
||
GRAVEYARD_WEBHOOK = | ||
CONSUMER_KEY = | ||
CONSUMER_SECRET = | ||
BEARER_TOKEN = | ||
ACCESS_TOKEN = | ||
ACCESS_TOKEN_SECRET = | ||
EMAIL_FROM = | ||
EMAIL_TIPOFF = | ||
SMTP_PASSWORD = | ||
SMTP_PORT = | ||
SMTP_SERVER = | ||
JMOD_TAG = | ||
SERVER_LOGIN = | ||
SERVER_PASSWORD = | ||
SERVER_ADDRESS = | ||
DATABASE = | ||
GRAVEYARD_WEBHOOK = | ||
CONSUMER_KEY = | ||
CONSUMER_SECRET = | ||
BEARER_TOKEN = | ||
ACCESS_TOKEN = | ||
ACCESS_TOKEN_SECRET = | ||
PATRON_WEBHOOK = |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
.env | ||
venv/linux/* | ||
venv/windows/* | ||
|
||
__pycache__/ | ||
Reports/ | ||
|
||
error.log | ||
.env | ||
venv/linux/* | ||
venv/windows/* | ||
|
||
__pycache__/ | ||
Reports/ | ||
|
||
error.log |
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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: Current File", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal", | ||
"justMyCode": true | ||
}, | ||
{ | ||
"name": "Run main", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "src/main.py", | ||
"console": "integratedTerminal", | ||
"justMyCode": true | ||
} | ||
] | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: Current File", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal", | ||
"justMyCode": true | ||
}, | ||
{ | ||
"name": "Run main", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "src/main.py", | ||
"console": "integratedTerminal", | ||
"justMyCode": true | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter" | ||
}, | ||
"python.formatting.provider": "none" | ||
{ | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter" | ||
}, | ||
"python.formatting.provider": "none" | ||
} |
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
FROM python:3.10-slim | ||
|
||
# Keeps Python from generating .pyc files in the container | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
|
||
# Turns off buffering for easier container logging | ||
ENV PYTHONUNBUFFERED=1 | ||
|
||
# set the working directory | ||
WORKDIR /project | ||
|
||
# install dependencies | ||
COPY ./requirements.txt /project | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# copy the scripts to the folder | ||
COPY ./src /project/src | ||
|
||
# Creates a non-root user with an explicit UID and adds permission to access the /project folder | ||
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /project | ||
USER appuser | ||
|
||
FROM python:3.10-slim | ||
|
||
# Keeps Python from generating .pyc files in the container | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
|
||
# Turns off buffering for easier container logging | ||
ENV PYTHONUNBUFFERED=1 | ||
|
||
# set the working directory | ||
WORKDIR /project | ||
|
||
# install dependencies | ||
COPY ./requirements.txt /project | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# copy the scripts to the folder | ||
COPY ./src /project/src | ||
|
||
# Creates a non-root user with an explicit UID and adds permission to access the /project folder | ||
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /project | ||
USER appuser | ||
|
||
CMD [ "python", "src/main.py" ] |
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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: bd-automations | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: bd-automations | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: bd-automations | ||
spec: | ||
containers: | ||
- name: bd-automations | ||
image: hub.osrsbotdetector.com/bot-detector/bd-automations:latest | ||
imagePullPolicy: Always | ||
resources: | ||
limits: | ||
cpu: "500m" | ||
memory: "750Mi" | ||
imagePullSecrets: | ||
- name: regcred | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: bd-automations | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: bd-automations | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: bd-automations | ||
spec: | ||
containers: | ||
- name: bd-automations | ||
image: hub.osrsbotdetector.com/bot-detector/bd-automations:latest | ||
imagePullPolicy: Always | ||
resources: | ||
limits: | ||
cpu: "500m" | ||
memory: "750Mi" | ||
imagePullSecrets: | ||
- name: regcred |
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 |
---|---|---|
@@ -1,68 +1,68 @@ | ||
version: '3' | ||
services: | ||
automation: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
container_name: bd-automation | ||
env_file: | ||
- .env | ||
networks: | ||
- botdetector-network | ||
depends_on: | ||
- kafka | ||
- api | ||
- mysql | ||
mysql: | ||
build: | ||
context: ../bot-detector-mysql | ||
dockerfile: Dockerfile | ||
image: bot-detector/bd-mysql:latest | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=root_bot_buster | ||
- MYSQL_USER=botssuck | ||
- MYSQL_PASSWORD=botdetector | ||
volumes: | ||
- ../bot-detector-mysql/mount:/var/lib/mysql | ||
- '../bot-detector-mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d' | ||
ports: | ||
- 3306:3306 | ||
networks: | ||
- botdetector-network | ||
api: | ||
build: | ||
context: ../Bot-Detector-Core-Files/ | ||
dockerfile: Dockerfile | ||
target: base | ||
args: | ||
root_path: / | ||
api_port: 5000 | ||
command: uvicorn src.core.server:app --host 0.0.0.0 --reload --reload-include src/* | ||
container_name: bd-dev-api | ||
environment: | ||
- sql_uri=mysql+asyncmy://root:root_bot_buster@mysql:3306/playerdata | ||
- discord_sql_uri=mysql+asyncmy://root:root_bot_buster@mysql:3306/discord | ||
- token=verify_ban | ||
volumes: | ||
- ../Bot-Detector-Core-Files/src:/project/src:rw | ||
ports: | ||
- 5000:5000 | ||
networks: | ||
- botdetector-network | ||
depends_on: | ||
- mysql | ||
kafka: | ||
image: bitnami/kafka:latest | ||
environment: | ||
- ALLOW_PLAINTEXT_LISTENER=yes | ||
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094 | ||
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT | ||
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094 | ||
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true | ||
ports: | ||
- 9094:9094 | ||
networks: | ||
- botdetector-network | ||
|
||
networks: | ||
botdetector-network: | ||
version: '3' | ||
services: | ||
automation: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
container_name: bd-automation | ||
env_file: | ||
- .env | ||
networks: | ||
- botdetector-network | ||
depends_on: | ||
- kafka | ||
- api | ||
- mysql | ||
mysql: | ||
build: | ||
context: ../bot-detector-mysql | ||
dockerfile: Dockerfile | ||
image: bot-detector/bd-mysql:latest | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=root_bot_buster | ||
- MYSQL_USER=botssuck | ||
- MYSQL_PASSWORD=botdetector | ||
volumes: | ||
- ../bot-detector-mysql/mount:/var/lib/mysql | ||
- '../bot-detector-mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d' | ||
ports: | ||
- 3306:3306 | ||
networks: | ||
- botdetector-network | ||
api: | ||
build: | ||
context: ../Bot-Detector-Core-Files/ | ||
dockerfile: Dockerfile | ||
target: base | ||
args: | ||
root_path: / | ||
api_port: 5000 | ||
command: uvicorn src.core.server:app --host 0.0.0.0 --reload --reload-include src/* | ||
container_name: bd-dev-api | ||
environment: | ||
- sql_uri=mysql+asyncmy://root:root_bot_buster@mysql:3306/playerdata | ||
- discord_sql_uri=mysql+asyncmy://root:root_bot_buster@mysql:3306/discord | ||
- token=verify_ban | ||
volumes: | ||
- ../Bot-Detector-Core-Files/src:/project/src:rw | ||
ports: | ||
- 5000:5000 | ||
networks: | ||
- botdetector-network | ||
depends_on: | ||
- mysql | ||
kafka: | ||
image: bitnami/kafka:latest | ||
environment: | ||
- ALLOW_PLAINTEXT_LISTENER=yes | ||
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094 | ||
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT | ||
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094 | ||
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true | ||
ports: | ||
- 9094:9094 | ||
networks: | ||
- botdetector-network | ||
|
||
networks: | ||
botdetector-network: |
Oops, something went wrong.