Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit ab557ca

Browse files
Merge pull request #75 from microservices-demo/fix-test-docker-file
Fix test dockerfile
2 parents 3f737f9 + 03c284e commit ab557ca

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
FROM mhart/alpine-node:6.3
1+
FROM node:4-alpine
22
ENV NODE_ENV "production"
33
ENV PORT 8079
44
EXPOSE 8079
55
RUN addgroup mygroup && adduser -D -G mygroup myuser && mkdir -p /usr/src/app && chown -R myuser /usr/src/app
6-
RUN npm install -g yarn
7-
86

97
# Prepare app directory
108
WORKDIR /usr/src/app
@@ -18,4 +16,4 @@ RUN yarn install
1816
COPY . /usr/src/app
1917

2018
# Start the app
21-
CMD ["npm", "start"]
19+
CMD ["/usr/local/bin/npm", "start"]

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ IMAGE=front-end
22

33
.PHONY: test coverage
44

5-
up: compose test-image server
5+
up: compose test-image deps server
66

77
down: kill-server kill-compose
88

@@ -31,7 +31,7 @@ server:
3131
-e PORT=8080 \
3232
-p 8080:8080 \
3333
--network test_default \
34-
$(IMAGE) npm start
34+
$(IMAGE) /usr/local/bin/npm start
3535

3636
# Removes the development container & image
3737
clean:

test/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
FROM node:0.10.46
1+
FROM node:4-alpine
22

3-
RUN apt-get install -y make
3+
RUN apk update && apk add make
44

55
RUN npm install -g phantomjs-prebuilt
66
RUN npm install -g casperjs
77

88
RUN mkdir -p /usr/src/app
99

1010
WORKDIR /usr/src/app
11-
12-
ENTRYPOINT ["/bin/bash"]

test/docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ services:
1515
restart: always
1616
environment:
1717
- reschedule:on-node-failure
18+
catalogue-db:
19+
image: weaveworksdemos/catalogue-db
20+
hostname: catalogue-db
21+
restart: always
22+
environment:
23+
- MYSQL_ROOT_PASSWORD=""
24+
- MYSQL_ALLOW_EMPTY_PASSWORD=true
25+
- MYSQL_DATABASE=socksdb
1826
carts:
1927
image: weaveworksdemos/carts
2028
hostname: carts

0 commit comments

Comments
 (0)