Move to Cadoles namespace

This commit is contained in:
wpetit 2021-07-12 17:23:55 +02:00
parent b3bcb6fca8
commit aa50e74d9a
4 changed files with 40 additions and 15 deletions

View File

@ -1,4 +1,4 @@
FROM alpine:3.8 FROM alpine:3.9
ARG HTTP_PROXY= ARG HTTP_PROXY=
ARG HTTPS_PROXY= ARG HTTPS_PROXY=
@ -6,6 +6,7 @@ ARG http_proxy=
ARG https_proxy= ARG https_proxy=
ARG FDROIDSERVER_VERSION=1.0.10 ARG FDROIDSERVER_VERSION=1.0.10
ARG TIMEZONE=Europe/Paris ARG TIMEZONE=Europe/Paris
ARG CRYPTOGRAPHY_DONT_BUILD_RUST=1
RUN apk add --no-cache \ RUN apk add --no-cache \
python3 build-base freetype-dev libffi-dev \ python3 build-base freetype-dev libffi-dev \
@ -47,7 +48,8 @@ VOLUME /fdroid/metadata
VOLUME /fdroid/keystore VOLUME /fdroid/keystore
EXPOSE 2222 EXPOSE 2222
EXPOSE 8080 EXPOSE 80
EXPOSE 443
ENV FDROID_ARCHIVE_OLDER=3 ENV FDROID_ARCHIVE_OLDER=3
ENV FDROID_REPO_ICON=fdroid-icon.png ENV FDROID_REPO_ICON=fdroid-icon.png

View File

@ -12,25 +12,26 @@ build:
run: run:
docker run -it --rm \ docker run -it --rm \
-p 2222:2222 \ -p 2222:2222 \
-p 8080:2015 \ -p 8080:80 \
-p 8443:443 \
-v "$(PWD)/data/repo:/fdroid/repo" \ -v "$(PWD)/data/repo:/fdroid/repo" \
-v "$(PWD)/data/metadata:/fdroid/metadata" \ -v "$(PWD)/data/metadata:/fdroid/metadata" \
-v "$(PWD)/data/keystore:/fdroid/keystore" \ -v "$(PWD)/data/keystore:/fdroid/keystore" \
-e "FDROID_REPO_HOST=0.0.0.0" \ -e "FDROID_REPO_HOST=:80" \
-e "FDROID_REPO_NAME=My local repo" \ -e "FDROID_REPO_NAME=My local repo" \
-e "FDROID_REPO_DESCRIPTION=My repo description" \ -e "FDROID_REPO_DESCRIPTION=My repo description" \
-e "FDROID_KEYSTORE_PASS=mykeystorepass" \ -e "FDROID_KEYSTORE_PASS=mykeystorepass" \
-e "FDROID_KEYSTORE_KEYPASS=mykeystorekeypass" \ -e "FDROID_KEYSTORE_KEYPASS=mykeystorekeypass" \
-e "FDROID_KEYSTORE_KEY_ALIAS=fdroidkey" \ -e "FDROID_KEYSTORE_KEY_ALIAS=fdroidkey" \
-e "FDROID_REPO_EMAIL=contact@cadoles.com" \
-e "SSH_PUBLIC_KEY=$(SSH_PUBLIC_KEY)" \ -e "SSH_PUBLIC_KEY=$(SSH_PUBLIC_KEY)" \
-e "FDROID_KEYSTORE_DNAME=CN=cadoles.com, OU=ID, O=Cadoles, L=Dijon, S=France, C=FR" \ -e "FDROID_KEYSTORE_DNAME=CN=cadoles.com, OU=ID, O=Cadoles, L=Dijon, S=France, C=FR" \
fdroid-repository:latest \ fdroid-repository:latest \
$(DOCKER_CMD) $(DOCKER_CMD)
push: push:
docker image tag fdroid-repository:latest bornholm/fdroid-repository:latest docker image tag fdroid-repository:latest cadoles/fdroid-repository:latest
docker push bornholm/fdroid-repository:latest docker push cadoles/fdroid-repository:latest
clean: clean:
docker rmi fdroid-repository docker rmi fdroid-repository

15
misc/sample.conf Normal file
View File

@ -0,0 +1,15 @@
DOCKER_HTTP_PORT="127.0.0.1:8080:80"
DOCKER_HTTPS_PORT="127.0.0.1:8443:443"
DOCKER_SSH_PORT="2222:2222"
FDROID_REPO_DIR="/opt/fdroid/data/stable/repo"
FDROID_METADATA_DIR="/opt/fdroid/data/stable/metadata"
FDROID_KEYSTORE_DIR="/opt/fdroid/data/stable/keystore"
REPO_HOST="*:80"
REPO_EMAIL="myemail@"
REPO_NAME="My FDroid Repository"
REPO_DESCRIPTION="My FDroid Repo"
KEYSTORE_PASS=""
KEYSTORE_KEY_PASS=""
KEYSTORE_KEY_ALIAS=""
KEYSTORE_DNAME=""
SSH_PUBLIC_KEY=""

View File

@ -2,18 +2,25 @@
set -eo pipefail set -eo pipefail
CONFIG_FILE=$1
if [ ! -f "${CONFIG_FILE}" ]; then
echo 1>&2 "You must provide a configuration file."
exit 1
fi
set -a set -a
. "${PWD}/repo.conf" . "$CONFIG_FILE"
set +a set +a
docker run -it -d \ docker run -it -d \
--restart always \ --restart always \
-p 80:80 \ -p "${DOCKER_HTTP_PORT}" \
-p 443:443 \ -p "${DOCKER_HTTPS_PORT}" \
-p 2222:2222 \ -p "${DOCKER_SSH_PORT}" \
-v "${PWD}/data/repo:/fdroid/repo" \ -v "${FDROID_REPO_DIR}:/fdroid/repo" \
-v "${PWD}/data/metadata:/fdroid/metadata" \ -v "${FDROID_METADATA_DIR}:/fdroid/metadata" \
-v "${PWD}/data/keystore:/fdroid/keystore" \ -v "${FDROID_KEYSTORE_DIR}:/fdroid/keystore" \
-e "FDROID_REPO_HOST=${REPO_HOST}" \ -e "FDROID_REPO_HOST=${REPO_HOST}" \
-e "FDROID_REPO_EMAIL=${REPO_EMAIL}" \ -e "FDROID_REPO_EMAIL=${REPO_EMAIL}" \
-e "FDROID_REPO_NAME=${REPO_NAME}" \ -e "FDROID_REPO_NAME=${REPO_NAME}" \
@ -23,4 +30,4 @@ docker run -it -d \
-e "FDROID_KEYSTORE_KEY_ALIAS=${KEYSTORE_KEY_ALIAS}" \ -e "FDROID_KEYSTORE_KEY_ALIAS=${KEYSTORE_KEY_ALIAS}" \
-e "FDROID_KEYSTORE_DNAME=${KEYSTORE_DNAME}" \ -e "FDROID_KEYSTORE_DNAME=${KEYSTORE_DNAME}" \
-e "SSH_PUBLIC_KEY=${SSH_PUBLIC_KEY}" \ -e "SSH_PUBLIC_KEY=${SSH_PUBLIC_KEY}" \
bornholm/fdroid-repository:latest cadoles/fdroid-repository:latest