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
18 changes: 18 additions & 0 deletions auth-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM golang:1.9-alpine
WORKDIR /go/src/app
EXPOSE 8000
# Definir las variables de entorno necesarias para la aplicación
ENV JWT_SECRET=PRFT \
ZIPKIN_URL=http://zipkin:9411/api/v2/spans \
AUTH_API_PORT=8000 \
USERS_API_ADDRESS=http://users-api:8083

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"
services:
frontend:
build: ./frontend
image: chigui794/frontend:1.1.0
depends_on:
- zipkin
- auth-api
- todos-api
- users-api
ports:
- 8080:8080

users-api:
build: ./users-api
image: chigui794/users-api:1.1.0
ports:
- 8083:8083
depends_on:
- zipkin

auth-api:
build: ./auth-api
image: chigui794/auth-api:1.1.0
ports:
- 8000:8000
depends_on:
- zipkin
- users-api

todos-api:
build: ./todos-api
image: chigui794/todos-api:1.1.0
ports:
- 8082:8082
depends_on:
- zipkin
- redis_queue

log-message-processor:
build: ./log-message-processor
image: chigui794/log-message-processor:1.1.0
depends_on:
- zipkin
- redis_queue

redis_queue:
ports:
- 6379:6379
image: redis

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


EXPOSE 8080

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

COPY package.json ./
RUN npm install

COPY . .

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

WORKDIR /usr/src/app
ENV REDIS_HOST=redis_queue \
REDIS_PORT=6379 \
ZIPKIN_URL=http://zipkin:9411/api/v2/spans \
REDIS_CHANNEL=log_channel
RUN apk add --no-cache build-base
COPY requirements.txt .
RUN pip3 install -r requirements.txt

COPY main.py .

CMD ["python3","-u","main.py"]
19 changes: 19 additions & 0 deletions todos-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:8-alpine

EXPOSE 8082

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


COPY package.json ./
RUN npm install

COPY . .

CMD ["sh", "-c", "npm start" ]
12 changes: 12 additions & 0 deletions users-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM openjdk:8-alpine

EXPOSE 8083

ENV JWT_SECRET=PRFT \
SPRING_ZIPKIN_BASE_URL=http://zipkin:9411 \
SERVER_PORT=8083
WORKDIR /usr/src/app
COPY . .
RUN ./mvnw clean install

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