diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d9f8c51 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM node:14.4.0 +USER root +WORKDIR /backend +COPY . /backend +RUN yarn +RUN yarn build +CMD [ "node", "./dist/index.js" ] \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index ee0a2e8..e38bbf8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -51,7 +51,7 @@ const server = new ApolloServer({ server.applyMiddleware({ app }) -const port = process.env.PORT || 4000 +const port = process.env.BACKEND_PORT || 4000 app.listen(port, () => { console.log(`Server ready at http://localhost:${port}`)