HW15 WIP
parent
e8e738ee78
commit
8680c3a85c
|
@ -31,9 +31,14 @@ compose-build:
|
||||||
up:
|
up:
|
||||||
sudo -S docker-compose -f ./cicd/docker-compose.yml up -d --build
|
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
|
sudo -S docker-compose -f ./cicd/docker-compose.yml down
|
||||||
|
|
||||||
|
clean:
|
||||||
|
sudo docker rmi $(sudo docker images | grep '<none>' | awk '{print $3}')
|
||||||
|
|
||||||
calendar-start:
|
calendar-start:
|
||||||
nohup ./bin/calendar -config ./configs/calendar.conf > /dev/null 2>&1 &
|
nohup ./bin/calendar -config ./configs/calendar.conf > /dev/null 2>&1 &
|
||||||
calendar-stop:
|
calendar-stop:
|
||||||
|
|
|
@ -12,7 +12,7 @@ ENV APP_HTTP_ADDRESS=0.0.0.0
|
||||||
ENV APP_HTTP_PORT=8888
|
ENV APP_HTTP_PORT=8888
|
||||||
ENV APP_API_ADDRESS=0.0.0.0
|
ENV APP_API_ADDRESS=0.0.0.0
|
||||||
ENV APP_API_PORT=50053
|
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_LOGGER_LEVEL=INFO
|
||||||
ENV APP_STORAGE_INMEMORY=false
|
ENV APP_STORAGE_INMEMORY=false
|
||||||
ENV APP_STORAGE_SQLHOST=psql
|
ENV APP_STORAGE_SQLHOST=psql
|
||||||
|
|
|
@ -5,7 +5,7 @@ services:
|
||||||
context: ..
|
context: ..
|
||||||
dockerfile: ./cicd/calendar/Dockerfile
|
dockerfile: ./cicd/calendar/Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- ../calendar.log:/calendar.log
|
- ../logs:/logs
|
||||||
ports:
|
ports:
|
||||||
- "8888:8888"
|
- "8888:8888"
|
||||||
- "50051:50051"
|
- "50051:50051"
|
||||||
|
@ -23,7 +23,7 @@ services:
|
||||||
context: ..
|
context: ..
|
||||||
dockerfile: ./cicd/scheduler/Dockerfile
|
dockerfile: ./cicd/scheduler/Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- ../calendar.log:/calendar.log
|
- ../logs:/logs
|
||||||
depends_on:
|
depends_on:
|
||||||
- rabbitmq
|
- rabbitmq
|
||||||
- calendar
|
- calendar
|
||||||
|
@ -34,7 +34,7 @@ services:
|
||||||
context: ..
|
context: ..
|
||||||
dockerfile: ./cicd/sender/Dockerfile
|
dockerfile: ./cicd/sender/Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- ../calendar.log:/calendar.log
|
- ../logs:/logs
|
||||||
depends_on:
|
depends_on:
|
||||||
- rabbitmq
|
- rabbitmq
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
|
|
|
@ -15,7 +15,7 @@ ENV APP_RABBITMQ_QUEUE=notifications
|
||||||
ENV APP_RABBITMQ_KEY=events
|
ENV APP_RABBITMQ_KEY=events
|
||||||
ENV APP_API_ADDRESS=calendar
|
ENV APP_API_ADDRESS=calendar
|
||||||
ENV APP_API_PORT=50053
|
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_LOGGER_LEVEL=INFO
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
COPY --from=builder /app/scheduler ./sbin
|
COPY --from=builder /app/scheduler ./sbin
|
||||||
|
|
|
@ -13,7 +13,7 @@ ENV APP_RABBITMQ_PASS=rabbit
|
||||||
ENV APP_RABBITMQ_EXCHANGE=calendar
|
ENV APP_RABBITMQ_EXCHANGE=calendar
|
||||||
ENV APP_RABBITMQ_QUEUE=notifications
|
ENV APP_RABBITMQ_QUEUE=notifications
|
||||||
ENV APP_RABBITMQ_KEY=events
|
ENV APP_RABBITMQ_KEY=events
|
||||||
ENV APP_LOGGER_FILE=/calendar.log
|
ENV APP_LOGGER_FILE=/logs/calendar.log
|
||||||
ENV APP_LOGGER_LEVEL=INFO
|
ENV APP_LOGGER_LEVEL=INFO
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
COPY --from=builder /app/sender ./sbin
|
COPY --from=builder /app/sender ./sbin
|
||||||
|
|
|
@ -11,7 +11,7 @@ Address = "localhost"
|
||||||
Port = "50053"
|
Port = "50053"
|
||||||
|
|
||||||
[Logger]
|
[Logger]
|
||||||
File = "./calendar.log"
|
File = "./logs/calendar.log"
|
||||||
Level = "INFO"
|
Level = "INFO"
|
||||||
|
|
||||||
[Storage]
|
[Storage]
|
||||||
|
|
|
@ -8,7 +8,7 @@ Queue = "notifications"
|
||||||
Key = "events"
|
Key = "events"
|
||||||
|
|
||||||
[Logger]
|
[Logger]
|
||||||
File = "./calendar.log"
|
File = "./logs/calendar.log"
|
||||||
Level = "INFO"
|
Level = "INFO"
|
||||||
|
|
||||||
[API]
|
[API]
|
||||||
|
|
|
@ -8,5 +8,5 @@ Queue = "notifications"
|
||||||
Key = "events"
|
Key = "events"
|
||||||
|
|
||||||
[Logger]
|
[Logger]
|
||||||
File = "./calendar.log"
|
File = "./logs/calendar.log"
|
||||||
Level = "INFO"
|
Level = "INFO"
|
Loading…
Reference in New Issue