Update
This commit is contained in:
parent
03d1859ab9
commit
e96bbe3d4e
16
.app.config
Normal file
16
.app.config
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"ID": "logger",
|
||||
"Name": "logger",
|
||||
"Address": "__IP__",
|
||||
"Tags": ["api-logger", "logger", "tcp", "fluentd"],
|
||||
"Port": 24224,
|
||||
"Connect": {
|
||||
"Native": true
|
||||
},
|
||||
"Check": {
|
||||
"TCP": "__IP__:24224",
|
||||
"Interval": "10s",
|
||||
"Timeout": "10s",
|
||||
"DeregisterCriticalServiceAfter": "5m"
|
||||
}
|
||||
}
|
12
Dockerfile
12
Dockerfile
@ -9,8 +9,14 @@ USER root
|
||||
RUN ["fluent-gem", "install", "fluent-plugin-rabbitmq"]
|
||||
|
||||
USER fluent
|
||||
COPY ./api-logger/etc /fluentd/etc
|
||||
|
||||
CMD ["fluentd"]
|
||||
COPY ./api-logger/etc /etc/fluent
|
||||
COPY ./api-logger/entrypoint.sh /
|
||||
COPY ./.app.config /
|
||||
|
||||
EXPOSE 24224
|
||||
|
||||
USER root
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
# USER fluent
|
||||
CMD ["fluentd"]
|
||||
|
3
Makefile
3
Makefile
@ -8,5 +8,8 @@ build-image-dev:
|
||||
build-image-prod:
|
||||
- sh ${DEPLOY_DIR}/image-build.sh
|
||||
|
||||
push-image-dev:
|
||||
- sh ${DEPLOY_DIR}/image-push.sh dev
|
||||
|
||||
push-image-prod:
|
||||
- sh ${DEPLOY_DIR}/image-push.sh
|
||||
|
11
api-logger/entrypoint.sh
Executable file
11
api-logger/entrypoint.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
update-ca-certificates
|
||||
|
||||
# su fluent
|
||||
update-resolv # FIXME: lack of permissions to /etc/resolv.conf
|
||||
register-service
|
||||
|
||||
exec "$@"
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# RUN IN REPO ROOT DIR !!
|
||||
|
||||
export IMAGE_NAME="git.pbiernat.dev/egommerce/api-logger"
|
||||
export IMAGE_NAME="git.pbiernat.io/egommerce/api-logger"
|
||||
|
||||
TARGET=${1:-latest}
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
#!/bin/sh
|
||||
# RUN IN REPO ROOT DIR !!
|
||||
|
||||
export IMAGE_NAME="git.pbiernat.dev/egommerce/api-logger"
|
||||
export IMAGE_NAME="git.pbiernat.io/egommerce/api-logger"
|
||||
|
||||
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"
|
||||
|
||||
# Restart container
|
||||
curl -X POST http://127.0.0.1:9001/api/webhooks/14bae058-088f-4895-99ef-ec9383857c41
|
||||
|
Loading…
Reference in New Issue
Block a user