-
Notifications
You must be signed in to change notification settings - Fork 28
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 #43 from C0ffeeL0ver/main
Suporte a Docker
- Loading branch information
Showing
5 changed files
with
83 additions
and
21 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,2 @@ | ||
node_modules | ||
npm-debug.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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# Matches multiple files with brace expansion notation | ||
# Set default charset | ||
[*.{js}] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# Tab indentation (no size specified) | ||
[Makefile] | ||
indent_style = tab | ||
|
||
# Indentation override for all JS under assets/phrases directory | ||
[assets/phrases/**.json] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# Matches the exact files either package.json or .travis.yml | ||
[{package.json,.gitpod.yml,docker-compose.yaml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
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,18 @@ | ||
# Specify the parent image from which we build | ||
FROM node:18.9.0-alpine3.16 | ||
|
||
ENV NODE_ENV=development | ||
|
||
# Set the working directory | ||
RUN mkdir -p /usr/src/welcome_bot | ||
WORKDIR /usr/src/welcome_bot | ||
|
||
# Install app dependencies | ||
COPY package*.json ./ | ||
|
||
RUN npm install | ||
RUN npm install -g nodemon | ||
COPY . . | ||
|
||
# Run the application | ||
CMD [ "npm", "run", "start.dev" ] |
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,10 @@ | ||
version: '3' | ||
|
||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.dev | ||
volumes: | ||
- ./:/usr/src/welcome_bot:cached | ||
- /usr/src/welcome_bot/node_modules |
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,30 @@ | ||
{ | ||
"scripts": { | ||
"start": "node index.js", | ||
"lint": "eslint .", | ||
"test": "cross-env BABEL_ENV=test jest --passWithNoTests", | ||
"format": "prettier --write .", | ||
"prepare": "husky install" | ||
"start": "node index.js", | ||
"start.dev": "nodemon -L --inspect=0.0.0.0 index.js", | ||
"lint": "eslint .", | ||
"test": "cross-env BABEL_ENV=test jest --passWithNoTests", | ||
"format": "prettier --write .", | ||
"prepare": "husky install" | ||
}, | ||
"dependencies": { | ||
"discord.js": "^13.8.0", | ||
"dotenv": "^16.0.1" | ||
"discord.js": "^13.8.0", | ||
"dotenv": "^16.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "28.1.6", | ||
"cross-env": "7.0.3", | ||
"eslint": "8.20.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-jsx-a11y": "^6.6.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-react": "^7.30.1", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"husky": "8.0.1", | ||
"jest": "28.1.3", | ||
"jest-cli": "28.1.3", | ||
"prettier": "2.7.1" | ||
"@types/jest": "28.1.6", | ||
"cross-env": "7.0.3", | ||
"eslint": "8.20.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-jsx-a11y": "^6.6.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-react": "^7.30.1", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"husky": "8.0.1", | ||
"jest": "28.1.3", | ||
"jest-cli": "28.1.3", | ||
"prettier": "2.7.1" | ||
} | ||
} |