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

Commit

Permalink
Merge pull request #75 from microservices-demo/fix-test-docker-file
Browse files Browse the repository at this point in the history
Fix test dockerfile
  • Loading branch information
nustiueudinastea authored Mar 10, 2017
2 parents 3f737f9 + 03c284e commit ab557ca
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM mhart/alpine-node:6.3
FROM node:4-alpine
ENV NODE_ENV "production"
ENV PORT 8079
EXPOSE 8079
RUN addgroup mygroup && adduser -D -G mygroup myuser && mkdir -p /usr/src/app && chown -R myuser /usr/src/app
RUN npm install -g yarn


# Prepare app directory
WORKDIR /usr/src/app
Expand All @@ -18,4 +16,4 @@ RUN yarn install
COPY . /usr/src/app

# Start the app
CMD ["npm", "start"]
CMD ["/usr/local/bin/npm", "start"]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ IMAGE=front-end

.PHONY: test coverage

up: compose test-image server
up: compose test-image deps server

down: kill-server kill-compose

Expand Down Expand Up @@ -31,7 +31,7 @@ server:
-e PORT=8080 \
-p 8080:8080 \
--network test_default \
$(IMAGE) npm start
$(IMAGE) /usr/local/bin/npm start

# Removes the development container & image
clean:
Expand Down
6 changes: 2 additions & 4 deletions test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
FROM node:0.10.46
FROM node:4-alpine

RUN apt-get install -y make
RUN apk update && apk add make

RUN npm install -g phantomjs-prebuilt
RUN npm install -g casperjs

RUN mkdir -p /usr/src/app

WORKDIR /usr/src/app

ENTRYPOINT ["/bin/bash"]
8 changes: 8 additions & 0 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ services:
restart: always
environment:
- reschedule:on-node-failure
catalogue-db:
image: weaveworksdemos/catalogue-db
hostname: catalogue-db
restart: always
environment:
- MYSQL_ROOT_PASSWORD=""
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_DATABASE=socksdb
carts:
image: weaveworksdemos/carts
hostname: carts
Expand Down

0 comments on commit ab557ca

Please sign in to comment.