mirror of
https://github.com/casjaysdevdocker/commitment
synced 2025-01-18 12:34:26 -05:00
🗃️ Committing everything that changed 🗃️
This commit is contained in:
parent
0e52089575
commit
f0fa8f13f5
12
Dockerfile
12
Dockerfile
@ -1,4 +1,4 @@
|
|||||||
FROM casjaysdevdocker/alpine:latest AS build
|
FROM casjaysdevdocker/python3:latest AS build
|
||||||
|
|
||||||
ARG ALPINE_VERSION="v3.16"
|
ARG ALPINE_VERSION="v3.16"
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ RUN set -ex; \
|
|||||||
echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE_VERSION}/community" >>"/etc/apk/repositories"; \
|
echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE_VERSION}/community" >>"/etc/apk/repositories"; \
|
||||||
if [ "${ALPINE_VERSION}" = "edge" ]; then echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE_VERSION}/testing" >>"/etc/apk/repositories" ; fi ; \
|
if [ "${ALPINE_VERSION}" = "edge" ]; then echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE_VERSION}/testing" >>"/etc/apk/repositories" ; fi ; \
|
||||||
apk update --update-cache && apk add --no-cache ${PACK_LIST} && \
|
apk update --update-cache && apk add --no-cache ${PACK_LIST} && \
|
||||||
echo
|
git clone -q https://github.com/casjay-heroku/commitment /app
|
||||||
|
|
||||||
RUN echo 'Running cleanup' ; \
|
RUN echo 'Running cleanup' ; \
|
||||||
rm -Rf /usr/share/doc/* /usr/share/info/* /tmp/* /var/tmp/* ; \
|
rm -Rf /usr/share/doc/* /usr/share/info/* /tmp/* /var/tmp/* ; \
|
||||||
@ -42,8 +42,8 @@ RUN echo 'Running cleanup' ; \
|
|||||||
FROM scratch
|
FROM scratch
|
||||||
|
|
||||||
ARG \
|
ARG \
|
||||||
SERVICE_PORT="80" \
|
SERVICE_PORT="5000" \
|
||||||
EXPOSE_PORTS="80" \
|
EXPOSE_PORTS="5000" \
|
||||||
PHP_SERVER="commitment" \
|
PHP_SERVER="commitment" \
|
||||||
NODE_VERSION="system" \
|
NODE_VERSION="system" \
|
||||||
NODE_MANAGER="system" \
|
NODE_MANAGER="system" \
|
||||||
@ -85,9 +85,9 @@ ENV LANG=en_US.UTF-8 \
|
|||||||
COPY --from=build /. /
|
COPY --from=build /. /
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
WORKDIR /root
|
WORKDIR /app
|
||||||
|
|
||||||
VOLUME [ "/config","/data" ]
|
#VOLUME [ "/config","/data" ]
|
||||||
|
|
||||||
EXPOSE $EXPOSE_PORTS
|
EXPOSE $EXPOSE_PORTS
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
# @@Description : script to start commitment
|
# @@Description : script to start commitment
|
||||||
# @@Changelog : New script
|
# @@Changelog : New script
|
||||||
# @@TODO : Better documentation
|
# @@TODO : Better documentation
|
||||||
# @@Other :
|
# @@Other :
|
||||||
# @@Resource :
|
# @@Resource :
|
||||||
# @@Terminal App : no
|
# @@Terminal App : no
|
||||||
# @@sudo/root : no
|
# @@sudo/root : no
|
||||||
# @@Template : other/start-service
|
# @@Template : other/start-service
|
||||||
@ -34,8 +34,7 @@ __certbot() {
|
|||||||
__heath_check() {
|
__heath_check() {
|
||||||
status=0 health="Good"
|
status=0 health="Good"
|
||||||
__pgrep ${1:-} &>/dev/null || status=$((status + 1))
|
__pgrep ${1:-} &>/dev/null || status=$((status + 1))
|
||||||
#__curl "http://localhost:$SERVICE_PORT/server-health" || status=$((status + 1))
|
__curl "http://localhost:$SERVICE_PORT/txt" || status=$((status + 1))
|
||||||
[ "$status" -eq 0 ] || health="Errors reported see docker logs --follow $CONTAINER_NAME"
|
|
||||||
return ${status:-$?}
|
return ${status:-$?}
|
||||||
}
|
}
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
@ -74,9 +73,9 @@ DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/de
|
|||||||
CONTAINER_IP_ADDRESS="$(ip a 2>/dev/null | grep 'inet' | grep -v '127.0.0.1' | awk '{print $2}' | sed 's|/.*||g')"
|
CONTAINER_IP_ADDRESS="$(ip a 2>/dev/null | grep 'inet' | grep -v '127.0.0.1' | awk '{print $2}' | sed 's|/.*||g')"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Overwrite variables
|
# Overwrite variables
|
||||||
#SERVICE_PORT=""
|
#SERVICE_PORT="5000"
|
||||||
SERVICE_NAME="commitment"
|
SERVICE_NAME="commitment"
|
||||||
SERVICE_COMMAND="$SERVICE_NAME"
|
SERVICE_COMMAND="python3 /app/commitment.py"
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Show start message
|
# Show start message
|
||||||
@ -124,7 +123,7 @@ fi
|
|||||||
[ -f "/config/.env.sh" ] && . "/config/.env.sh"
|
[ -f "/config/.env.sh" ] && . "/config/.env.sh"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Actions based on env
|
# Actions based on env
|
||||||
|
cd /app || exit 10
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# begin main app
|
# begin main app
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user