mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2025-04-30 00:49:26 +03:00
confluence gha fix
This commit is contained in:
parent
ed46e8db33
commit
5ecb1f8f57
@ -11,7 +11,6 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
version: [
|
||||
'9.0.0',
|
||||
'9.0.1',
|
||||
'9.0.2',
|
||||
'9.0.3',
|
||||
|
@ -1,4 +1,3 @@
|
||||
9.0.0
|
||||
9.0.1
|
||||
9.0.2
|
||||
9.0.3
|
||||
|
@ -1,3 +0,0 @@
|
||||
RELEASE=9.0.0
|
||||
DOWNLOAD_URL=https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${RELEASE}.tar.gz
|
||||
TEMP_ARCHIVE=/tmp/atlassian-confluence-${RELEASE}.tar.gz
|
@ -1,64 +0,0 @@
|
||||
FROM quay.io/epicmorg/debian:bookworm-jdk17
|
||||
LABEL maintainer="Atlassian Confluence Server Team; EpicMorg DevTeam, developer@epicm.org"
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
##################################################################
|
||||
# ARGuments
|
||||
##################################################################
|
||||
ARG RELEASE=9.0.0
|
||||
ARG DOWNLOAD_URL=https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${RELEASE}.tar.gz
|
||||
ARG TEMP_ARCHIVE=/tmp/atlassian-confluence-${RELEASE}.tar.gz
|
||||
|
||||
##################################################################
|
||||
# Setup
|
||||
##################################################################
|
||||
ENV RUN_USER daemon
|
||||
ENV RUN_GROUP daemon
|
||||
|
||||
# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html
|
||||
ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence
|
||||
ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence
|
||||
|
||||
VOLUME ["${CONFLUENCE_HOME}"]
|
||||
WORKDIR $CONFLUENCE_HOME
|
||||
|
||||
# Expose HTTP and Synchrony ports
|
||||
EXPOSE 8090
|
||||
EXPOSE 8091
|
||||
|
||||
##################################################################
|
||||
# Installing
|
||||
##################################################################
|
||||
ADD ${DOWNLOAD_URL} /tmp
|
||||
RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} && \
|
||||
tar -xzf ${TEMP_ARCHIVE} --strip-components=1 --directory "${CONFLUENCE_INSTALL_DIR}" && \
|
||||
chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ && \
|
||||
sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh && \
|
||||
sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \
|
||||
apt-get clean -y && \
|
||||
apt-get autoremove -y && \
|
||||
apt-get autoclean -y && \
|
||||
rm -rfv /var/lib/apt/lists/* && \
|
||||
rm -rfv /var/cache/apt/archives/*.deb && \
|
||||
rm -rfv /root/tmp/* && \
|
||||
rm -rfv /tmp/*
|
||||
|
||||
##################################################################
|
||||
# cleanup
|
||||
##################################################################
|
||||
RUN echo "clean up" && \
|
||||
apt-get clean -y && \
|
||||
apt-get autoremove -y && \
|
||||
apt-get autoclean -y && \
|
||||
rm -rfv /var/lib/apt/lists/* && \
|
||||
rm -rfv /var/cache/apt/archives/*.deb && \
|
||||
rm -rfv /root/tmp/* && \
|
||||
rm -rfv /tmp/*
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
CMD ["/entrypoint.sh", "-fg"]
|
||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||
|
||||
RUN updatedb
|
@ -1,64 +0,0 @@
|
||||
FROM quay.io/epicmorg/debian:bookworm-jdk21
|
||||
LABEL maintainer="Atlassian Confluence Server Team; EpicMorg DevTeam, developer@epicm.org"
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
##################################################################
|
||||
# ARGuments
|
||||
##################################################################
|
||||
ARG RELEASE=9.0.0
|
||||
ARG DOWNLOAD_URL=https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${RELEASE}.tar.gz
|
||||
ARG TEMP_ARCHIVE=/tmp/atlassian-confluence-${RELEASE}.tar.gz
|
||||
|
||||
##################################################################
|
||||
# Setup
|
||||
##################################################################
|
||||
ENV RUN_USER daemon
|
||||
ENV RUN_GROUP daemon
|
||||
|
||||
# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html
|
||||
ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence
|
||||
ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence
|
||||
|
||||
VOLUME ["${CONFLUENCE_HOME}"]
|
||||
WORKDIR $CONFLUENCE_HOME
|
||||
|
||||
# Expose HTTP and Synchrony ports
|
||||
EXPOSE 8090
|
||||
EXPOSE 8091
|
||||
|
||||
##################################################################
|
||||
# Installing
|
||||
##################################################################
|
||||
ADD ${DOWNLOAD_URL} /tmp
|
||||
RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} && \
|
||||
tar -xzf ${TEMP_ARCHIVE} --strip-components=1 --directory "${CONFLUENCE_INSTALL_DIR}" && \
|
||||
chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ && \
|
||||
sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh && \
|
||||
sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \
|
||||
apt-get clean -y && \
|
||||
apt-get autoremove -y && \
|
||||
apt-get autoclean -y && \
|
||||
rm -rfv /var/lib/apt/lists/* && \
|
||||
rm -rfv /var/cache/apt/archives/*.deb && \
|
||||
rm -rfv /root/tmp/* && \
|
||||
rm -rfv /tmp/*
|
||||
|
||||
##################################################################
|
||||
# cleanup
|
||||
##################################################################
|
||||
RUN echo "clean up" && \
|
||||
apt-get clean -y && \
|
||||
apt-get autoremove -y && \
|
||||
apt-get autoclean -y && \
|
||||
rm -rfv /var/lib/apt/lists/* && \
|
||||
rm -rfv /var/cache/apt/archives/*.deb && \
|
||||
rm -rfv /root/tmp/* && \
|
||||
rm -rfv /tmp/*
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
CMD ["/entrypoint.sh", "-fg"]
|
||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||
|
||||
RUN updatedb
|
@ -1,44 +0,0 @@
|
||||
all: app
|
||||
|
||||
app:
|
||||
make pip
|
||||
make build
|
||||
make deploy
|
||||
make clean
|
||||
|
||||
build:
|
||||
make build-buildah
|
||||
|
||||
deploy:
|
||||
make deploy-buildah
|
||||
|
||||
build-buildah:
|
||||
buildah-wrapper --build
|
||||
|
||||
deploy-buildah:
|
||||
buildah-wrapper --deploy
|
||||
|
||||
build-kaniko:
|
||||
kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:debug --dry-run
|
||||
|
||||
deploy-kaniko:
|
||||
kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:debug
|
||||
|
||||
build-compose:
|
||||
docker-compose build --compress --parallel --progress plain
|
||||
|
||||
deploy-compose:
|
||||
docker-compose push
|
||||
|
||||
clean:
|
||||
docker container prune -f
|
||||
docker image prune -f
|
||||
docker network prune -f
|
||||
docker volume prune -f
|
||||
docker system prune -af
|
||||
buildah rm -a
|
||||
buildah rmi -a
|
||||
|
||||
pip:
|
||||
pip3 install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
||||
pip install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
@ -1,14 +0,0 @@
|
||||
services:
|
||||
app:
|
||||
image: "quay.io/epicmorg/confluence:9.0.0"
|
||||
build:
|
||||
context: .
|
||||
app-jdk17:
|
||||
image: "quay.io/epicmorg/confluence:9.0.0-jdk17"
|
||||
build:
|
||||
context: .
|
||||
app-jdk21:
|
||||
image: "quay.io/epicmorg/confluence:9.0.0-jdk21"
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.jdk21
|
@ -1,39 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
|
||||
export JRE_HOME="$JAVA_HOME/jre"
|
||||
export JAVA_BINARY="$JRE_HOME/bin/java"
|
||||
export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}')
|
||||
|
||||
|
||||
# Setup Catalina Opts
|
||||
: ${CATALINA_CONNECTOR_PROXYNAME:=}
|
||||
: ${CATALINA_CONNECTOR_PROXYPORT:=}
|
||||
: ${CATALINA_CONNECTOR_SCHEME:=http}
|
||||
: ${CATALINA_CONNECTOR_SECURE:=false}
|
||||
|
||||
: ${CATALINA_OPTS:=}
|
||||
|
||||
CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}"
|
||||
CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}"
|
||||
CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}"
|
||||
CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}"
|
||||
|
||||
export CATALINA_OPTS
|
||||
|
||||
|
||||
# Start Confluence as the correct user
|
||||
if [ "${UID}" -eq 0 ]; then
|
||||
echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}"
|
||||
PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}")
|
||||
EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700
|
||||
if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then
|
||||
chmod -R 700 "${CONFLUENCE_HOME}" &&
|
||||
chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}"
|
||||
fi
|
||||
# Now drop privileges
|
||||
exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@"
|
||||
else
|
||||
exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@"
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user