Update
This commit is contained in:
parent
7914820120
commit
463bef9d6b
16
.app.config
Normal file
16
.app.config
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"ID": "cache",
|
||||||
|
"Name": "cache",
|
||||||
|
"Address": "__IP__",
|
||||||
|
"Tags": ["api-cache", "cache", "tcp", "redis"],
|
||||||
|
"Port": 6379,
|
||||||
|
"Connect": {
|
||||||
|
"Native": true
|
||||||
|
},
|
||||||
|
"Check": {
|
||||||
|
"TCP": "__IP__:6379",
|
||||||
|
"Interval": "10s",
|
||||||
|
"Timeout": "10s",
|
||||||
|
"DeregisterCriticalServiceAfter": "5m"
|
||||||
|
}
|
||||||
|
}
|
12
Dockerfile
12
Dockerfile
@ -1,13 +1,21 @@
|
|||||||
FROM redis:7.0.7-alpine3.17
|
FROM redis:alpine
|
||||||
|
|
||||||
LABEL dev.egommerce.image.author="Piotr Biernat"
|
LABEL dev.egommerce.image.author="Piotr Biernat"
|
||||||
LABEL dev.egommerce.image.vendor="Egommerce"
|
LABEL dev.egommerce.image.vendor="Egommerce"
|
||||||
LABEL dev.egommerce.image.service="api-cache"
|
LABEL dev.egommerce.image.service="api-cache"
|
||||||
LABEL dev.egommerce.image.version="1.0"
|
LABEL dev.egommerce.image.version="1.0"
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
RUN apk update && apk add ca-certificates
|
||||||
|
|
||||||
COPY ./api-cache/etc/redis.conf /etc/redis.conf
|
COPY ./api-cache/etc/redis.conf /etc/redis.conf
|
||||||
|
COPY ./api-cache/entrypoint.sh /
|
||||||
|
COPY ./.app.config /
|
||||||
|
|
||||||
EXPOSE 6379
|
EXPOSE 6379
|
||||||
# USER redis
|
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
# USER redis
|
||||||
CMD ["redis-server", "/etc/redis.conf"]
|
CMD ["redis-server", "/etc/redis.conf"]
|
||||||
|
3
Makefile
3
Makefile
@ -7,5 +7,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
|
||||||
|
10
api-cache/entrypoint.sh
Executable file
10
api-cache/entrypoint.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
update-ca-certificates
|
||||||
|
|
||||||
|
register-service
|
||||||
|
update-resolv
|
||||||
|
|
||||||
|
exec "$@"
|
@ -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-cache"
|
export IMAGE_NAME="git.pbiernat.io/egommerce/api-cache"
|
||||||
|
|
||||||
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-cache"
|
export IMAGE_NAME="git.pbiernat.io/egommerce/api-cache"
|
||||||
|
|
||||||
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/130a1299-ecbd-4057-b82b-16011b117716
|
||||||
|
Loading…
Reference in New Issue
Block a user