fdroid-repository/misc/start.sh

34 lines
937 B
Bash
Raw Normal View History

2018-11-09 09:29:18 +01:00
#!/bin/bash
set -eo pipefail
2021-07-12 17:23:55 +02:00
CONFIG_FILE=$1
if [ ! -f "${CONFIG_FILE}" ]; then
echo 1>&2 "You must provide a configuration file."
exit 1
fi
2018-11-09 09:29:18 +01:00
set -a
2021-07-12 17:23:55 +02:00
. "$CONFIG_FILE"
2018-11-09 09:29:18 +01:00
set +a
docker run -it -d \
--restart always \
2021-07-12 17:23:55 +02:00
-p "${DOCKER_HTTP_PORT}" \
-p "${DOCKER_HTTPS_PORT}" \
-p "${DOCKER_SSH_PORT}" \
-v "${FDROID_REPO_DIR}:/fdroid/repo" \
-v "${FDROID_METADATA_DIR}:/fdroid/metadata" \
-v "${FDROID_KEYSTORE_DIR}:/fdroid/keystore" \
2018-11-19 21:43:09 +01:00
-e "FDROID_REPO_HOST=${REPO_HOST}" \
2018-11-20 09:50:42 +01:00
-e "FDROID_REPO_EMAIL=${REPO_EMAIL}" \
2018-11-09 09:29:18 +01:00
-e "FDROID_REPO_NAME=${REPO_NAME}" \
-e "FDROID_REPO_DESCRIPTION=${REPO_DESCRIPTION}" \
-e "FDROID_KEYSTORE_PASS=${KEYSTORE_PASS}" \
-e "FDROID_KEYSTORE_KEYPASS=${KEYSTORE_KEY_PASS}" \
-e "FDROID_KEYSTORE_KEY_ALIAS=${KEYSTORE_KEY_ALIAS}" \
-e "FDROID_KEYSTORE_DNAME=${KEYSTORE_DNAME}" \
2018-11-10 11:34:16 +01:00
-e "SSH_PUBLIC_KEY=${SSH_PUBLIC_KEY}" \
2021-07-12 17:23:55 +02:00
cadoles/fdroid-repository:latest