Skip to content

Commit 476728a

Browse files
committed
refactor: move helper scripts into scripts/ subdirectory
Clean up the repo root for deployers who only need compose files, move build and internal scripts (entrypoint, chatmail-init, healthcheck, build.sh) to scripts/.
1 parent 5d6f246 commit 476728a

7 files changed

Lines changed: 7 additions & 7 deletions

chatmail_relay.dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ ENV PATH="/opt/cmdeploy/bin:${PATH}"
9999
RUN ln -s /etc/chatmail/chatmail.ini /opt/chatmail/chatmail.ini
100100

101101
ARG CHATMAIL_INIT_SERVICE_PATH=/lib/systemd/system/chatmail-init.service
102-
COPY ./docker/chatmail-init.service "$CHATMAIL_INIT_SERVICE_PATH"
102+
COPY ./docker/scripts/chatmail-init.service "$CHATMAIL_INIT_SERVICE_PATH"
103103
RUN ln -sf "$CHATMAIL_INIT_SERVICE_PATH" "/etc/systemd/system/multi-user.target.wants/chatmail-init.service"
104104

105105
# Remove default nginx site config at build time (not in entrypoint)
106106
RUN rm -f /etc/nginx/sites-enabled/default
107107

108-
COPY --chmod=555 ./docker/chatmail-init.sh /chatmail-init.sh
109-
COPY --chmod=555 ./docker/entrypoint.sh /entrypoint.sh
110-
COPY --chmod=555 ./docker/healthcheck.sh /healthcheck.sh
108+
COPY --chmod=555 ./docker/scripts/chatmail-init.sh /chatmail-init.sh
109+
COPY --chmod=555 ./docker/scripts/entrypoint.sh /entrypoint.sh
110+
COPY --chmod=555 ./docker/scripts/healthcheck.sh /healthcheck.sh
111111

112112
HEALTHCHECK --interval=10s --start-period=180s --timeout=10s --retries=3 \
113113
CMD /healthcheck.sh

docker-compose.override.yaml.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ services:
2323
# - ./data/www:/opt/chatmail-www
2424

2525
## Debug — mount scripts for live editing:
26-
# - ./chatmail-init.sh:/chatmail-init.sh
27-
# - ./entrypoint.sh:/entrypoint.sh
26+
# - ./scripts/chatmail-init.sh:/chatmail-init.sh
27+
# - ./scripts/entrypoint.sh:/entrypoint.sh
2828

2929
# environment:
3030
## Mount certs (above) and set TLS_EXTERNAL_CERT_AND_KEY to in-container paths.

build.sh renamed to scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ export GIT_HASH=$(git rev-parse HEAD)
99
export SOURCE_REF=$(git symbolic-ref --short HEAD 2>/dev/null || echo "$GIT_HASH")
1010
export SOURCE_URL=$(git remote get-url origin 2>/dev/null || echo "unknown")
1111
export BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
12-
cp "$(dirname "$0")/.dockerignore" .dockerignore
12+
cp "$(dirname "$0")/../.dockerignore" .dockerignore
1313
exec docker compose -f docker/docker-compose.yaml build "$@"
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)