update makefile and docker file for listener
This commit is contained in:
		@ -3,6 +3,7 @@ BROKER_BINARY=brokerApp
 | 
			
		||||
AUTH_BINARY=authApp
 | 
			
		||||
LOGGER_BINARY=loggerApp
 | 
			
		||||
MAIL_BINARY=mailApp
 | 
			
		||||
LISTENER_BINARY=listenerApp
 | 
			
		||||
 | 
			
		||||
## up: starts all containers in the background without forcing build
 | 
			
		||||
up:
 | 
			
		||||
@ -11,7 +12,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 build_logger build_mail
 | 
			
		||||
up_build: build_broker build_auth build_logger build_mail build_listener
 | 
			
		||||
	@echo "Stopping docker images (if running...)"
 | 
			
		||||
	docker compose down
 | 
			
		||||
	@echo "Building (when required) and starting docker images..."
 | 
			
		||||
@ -48,6 +49,12 @@ build_mail:
 | 
			
		||||
	cd ../mail-service && env GOOS=linux CGO_ENABLED=0 go build -o ${MAIL_BINARY} ./cmd/api
 | 
			
		||||
	@echo "Done!"
 | 
			
		||||
 | 
			
		||||
## build_listener: builds the listener binary as a linux executable
 | 
			
		||||
build_listener:
 | 
			
		||||
	@echo "Building listener binary..."
 | 
			
		||||
	cd ../listener-service && env GOOS=linux CGO_ENABLED=0 go build -o ${LISTENER_BINARY} .
 | 
			
		||||
	@echo "Done!"
 | 
			
		||||
 | 
			
		||||
## build_front: builds the frone end binary
 | 
			
		||||
build_front:
 | 
			
		||||
	@echo "Building front end binary..."
 | 
			
		||||
 | 
			
		||||
@ -50,6 +50,15 @@ services:
 | 
			
		||||
      FROM_ADDR: me@here.com
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  listener-service:
 | 
			
		||||
    build:
 | 
			
		||||
      context: ./../listener-service/
 | 
			
		||||
      dockerfile: ./../listener-service/listener-service.dockerfile
 | 
			
		||||
    restart: always
 | 
			
		||||
    deploy:
 | 
			
		||||
      mode: replicated
 | 
			
		||||
      replicas: 1
 | 
			
		||||
 | 
			
		||||
  postgres:
 | 
			
		||||
    image: postgres:16.4-alpine
 | 
			
		||||
    ports:
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user