-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up a basic docker development container
- Loading branch information
0 parents
commit 1d1442c
Showing
4 changed files
with
68 additions
and
0 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,15 @@ | ||
FROM node | ||
|
||
ARG NODE_ENV=development | ||
ENV NODE_ENV $NODE_ENV | ||
|
||
WORKDIR /usr/src | ||
COPY package.json /usr/src | ||
RUN yarn install && yarn cache clean --force | ||
ENV PATH /usr/src/node_modules/.bin:$PATH | ||
ENV NPM_CONFIG_PREFIX /usr/src/node_modules | ||
|
||
WORKDIR /usr/src/app | ||
COPY . /usr/src/app | ||
|
||
CMD ["yarn", "test"] |
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,20 @@ | ||
.PHONY: build test | ||
|
||
define compose | ||
docker-compose $(1) | ||
endef | ||
|
||
define yarn | ||
$(call compose, run dev yarn $1) | ||
endef | ||
|
||
all: build bash | ||
|
||
build: | ||
$(call compose, build --pull) | ||
|
||
bash: | ||
$(call compose, run --service-ports dev bash) | ||
|
||
test: | ||
$(call yarn, $@) |
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,11 @@ | ||
version: '2.1' | ||
|
||
services: | ||
dev: | ||
build: | ||
context: . | ||
volumes: | ||
- .:/usr/src/app | ||
ports: | ||
- "9229:9229" | ||
- "3000:3000" |
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,22 @@ | ||
{ | ||
"name": "@hmcts/look-and-feel", | ||
"description": "One question per page apps made easy", | ||
"version": "0.0.1", | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=6.0" | ||
}, | ||
"main": "./src/main.js", | ||
"scripts": { | ||
"test": "NODE_PATH=. NODE_ENV=testing mocha 'test/**/*.test.js'" | ||
}, | ||
"dependencies": { | ||
"express": "^4.15.3", | ||
"express-nunjucks": "^2.2.3", | ||
"govuk_template_jinja": "^0.22.3", | ||
"nunjucks": "^3.0.1" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^4.4.0" | ||
} | ||
} |