Skip to content

Commit 12a4b1b

Browse files
authored
Merge pull request #8 from DrKimpatrick/ch-docker
Dockerise
2 parents c127fdb + 055522a commit 12a4b1b

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
npm-debug.log
3+
.nyc_output
4+
coverage
5+
logs

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ typings/
5959

6060
# next.js build output
6161
.next
62+
build

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM node
2+
3+
# Create app directory
4+
WORKDIR /src
5+
6+
# Install app dependencies
7+
# A wildcard is used to ensure both package.json AND package-lock.json are copied
8+
# where available (npm@5+)
9+
COPY package*.json ./
10+
11+
RUN npm install
12+
# If you are building your code for production
13+
# RUN npm ci --only=production
14+
15+
# Bundle app source
16+
COPY . .
17+
18+
RUN npm run build-ts
19+
20+
EXPOSE 3000
21+
22+
CMD [ "node", "build/server.js" ]

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// "declaration": true, /* Generates corresponding '.d.ts' file. */
1111
"sourceMap": true /* Generates corresponding '.map' file. */,
1212
// "outFile": "./", /* Concatenate and emit output to single file. */
13-
"outDir": "./src/dist" /* Redirect output structure to the directory. */,
13+
"outDir": "build" /* Redirect output structure to the directory. */,
1414
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
1515
// "removeComments": true, /* Do not emit comments to output. */
1616
// "noEmit": true, /* Do not emit outputs. */

0 commit comments

Comments
 (0)