Initial commit on Forgejo
Some checks are pending
CI and deploy / Test (push) Waiting to run
CI and deploy / Build, push, and deploy (push) Blocked by required conditions

Fresh repository history for elektrine/elektrine-haraka hosted at
https://git.elektrine.com/elektrine/elektrine-haraka.
This commit is contained in:
Maxfield Luke 2026-07-29 04:43:42 -04:00
commit 67c1d41a0c
82 changed files with 8713 additions and 0 deletions

View file

@ -0,0 +1,4 @@
#!/bin/bash
set -euo pipefail
exec "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/docker_deploy.sh" "$@"

51
scripts/deploy/docker_deploy.sh Executable file
View file

@ -0,0 +1,51 @@
#!/bin/bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
DEPLOY_DIR="$ROOT_DIR/deployment"
COMPOSE_FILE="$DEPLOY_DIR/docker-compose.same-server.yml"
ENV_FILE="$DEPLOY_DIR/.env"
usage() {
cat <<'EOF'
Usage: scripts/deploy/docker_deploy.sh [--env-file deployment/.env] [docker compose args...]
Deploys elektrine-haraka for the same-host Docker layout.
EOF
}
ARGS=()
while [[ $# -gt 0 ]]; do
case "$1" in
--env-file)
ENV_FILE="$2"
shift 2
;;
-h|--help)
usage
exit 0
;;
*)
ARGS+=("$1")
shift
;;
esac
done
if [[ -f "$ENV_FILE" ]]; then
set -a
# shellcheck disable=SC1090
source "$ENV_FILE"
set +a
fi
docker compose --env-file "$ENV_FILE" -f "$COMPOSE_FILE" config >/dev/null
docker compose --env-file "$ENV_FILE" -f "$COMPOSE_FILE" up -d redis clamav spamassassin
docker compose --env-file "$ENV_FILE" -f "$COMPOSE_FILE" up -d haraka-inbound haraka-submission haraka-outbound haraka-worker cert-copier
if [[ "${#ARGS[@]}" -gt 0 ]]; then
exec docker compose --env-file "$ENV_FILE" -f "$COMPOSE_FILE" "${ARGS[@]}"
fi
docker compose --env-file "$ENV_FILE" -f "$COMPOSE_FILE" ps