-
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.
* Add Docker file * Add launch.json * Remove old JS files * Update dependencies while we're here
- Loading branch information
1 parent
407a282
commit ff3f258
Showing
48 changed files
with
2,554 additions
and
3,155 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,3 @@ | ||
/.vscode | ||
/node_modules | ||
**/*.js |
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,29 +1,50 @@ | ||
{ | ||
"env": { | ||
"commonjs": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": "latest" | ||
}, | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
} | ||
"env": { | ||
"commonjs": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": "latest" | ||
}, | ||
"rules": { | ||
"array-callback-return": "error", | ||
"no-await-in-loop": "error", | ||
"no-duplicate-imports": "error", | ||
"no-self-compare": "error", | ||
"no-unmodified-loop-condition": "error", | ||
"no-unreachable-loop": "error", | ||
"no-use-before-define": "error", | ||
"require-atomic-updates": "error", | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"complexity": [ | ||
"error", | ||
100 | ||
], | ||
"prefer-destructuring": [ | ||
"error", | ||
{ | ||
"AssignmentExpression": { | ||
"array": false | ||
} | ||
} | ||
], | ||
"eqeqeq": "error" | ||
} | ||
} |
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
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 @@ | ||
name: Docker CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: mainserver-pez | ||
env: | ||
configfile: ${{ secrets.CONFIGFILE }} | ||
responsesfile: ${{ secrets.RESPONSESFILE }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Update containers | ||
run: docker compose pull | ||
|
||
- name: Build application | ||
run: docker compose build | ||
|
||
- name: Spin up containers | ||
run: docker compose up -d |
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,12 @@ | ||
# VSCode | ||
/.vscode | ||
jsonconfig.json | ||
|
||
# Project Files | ||
/src/configs/*.json | ||
!/src/configs/dist.*.json | ||
latest-error.log | ||
|
||
# NPM | ||
/node_modules | ||
/configs/*.json | ||
latest-error.log | ||
package-lock.json | ||
|
||
# TSC | ||
/dist | ||
/src/**/*.js |
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,33 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
// Recommended setup for running the bot in the debugger | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Build & Start Bot", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"env": { | ||
"environment": "development" | ||
}, | ||
"preLaunchTask": "npm: build", | ||
"program": "index.js", | ||
"cwd": "${workspaceFolder}/dist" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Start Bot", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"env": { | ||
"environment": "development" | ||
}, | ||
"program": "index.js", | ||
"cwd": "${workspaceFolder}/dist" | ||
}, | ||
] | ||
} |
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,13 @@ | ||
FROM node:19.7.0 | ||
WORKDIR /usr/src/voraphiliac | ||
COPY package*.json ./ | ||
COPY tsconfig.json ./ | ||
COPY src ./src | ||
RUN npm install | ||
RUN npm run build | ||
FROM node:19.7.0 | ||
WORKDIR /usr/src/voraphiliac | ||
COPY package*.json ./ | ||
RUN npm install --only=production | ||
COPY --from=0 /usr/src/voraphiliac/dist . | ||
CMD [ "npm", "start" ] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
version: '3.3' | ||
services: | ||
app: | ||
build: | ||
context: ./ | ||
restart: on-failure | ||
volumes: | ||
- ${configfile}:/usr/src/voraphiliac/src/configs/config.json | ||
- ${responsesfile}:/usr/src/voraphiliac/src/configs/responses.json |
Oops, something went wrong.