Skip to content

Commit 1a21864

Browse files
authored
Merge pull request #17 from jembi/MOM-544-dockerise-existing-services
MOM-544 Add scripts to handle dockerising project
2 parents b347eb8 + 5be0c46 commit 1a21864

File tree

4 files changed

+48
-1
lines changed

4 files changed

+48
-1
lines changed

.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
config/test.json
2+
file-queue.gif
3+
.git/
4+
.travis.yml
5+
.jshintrc
6+
.jshintignore
7+
.gitignore
8+
node_modules/
9+
test/
10+
error/
11+
queue/
12+
working/

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node:dubnium-alpine
2+
3+
WORKDIR /opt/openhim-mediator-file-queue
4+
5+
COPY package.json npm-shrinkwrap.json ./
6+
7+
RUN npm install
8+
9+
COPY . .
10+
11+
CMD ["npm", "start"]

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,27 @@ Here is an example config file:
9595
]
9696
}
9797
```
98+
99+
## Development Startup
100+
101+
### Docker
102+
103+
> If connecting to a dockerised OpeHIM instance, change the host reference in the `/config/production.json` file to the OpenHIM's docker container name.
104+
105+
Build container from project directory:
106+
107+
```sh
108+
docker build -t openhim-mediator-file-queue .
109+
```
110+
111+
Start container:
112+
113+
```sh
114+
docker run --name openhim-mediator-file-queue -p 4002:4002 openhim-mediator-file-queue
115+
```
116+
117+
Useful Flags:
118+
119+
* `--network {openhim-network-name}` connect to a docker bridge network to allow communicating with dockerised OpenHIM
120+
* `--rm` to remove the container when stopped (Useful during development)
121+
* `-e NODE_TLS_REJECT_UNAUTHORIZED=0` if the using an OpenHIM instance with self signed certificates

config/development.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"api": {
1818
"apiURL": "https://localhost:8080",
1919
"username": "[email protected]",
20-
"password": "password"
20+
"password": "openhim-password"
2121
},
2222
"statsd": {
2323
"host": "localhost",

0 commit comments

Comments
 (0)