Refactgor
This commit is contained in:
parent
9e1387d680
commit
2671dde183
@ -7,12 +7,13 @@ LABEL dev.egommerce.image.version="1.0"
|
|||||||
|
|
||||||
COPY ./api-eventbus/etc /etc/rabbitmq
|
COPY ./api-eventbus/etc /etc/rabbitmq
|
||||||
COPY ./api-eventbus/entrypoint.sh ./api-eventbus/wait-for-it.sh /
|
COPY ./api-eventbus/entrypoint.sh ./api-eventbus/wait-for-it.sh /
|
||||||
|
COPY ./.app.config /
|
||||||
|
|
||||||
RUN rabbitmq-plugins --offline enable rabbitmq_peer_discovery_consul rabbitmq_prometheus && \
|
# RUN rabbitmq-plugins enable --offline rabbitmq_prometheus
|
||||||
chmod 755 /entrypoint.sh
|
|
||||||
# rabbitmq-plugins --offline enable rabbitmq_prometheus && \
|
|
||||||
|
|
||||||
EXPOSE 5672
|
EXPOSE 5672
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
CMD ["rabbitmq-server"]
|
CMD ["rabbitmq-server"]
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=5s --timeout=1s --retries=20 CMD rabbitmq-diagnostics -q ping >/dev/null || exit 1
|
||||||
|
3
Makefile
3
Makefile
@ -8,5 +8,8 @@ build-image-dev:
|
|||||||
build-image-prod:
|
build-image-prod:
|
||||||
- sh ${DEPLOY_DIR}/image-build.sh
|
- sh ${DEPLOY_DIR}/image-build.sh
|
||||||
|
|
||||||
|
push-image-dev:
|
||||||
|
- sh ${DEPLOY_DIR}/image-push.sh dev
|
||||||
|
|
||||||
push-image-prod:
|
push-image-prod:
|
||||||
- sh ${DEPLOY_DIR}/image-push.sh
|
- sh ${DEPLOY_DIR}/image-push.sh
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
|
update-resolv
|
||||||
|
|
||||||
waitForService()
|
waitForService()
|
||||||
{
|
{
|
||||||
./wait-for-it.sh $1 -t 2 1>/dev/null 2>&1
|
./wait-for-it.sh $1 -t 2 1>/dev/null 2>&1
|
||||||
@ -15,8 +17,11 @@ waitForService()
|
|||||||
}
|
}
|
||||||
|
|
||||||
waitForService "api-registry:8500"
|
waitForService "api-registry:8500"
|
||||||
|
# waitForService "logger.service.ego.io:24224"
|
||||||
waitForService "api-logger:24224"
|
waitForService "api-logger:24224"
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
register-service
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
@ -1 +1 @@
|
|||||||
prometheus.tcp.port = 8084
|
# prometheus.tcp.port = 8084
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
cluster_formation.peer_discovery_backend = consul
|
|
||||||
|
|
||||||
cluster_formation.consul.host = api-registry
|
|
||||||
|
|
||||||
cluster_formation.consul.svc_addr_auto = false
|
|
||||||
cluster_formation.consul.svc = api-eventbus
|
|
||||||
cluster_formation.consul.svc_addr = api-eventbus
|
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# RUN IN REPO ROOT DIR !!
|
# RUN IN REPO ROOT DIR !!
|
||||||
|
|
||||||
export IMAGE_NAME="git.pbiernat.dev/egommerce/api-eventbus"
|
export IMAGE_NAME="git.pbiernat.io/egommerce/api-eventbus"
|
||||||
|
|
||||||
TARGET=${1:-latest}
|
TARGET=${1:-latest}
|
||||||
|
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# RUN IN REPO ROOT DIR !!
|
# RUN IN REPO ROOT DIR !!
|
||||||
|
|
||||||
export IMAGE_NAME="git.pbiernat.dev/egommerce/api-eventbus"
|
export IMAGE_NAME="git.pbiernat.io/egommerce/api-eventbus"
|
||||||
|
|
||||||
TARGET=${1:-latest}
|
TARGET=${1:-latest}
|
||||||
|
|
||||||
echo $DOCKER_PASSWORD | docker login git.pbiernat.dev -u $DOCKER_USERNAME --password-stdin
|
echo $DOCKER_PASSWORD | docker login git.pbiernat.io -u $DOCKER_USERNAME --password-stdin
|
||||||
docker push "$IMAGE_NAME:$TARGET"
|
docker push "$IMAGE_NAME:$TARGET"
|
||||||
|
|
||||||
|
# Restart container
|
||||||
|
curl -X POST http://127.0.0.1:9001/api/webhooks/2d456377-d438-4617-88fc-8d06657e4f45
|
||||||
|
Loading…
Reference in New Issue
Block a user