Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions auth-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM golang:1.9-alpine

WORKDIR /go/src/app

EXPOSE 8000

ENV ZIPKIN_URL=http://zipkin:9411/api/v2/spans \
JWT_SECRET=PRFT \
USERS_API_ADDRESS=http://users-api:8083 \
AUTH_API_PORT=8000

RUN apk --no-cache add curl git && \
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh

COPY . .

RUN dep ensure

RUN go build -o auth-api

CMD /go/src/app/auth-api

55 changes: 55 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: '3.8'

services:
redis_queue:
image: redis
ports:
- "6379:6379"

auth-api:
build: ./auth-api
image: andrescuellar/auth-api:0.1.1
ports:
- "8000:8000"
depends_on:
- users-api
- zipkin

frontend:
build: ./frontend
image: andrescuellar/frontend:0.1.1
ports:
- "8080:8080"
depends_on:
- auth-api
- todos-api
- users-api
- zipkin

log-message-processor:
build: ./log-message-processor
image: andrescuellar/log-message-processor:0.1.0
depends_on:
- redis_queue

todos-api:
build: ./todos-api
image: andrescuellar/todos-api:0.1.2
ports:
- "8082:8082"
depends_on:
- redis_queue
- zipkin

users-api:
build: ./users-api
image: andrescuellar/users-api:0.1.1
ports:
- "8083:8083"
depends_on:
- zipkin

zipkin:
image: openzipkin/zipkin
ports:
- 9411:9411
18 changes: 18 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:8-alpine


EXPOSE 8080

ENV ZIPKIN_URL=http://zipkin:9411/api/v2/spans
ENV PORT=8080
ENV AUTH_API_ADDRESS=http://auth-api:8000
ENV TODOS_API_ADDRESS=http://todos-api:8082

WORKDIR /usr/src/app

COPY package.json ./
RUN npm install

COPY . .

CMD ["sh", "-c", "npm start" ]
12 changes: 12 additions & 0 deletions log-message-processor/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.6

WORKDIR /usr/src/app

COPY . /usr/src/app

ENV REDIS_PORT=6379 \
REDIS_CHANNEL=log_channel \
REDIS_HOST=redis_queue

RUN pip3 install -r requirements.txt
CMD python3 main.py
17 changes: 17 additions & 0 deletions todos-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:8-alpine
WORKDIR /app
COPY . /app

EXPOSE 8082

ENV REDIS_HOST=redis_queue \
REDIS_PORT=6379 \
TODO_API_PORT=8082 \
REDIS_CHANNEL=log_channel \
JWT_SECRET=PRFT\
ZIPKIN_URL=http://zipkin:9411/api/v2/spans


RUN npm install

CMD npm start
19 changes: 19 additions & 0 deletions users-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM openjdk:8-jdk


WORKDIR /usr/src/app


COPY . .

RUN ./mvnw clean install

ENV SPRING_ZIPKIN_BASE_URL=http://zipkin:9411
ENV JWT_SECRET=PRFT
ENV SERVER_PORT=8083


EXPOSE $SERVER_PORT


CMD ["java", "-jar", "target/users-api-0.0.1-SNAPSHOT.jar"]