Skip to content

Commit 557a4d9

Browse files
committed
improve dockerfile
1 parent 21a8e35 commit 557a4d9

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

Dockerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
FROM node:carbon
1+
FROM node:latest
22

33
WORKDIR /app
44

55
COPY package*.json ./
66

7-
RUN yarn
7+
RUN yarn install
8+
RUN npm install nodemon@latest -g
89

9-
# Bundle app source
1010
COPY . .
1111

12-
# EXPOSE 8080
13-
14-
CMD [ "yarn", "start" ]
12+
ENTRYPOINT [ "nodemon", "-L", "--exec", "babel-node", "src/index.js" ]

src/config/constants.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
export default {
22
PORT: process.env.PORT || 3000,
33
db: {
4-
development: {
5-
app: 'mongodb://localhost/democracy_development',
6-
},
7-
url: process.env.DB || 'mongodb://localhost/democracy_development',
4+
url: process.env.DB_URL || 'mongodb://localhost/democracy_development',
85
},
96
GRAPHIQL_PATH: '/graphiql',
107
GRAPHQL_PATH: '/graphql',

0 commit comments

Comments
 (0)