hw12_13_14_15_calendar
Andrey Ivanov 2020-12-03 09:01:52 -05:00 committed by Andrey Ivanov
parent e8e738ee78
commit 8680c3a85c
9 changed files with 15 additions and 10 deletions

View File

@ -31,9 +31,14 @@ compose-build:
up:
sudo -S docker-compose -f ./cicd/docker-compose.yml up -d --build
down:
down: shutdown clean
shutdown:
sudo -S docker-compose -f ./cicd/docker-compose.yml down
clean:
sudo docker rmi $(sudo docker images | grep '<none>' | awk '{print $3}')
calendar-start:
nohup ./bin/calendar -config ./configs/calendar.conf > /dev/null 2>&1 &
calendar-stop:

View File

@ -12,7 +12,7 @@ ENV APP_HTTP_ADDRESS=0.0.0.0
ENV APP_HTTP_PORT=8888
ENV APP_API_ADDRESS=0.0.0.0
ENV APP_API_PORT=50053
ENV APP_LOGGER_FILE=/calendar.log
ENV APP_LOGGER_FILE=/logs/calendar.log
ENV APP_LOGGER_LEVEL=INFO
ENV APP_STORAGE_INMEMORY=false
ENV APP_STORAGE_SQLHOST=psql

View File

@ -5,7 +5,7 @@ services:
context: ..
dockerfile: ./cicd/calendar/Dockerfile
volumes:
- ../calendar.log:/calendar.log
- ../logs:/logs
ports:
- "8888:8888"
- "50051:50051"
@ -23,7 +23,7 @@ services:
context: ..
dockerfile: ./cicd/scheduler/Dockerfile
volumes:
- ../calendar.log:/calendar.log
- ../logs:/logs
depends_on:
- rabbitmq
- calendar
@ -34,7 +34,7 @@ services:
context: ..
dockerfile: ./cicd/sender/Dockerfile
volumes:
- ../calendar.log:/calendar.log
- ../logs:/logs
depends_on:
- rabbitmq
restart: on-failure

View File

@ -15,7 +15,7 @@ ENV APP_RABBITMQ_QUEUE=notifications
ENV APP_RABBITMQ_KEY=events
ENV APP_API_ADDRESS=calendar
ENV APP_API_PORT=50053
ENV APP_LOGGER_FILE=/calendar.log
ENV APP_LOGGER_FILE=/logs/calendar.log
ENV APP_LOGGER_LEVEL=INFO
WORKDIR /
COPY --from=builder /app/scheduler ./sbin

View File

@ -13,7 +13,7 @@ ENV APP_RABBITMQ_PASS=rabbit
ENV APP_RABBITMQ_EXCHANGE=calendar
ENV APP_RABBITMQ_QUEUE=notifications
ENV APP_RABBITMQ_KEY=events
ENV APP_LOGGER_FILE=/calendar.log
ENV APP_LOGGER_FILE=/logs/calendar.log
ENV APP_LOGGER_LEVEL=INFO
WORKDIR /
COPY --from=builder /app/sender ./sbin

View File

@ -11,7 +11,7 @@ Address = "localhost"
Port = "50053"
[Logger]
File = "./calendar.log"
File = "./logs/calendar.log"
Level = "INFO"
[Storage]

View File

@ -8,7 +8,7 @@ Queue = "notifications"
Key = "events"
[Logger]
File = "./calendar.log"
File = "./logs/calendar.log"
Level = "INFO"
[API]

View File

@ -8,5 +8,5 @@ Queue = "notifications"
Key = "events"
[Logger]
File = "./calendar.log"
File = "./logs/calendar.log"
Level = "INFO"