Add logger into the chain
This commit is contained in:
parent
0bba3cd7d2
commit
e0bc064ee0
7
logger-service/logger-service.dockerfile
Normal file
7
logger-service/logger-service.dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM alpine:latest
|
||||
|
||||
RUN mkdir /app
|
||||
|
||||
COPY loggerApp /app
|
||||
|
||||
CMD ["/app/loggerApp"]
|
@ -1,6 +1,7 @@
|
||||
FRONT_END_BINARY=frontApp
|
||||
BROKER_BINARY=brokerApp
|
||||
AUTH_BINARY=authApp
|
||||
LOGGER_BINARY=loggerApp
|
||||
|
||||
## up: starts all containers in the background without forcing build
|
||||
up:
|
||||
@ -9,7 +10,7 @@ up:
|
||||
@echo "Docker images started!"
|
||||
|
||||
## up_build: stops docker-compose (if running), builds all projects and starts docker compose
|
||||
up_build: build_broker build_auth
|
||||
up_build: build_broker build_auth build_logger
|
||||
@echo "Stopping docker images (if running...)"
|
||||
docker compose down
|
||||
@echo "Building (when required) and starting docker images..."
|
||||
@ -34,6 +35,12 @@ build_auth:
|
||||
cd ../authentication-service && env GOOS=linux CGO_ENABLED=0 go build -o ${AUTH_BINARY} ./cmd/api
|
||||
@echo "Done!"
|
||||
|
||||
## build_logger: builds the logger binary as a linux executable
|
||||
build_logger:
|
||||
@echo "Building logger binary..."
|
||||
cd ../logger-service && env GOOS=linux CGO_ENABLED=0 go build -o ${LOGGER_BINARY} ./cmd/api
|
||||
@echo "Done!"
|
||||
|
||||
## build_front: builds the frone end binary
|
||||
build_front:
|
||||
@echo "Building front end binary..."
|
||||
|
@ -22,6 +22,15 @@ services:
|
||||
environment:
|
||||
DSN: "host=postgres port=5432 user=postgres password=password dbname=users timezone=UTC connect_timeout=5"
|
||||
|
||||
logger-service:
|
||||
build:
|
||||
context: ./../logger-service/
|
||||
dockerfile: ./../logger-service/logger-service.dockerfile
|
||||
restart: always
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
|
||||
postgres:
|
||||
image: postgres
|
||||
ports:
|
||||
|
Loading…
Reference in New Issue
Block a user