Skip to content

Commit 0f73995

Browse files
committed
Added dotenv and Dockerfile
1 parent bccc45b commit 0f73995

File tree

5 files changed

+17
-1
lines changed

5 files changed

+17
-1
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Environment variables
2+
.env
3+
14
# Gyp build artifacts
25
build
36

Dockerfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM node:8
2+
WORKDIR /etherbot
3+
COPY package.json /etherbot
4+
RUN npm install -g yarn
5+
COPY . /etherbot
6+
CMD yarn start
7+
EXPOSE 80

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
"dependencies": {
8282
"axios": "^0.18.0",
8383
"circular-json": "^0.3.1",
84+
"dotenv": "^6.0.0",
8485
"lodash": "^4.17.4",
8586
"prop-types": "^15.6.0",
8687
"random-id": "0.0.2",

webpack.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
require('dotenv').config();
12
const path = require('path');
23
const ChunkHashReplacePlugin = require('chunkhash-replace-webpack-plugin');
34
const CleanWebpackPlugin = require('clean-webpack-plugin');
@@ -12,7 +13,7 @@ module.exports = {
1213
devServer: {
1314
contentBase: path.join(__dirname, 'docs'),
1415
host: '0.0.0.0',
15-
port: 8080,
16+
port: process.env.PORT || 8080,
1617
disableHostCheck: true,
1718
},
1819
resolve: {

yarn.lock

+4
Original file line numberDiff line numberDiff line change
@@ -1892,6 +1892,10 @@ domutils@^1.5.1:
18921892
dom-serializer "0"
18931893
domelementtype "1"
18941894

1895+
dotenv@^6.0.0:
1896+
version "6.0.0"
1897+
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.0.0.tgz#24e37c041741c5f4b25324958ebbc34bca965935"
1898+
18951899
duplexer3@^0.1.4:
18961900
version "0.1.4"
18971901
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"

0 commit comments

Comments
 (0)