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 #9 from microservices-demo/catalogue-db
Browse files Browse the repository at this point in the history
Adding catalogue db image to replace base mysql.
  • Loading branch information
pidster authored Sep 25, 2016
2 parents 3f10c16 + 375e67f commit 07ea2c2
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
NAME = weaveworksdemos/catalogue
DBNAME = weaveworksdemos/catalogue-db

TAG=$(TRAVIS_COMMIT)

INSTANCE = catalogue

.PHONY: default build copy
Expand All @@ -18,3 +22,9 @@ release:

run:
docker run --rm -p 8080:80 --name $(INSTANCE) $(NAME)

dockertravisbuild: build
docker build -t $(NAME):$(TAG) -f docker/catalogue/Dockerfile-release docker/catalogue/
docker build -t $(DBNAME):$(TAG) -f docker/catalogue-db/Dockerfile docker/catalogue-db/
docker login -u $(DOCKER_USER) -p $(DOCKER_PASS)
scripts/push.sh
8 changes: 8 additions & 0 deletions docker/catalogue-db/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM mysql:5.7

# ENV MYSQL_ROOT_PASSWORD DEFAULT_PASS
# ENV MYSQL_ALLOW_EMPTY_PASSWORD=true
# ENV MYSQL_DATABASE=socksdb

COPY ./data/dump.sql /docker-entrypoint-initdb.d/

File renamed without changes.
2 changes: 1 addition & 1 deletion docker/catalogue/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM golang:1.6

RUN mkdir /app
COPY . /go/src/github.com/microservices-demo/catalogue/
COPY images/ /app/images/
COPY images/ /images/

RUN go get github.com/gorilla/mux github.com/go-kit/kit/log github.com/go-kit/kit/endpoint github.com/go-kit/kit/transport/http github.com/go-sql-driver/mysql github.com/jmoiron/sqlx github.com/go-kit/kit/metrics/prometheus github.com/prometheus/client_golang/prometheus

Expand Down
4 changes: 4 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ $DOCKER_CMD build \
--build-arg COMMIT=$COMMIT \
-t ${REPO}:${COMMIT} \
-f $CODE_DIR/docker/catalogue/Dockerfile-release $CODE_DIR/docker/catalogue;

$DOCKER_CMD build \
-t ${REPO}-db:${COMMIT} \
-f $CODE_DIR/docker/catalogue-db/Dockerfile $CODE_DIR/docker/catalogue-db;

0 comments on commit 07ea2c2

Please sign in to comment.