mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2025-01-12 14:47:55 +03:00
syspass
This commit is contained in:
parent
093ca8ae73
commit
df896c0f8e
6
.github/workflows/docker-develop.yml
vendored
6
.github/workflows/docker-develop.yml
vendored
@ -65,11 +65,7 @@ jobs:
|
|||||||
run: docker build --compress -t epicmorg/nextcloud:20 nextcloud/20
|
run: docker build --compress -t epicmorg/nextcloud:20 nextcloud/20
|
||||||
|
|
||||||
- name: Build sysPass + php7.3 (latest)
|
- name: Build sysPass + php7.3 (latest)
|
||||||
run: docker build --compress -t epicmorg/syspass:latest syspass/sysPass-php7.3
|
run: docker build --compress -t epicmorg/syspass:latest syspass/sysPass
|
||||||
|
|
||||||
- name: Build sysPass + php7.3 (php7.3)
|
|
||||||
run: docker build --compress -t epicmorg/syspass:php7.3 syspass/sysPass-php7.3
|
|
||||||
|
|
||||||
|
|
||||||
######################################################################################################################################################
|
######################################################################################################################################################
|
||||||
|
|
||||||
|
11
.github/workflows/docker-master.yml
vendored
11
.github/workflows/docker-master.yml
vendored
@ -64,16 +64,11 @@ jobs:
|
|||||||
- name: Push TeamCity Server (latest)
|
- name: Push TeamCity Server (latest)
|
||||||
run: docker push epicmorg/teamcity-server:latest
|
run: docker push epicmorg/teamcity-server:latest
|
||||||
|
|
||||||
- name: Build sysPass + php7.3 (latest)
|
- name: Build sysPass + php7.4 (latest)
|
||||||
run: docker build --compress -t epicmorg/syspass:latest syspass/sysPass-php7.3
|
run: docker build --compress -t epicmorg/syspass:latest syspass/sysPass
|
||||||
- name: Push sysPass + php7.3 (latest)
|
- name: Push sysPass + php7.4 (latest)
|
||||||
run: docker push epicmorg/syspass:latest
|
run: docker push epicmorg/syspass:latest
|
||||||
|
|
||||||
- name: Build sysPass + php7.3 (php7.3)
|
|
||||||
run: docker build --compress -t epicmorg/syspass:php7.3 syspass/sysPass-php7.3
|
|
||||||
- name: Push sysPass + php7.3 (php7.3)
|
|
||||||
run: docker push epicmorg/syspass:php7.3
|
|
||||||
|
|
||||||
- name: Build MatterMost (latest)
|
- name: Build MatterMost (latest)
|
||||||
run: docker build --compress -t epicmorg/mattermost-enterprise-edition:latest mattermost/latest
|
run: docker build --compress -t epicmorg/mattermost-enterprise-edition:latest mattermost/latest
|
||||||
- name: Push MatterMost (latest)
|
- name: Push MatterMost (latest)
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
en_GB.UTF-8 UTF-8
|
|
||||||
en_GB ISO-8859-1
|
|
||||||
en_GB.ISO-8859-15 ISO-8859-15
|
|
||||||
en_US.UTF-8 UTF-8
|
|
||||||
en_US ISO-8859-1
|
|
||||||
en_US.ISO-8859-15 ISO-8859-15
|
|
||||||
ru_RU.UTF-8 UTF-8
|
|
||||||
ru_RU.KOI8-R KOI8-R
|
|
||||||
ru_RU ISO-8859-5
|
|
||||||
ru_RU.CP1251 CP1251
|
|
||||||
ru_UA.UTF-8 UTF-8
|
|
||||||
ru_UA KOI8-U
|
|
@ -3,11 +3,11 @@
|
|||||||
# https://doc.syspass.org
|
# https://doc.syspass.org
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM composer:2.0 as bootstrap
|
FROM composer:1.10 as bootstrap
|
||||||
|
|
||||||
ENV SYSPASS_BRANCH="master"
|
ENV SYSPASS_BRANCH="3.2.0"
|
||||||
|
|
||||||
RUN git clone --branch ${SYSPASS_BRANCH} https://github.com/nuxsmin/sysPass.git \
|
RUN git clone --depth 1 --branch ${SYSPASS_BRANCH} https://github.com/nuxsmin/sysPass.git \
|
||||||
&& composer install \
|
&& composer install \
|
||||||
--ignore-platform-reqs \
|
--ignore-platform-reqs \
|
||||||
--no-interaction \
|
--no-interaction \
|
||||||
@ -17,9 +17,10 @@ RUN git clone --branch ${SYSPASS_BRANCH} https://github.com/nuxsmin/sysPass.git
|
|||||||
--optimize-autoloader \
|
--optimize-autoloader \
|
||||||
--working-dir /app/sysPass
|
--working-dir /app/sysPass
|
||||||
|
|
||||||
FROM php:7.3-apache-buster as app
|
FROM php:7.4-apache-buster as app
|
||||||
|
|
||||||
|
LABEL maintainer=nuxsmin@syspass.org version=3.2.0 php=7.4
|
||||||
|
|
||||||
LABEL maintainer=nuxsmin@syspass.org version=3.1.2 php=7.3
|
|
||||||
|
|
||||||
RUN rm -rfv /etc/locale.gen
|
RUN rm -rfv /etc/locale.gen
|
||||||
COPY locale.gen /etc/locale.gen
|
COPY locale.gen /etc/locale.gen
|
||||||
@ -105,8 +106,9 @@ ADD smb.conf /etc/samba/
|
|||||||
ADD smb.conf /usr/share/samba/
|
ADD smb.conf /usr/share/samba/
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
locales \
|
locales \
|
||||||
|
locales-all \
|
||||||
git \
|
git \
|
||||||
gosu \
|
gosu \
|
||||||
libicu-dev \
|
libicu-dev \
|
||||||
@ -117,12 +119,13 @@ RUN apt-get update \
|
|||||||
libpng-dev \
|
libpng-dev \
|
||||||
unzip \
|
unzip \
|
||||||
ssl-cert \
|
ssl-cert \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -r /var/lib/apt/lists/* \
|
&& rm -r /var/lib/apt/lists/*
|
||||||
&& pecl install xdebug-2.7.1 \
|
|
||||||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
RUN pecl install xdebug-2.9.8 \
|
||||||
&& docker-php-ext-install -j$(nproc) ldap intl gettext pdo_mysql opcache gd \
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||||
&& docker-php-ext-enable ldap xdebug intl pdo_mysql
|
&& docker-php-ext-install -j$(nproc) ldap intl gettext pdo_mysql opcache gd \
|
||||||
|
&& docker-php-ext-enable ldap xdebug intl pdo_mysql
|
||||||
|
|
||||||
ENV APACHE_RUN_USER="www-data" \
|
ENV APACHE_RUN_USER="www-data" \
|
||||||
SYSPASS_DIR="/var/www/html/sysPass" \
|
SYSPASS_DIR="/var/www/html/sysPass" \
|
||||||
@ -131,7 +134,7 @@ ENV APACHE_RUN_USER="www-data" \
|
|||||||
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
LABEL build=19030701
|
LABEL build=20122001
|
||||||
|
|
||||||
# Custom sysPass Apache config with SSL by default
|
# Custom sysPass Apache config with SSL by default
|
||||||
COPY ["syspass.conf", "/etc/apache2/sites-available/"]
|
COPY ["syspass.conf", "/etc/apache2/sites-available/"]
|
||||||
@ -140,7 +143,7 @@ COPY ["syspass.conf", "/etc/apache2/sites-available/"]
|
|||||||
COPY xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
COPY xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||||
|
|
||||||
# Custom entrypoint
|
# Custom entrypoint
|
||||||
COPY entrypoint.sh init-functions /usr/local/sbin/
|
COPY entrypoint.sh common_fn.sh /usr/local/sbin/
|
||||||
|
|
||||||
RUN chmod 755 /usr/local/sbin/entrypoint.sh \
|
RUN chmod 755 /usr/local/sbin/entrypoint.sh \
|
||||||
&& a2dissite 000-default default-ssl \
|
&& a2dissite 000-default default-ssl \
|
||||||
@ -155,10 +158,6 @@ COPY --from=bootstrap /app/sysPass/ ${SYSPASS_DIR}/
|
|||||||
# Composer binary
|
# Composer binary
|
||||||
COPY --from=bootstrap /usr/bin/composer /usr/bin/
|
COPY --from=bootstrap /usr/bin/composer /usr/bin/
|
||||||
|
|
||||||
RUN cd ${SYSPASS_DIR} && \
|
|
||||||
composer u && \
|
|
||||||
composer require syspass/plugin-authenticator
|
|
||||||
|
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/sbin/entrypoint.sh"]
|
ENTRYPOINT ["/usr/local/sbin/entrypoint.sh"]
|
@ -1,7 +1,5 @@
|
|||||||
all: spphp
|
all: spphp
|
||||||
spphp:
|
spphp:
|
||||||
docker build --compress -t epicmorg/syspass:php7.3 .
|
|
||||||
docker push epicmorg/syspass:php7.3
|
|
||||||
|
|
||||||
docker build --compress -t epicmorg/syspass:latest .
|
docker build --compress -t epicmorg/syspass:latest .
|
||||||
docker push epicmorg/syspass:latest
|
docker push epicmorg/syspass:latest
|
106
syspass/sysPass-php7.3/entrypoint.sh → syspass/sysPass/common_fn.sh
Executable file → Normal file
106
syspass/sysPass-php7.3/entrypoint.sh → syspass/sysPass/common_fn.sh
Executable file → Normal file
@ -1,21 +1,56 @@
|
|||||||
#!/bin/bash
|
: ${XDEBUG_REMOTE_HOST:="172.17.0.1"}
|
||||||
|
: ${XDEBUG_IDE_KEY:="ide"}
|
||||||
|
: ${SYSPASS_DEV:=0}
|
||||||
|
: ${PHP_XDEBUG_FILE:="/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"}
|
||||||
|
: ${SYSPASS_LOCALES:="es_ES en_US en_GB de_DE ca_ES fr_FR ru_RU pl_PL nl_NL pt_BR da_DK it_IT fo_FO ja_JP"}
|
||||||
|
: ${COMPOSER_EXTENSIONS:=}
|
||||||
|
: ${DEBUG:=0}
|
||||||
|
|
||||||
|
if [ ${DEBUG} -eq 1 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
COMPOSER_OPTIONS="--working-dir ${SYSPASS_DIR} --classmap-authoritative"
|
||||||
|
GOSU="gosu ${SYSPASS_UID}"
|
||||||
|
|
||||||
COLOR_NC='\033[0m'
|
COLOR_NC='\033[0m'
|
||||||
COLOR_YELLOW='\033[0;33m'
|
COLOR_YELLOW='\033[0;33m'
|
||||||
COLOR_RED='\033[0;31m'
|
COLOR_RED='\033[0;31m'
|
||||||
COLOR_GREEN='\033[0;32m'
|
COLOR_GREEN='\033[0;32m'
|
||||||
|
|
||||||
XDEBUG_REMOTE_HOST=${XDEBUG_REMOTE_HOST:-"172.17.0.1"}
|
if [ ${SYSPASS_DEV} -eq 1 ]; then
|
||||||
XDEBUG_IDE_KEY=${XDEBUG_IDE_KEY:-"ide"}
|
COMPOSER_OPTIONS="--working-dir ${SYSPASS_DIR} --optimize-autoloader --dev"
|
||||||
|
|
||||||
COMPOSER_OPTIONS="--working-dir ${SYSPASS_DIR} --classmap-authoritative"
|
|
||||||
|
|
||||||
GOSU="gosu ${SYSPASS_UID}"
|
|
||||||
|
|
||||||
if [ -e /usr/local/sbin/init-functions ]; then
|
|
||||||
. /usr/local/sbin/init-functions
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
setup_apache () {
|
||||||
|
if [ ${SYSPASS_DEV} -eq 0 ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "${COLOR_YELLOW}setup_apache: Setting up xdebug variables${COLOR_NC}"
|
||||||
|
|
||||||
|
sed -i 's/__XDEBUG_REMOTE_HOST__/'"$XDEBUG_REMOTE_HOST"'/;
|
||||||
|
s/__XDEBUG_IDE_KEY__/'"$XDEBUG_IDE_KEY"'/' \
|
||||||
|
${PHP_XDEBUG_FILE}
|
||||||
|
}
|
||||||
|
|
||||||
|
run_apache () {
|
||||||
|
: ${PHP_INI_DIR:=}
|
||||||
|
|
||||||
|
if [ -z "${PHP_INI_DIR}" ]; then
|
||||||
|
echo -e "${COLOR_YELLOW}run_apache: Starting Apache${COLOR_NC}"
|
||||||
|
|
||||||
|
# Apache gets grumpy about PID files pre-existing
|
||||||
|
rm -f ${APACHE_PID_FILE}
|
||||||
|
|
||||||
|
exec /usr/sbin/apache2ctl -DFOREGROUND
|
||||||
|
else
|
||||||
|
echo -e "${COLOR_YELLOW}run_apache: Starting Apache (PHP)${COLOR_NC}"
|
||||||
|
|
||||||
|
apache2-foreground
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
setup_app () {
|
setup_app () {
|
||||||
if [ -e "${SYSPASS_DIR}/index.php" ]; then
|
if [ -e "${SYSPASS_DIR}/index.php" ]; then
|
||||||
echo -e "${COLOR_YELLOW}setup_app: Setting up permissions${COLOR_NC}"
|
echo -e "${COLOR_YELLOW}setup_app: Setting up permissions${COLOR_NC}"
|
||||||
@ -45,19 +80,10 @@ setup_locales() {
|
|||||||
echo -e "${COLOR_YELLOW}setup_locales: Setting up locales${COLOR_NC}"
|
echo -e "${COLOR_YELLOW}setup_locales: Setting up locales${COLOR_NC}"
|
||||||
|
|
||||||
echo -e "\n### sysPass locales" >> $LOCALE_GEN
|
echo -e "\n### sysPass locales" >> $LOCALE_GEN
|
||||||
echo "es_ES.UTF-8 UTF-8" >> $LOCALE_GEN
|
|
||||||
echo "en_US.UTF-8 UTF-8" >> $LOCALE_GEN
|
for LOCALE in ${SYSPASS_LOCALES}; do
|
||||||
echo "en_GB.UTF-8 UTF-8" >> $LOCALE_GEN
|
echo "${LOCALE}.UTF-8 UTF-8" >> $LOCALE_GEN
|
||||||
echo "de_DE.UTF-8 UTF-8" >> $LOCALE_GEN
|
done
|
||||||
echo "ca_ES.UTF-8 UTF-8" >> $LOCALE_GEN
|
|
||||||
echo "fr_FR.UTF-8 UTF-8" >> $LOCALE_GEN
|
|
||||||
echo "ru_RU.UTF-8 UTF-8" >> $LOCALE_GEN
|
|
||||||
echo "pl_PL.UTF-8 UTF-8" >> $LOCALE_GEN
|
|
||||||
echo "nl_NL.UTF-8 UTF-8" >> $LOCALE_GEN
|
|
||||||
echo "pt_BR.UTF-8 UTF-8" >> $LOCALE_GEN
|
|
||||||
echo "da.UTF-8 UTF-8" >> $LOCALE_GEN
|
|
||||||
echo "it_IT.UTF-8 UTF-8" >> $LOCALE_GEN
|
|
||||||
echo "fo.UTF-8 UTF-8" >> $LOCALE_GEN
|
|
||||||
|
|
||||||
echo 'LANG="en_US.UTF-8"' > /etc/default/locale
|
echo 'LANG="en_US.UTF-8"' > /etc/default/locale
|
||||||
|
|
||||||
@ -94,37 +120,3 @@ setup_composer_extensions () {
|
|||||||
run_composer require ${COMPOSER_EXTENSIONS} --update-no-dev
|
run_composer require ${COMPOSER_EXTENSIONS} --update-no-dev
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
echo -e "${COLOR_YELLOW}entrypoint: Starting with UID : ${SYSPASS_UID}${COLOR_NC}"
|
|
||||||
id ${SYSPASS_UID} > /dev/null 2>&1 || useradd --shell /bin/bash -u ${SYSPASS_UID} -o -c "" -m user
|
|
||||||
export HOME=${SYSPASS_DIR}
|
|
||||||
|
|
||||||
setup_app
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
"apache")
|
|
||||||
setup_composer_extensions
|
|
||||||
setup_locales
|
|
||||||
setup_apache
|
|
||||||
|
|
||||||
SELF_IP_ADDRESS=$(grep $HOSTNAME /etc/hosts | cut -f1)
|
|
||||||
|
|
||||||
echo -e "${COLOR_GREEN}######"
|
|
||||||
echo -e "sysPass environment installed and configured. Please point your browser to https://${SELF_IP_ADDRESS} to start the installation"
|
|
||||||
echo -e "######${COLOR_NC}"
|
|
||||||
echo -e "${COLOR_YELLOW}entrypoint: Starting Apache${COLOR_NC}"
|
|
||||||
|
|
||||||
run_apache
|
|
||||||
;;
|
|
||||||
"update")
|
|
||||||
run_composer update
|
|
||||||
;;
|
|
||||||
"composer")
|
|
||||||
shift
|
|
||||||
run_composer "$@"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo -e "${COLOR_YELLOW}entrypoint: Starting $@${COLOR_NC}"
|
|
||||||
exec ${GOSU} "$@"
|
|
||||||
;;
|
|
||||||
esac
|
|
@ -2,7 +2,7 @@ version: '2'
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
container_name: syspass-app
|
container_name: syspass-app
|
||||||
image: syspass/syspass:3.1.2-php7.3
|
image: syspass/syspass:3.2.0-php7.4
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "80"
|
- "80"
|
55
syspass/sysPass/entrypoint.sh
Executable file
55
syspass/sysPass/entrypoint.sh
Executable file
@ -0,0 +1,55 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
COMMON_FN="common_fn.sh"
|
||||||
|
|
||||||
|
source ${COMMON_FN}
|
||||||
|
|
||||||
|
echo -e "${COLOR_YELLOW}entrypoint: Starting with UID : ${SYSPASS_UID}${COLOR_NC}"
|
||||||
|
|
||||||
|
id ${SYSPASS_UID} > /dev/null 2>&1 \
|
||||||
|
|| useradd --shell /bin/bash -u ${SYSPASS_UID} -o -c "" -m user
|
||||||
|
|
||||||
|
export HOME=${SYSPASS_DIR}
|
||||||
|
|
||||||
|
setup_app
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
"apache")
|
||||||
|
setup_composer_extensions
|
||||||
|
setup_locales
|
||||||
|
setup_apache
|
||||||
|
|
||||||
|
SELF_IP_ADDRESS=$(grep $HOSTNAME /etc/hosts | cut -f1)
|
||||||
|
|
||||||
|
echo -e "${COLOR_GREEN}######"
|
||||||
|
echo -e "sysPass environment installed and configured. Please point your browser to https://${SELF_IP_ADDRESS} to start the installation."
|
||||||
|
echo -e "######${COLOR_NC}"
|
||||||
|
echo -e "${COLOR_YELLOW}entrypoint: Starting Apache${COLOR_NC}"
|
||||||
|
|
||||||
|
run_apache
|
||||||
|
;;
|
||||||
|
"update")
|
||||||
|
echo -e "${COLOR_YELLOW}######"
|
||||||
|
echo -e "Please, only run this command for debuging purposes."
|
||||||
|
echo -e "In order to update the dependencies, please, download and updated image"
|
||||||
|
echo -e "######${COLOR_NC}"
|
||||||
|
|
||||||
|
run_composer update
|
||||||
|
;;
|
||||||
|
"composer")
|
||||||
|
shift
|
||||||
|
|
||||||
|
echo -e "${COLOR_YELLOW}######"
|
||||||
|
echo -e "Please, only run this command for debuging purposes."
|
||||||
|
echo -e "In order to update the dependencies, please, download and updated image"
|
||||||
|
echo -e "######${COLOR_NC}"
|
||||||
|
|
||||||
|
run_composer "$@"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo -e "${COLOR_YELLOW}entrypoint: Starting $@${COLOR_NC}"
|
||||||
|
exec ${GOSU} "$@"
|
||||||
|
;;
|
||||||
|
esac
|
25
syspass/sysPass/locale.gen
Normal file
25
syspass/sysPass/locale.gen
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
es_ES.UTF-8 UTF-8
|
||||||
|
es_ES ISO-8859-1
|
||||||
|
es_ES.ISO-8859-15 ISO-8859-15
|
||||||
|
en_GB.UTF-8 UTF-8
|
||||||
|
en_GB ISO-8859-1
|
||||||
|
en_GB.ISO-8859-15 ISO-8859-15
|
||||||
|
en_US.UTF-8 UTF-8
|
||||||
|
en_US ISO-8859-1
|
||||||
|
en_US.ISO-8859-15 ISO-8859-15
|
||||||
|
de_DE.UTF-8 UTF-8
|
||||||
|
ca_ES.UTF-8 UTF-8
|
||||||
|
fr_FR.UTF-8 UTF-8
|
||||||
|
ru_RU.UTF-8 UTF-8
|
||||||
|
ru_RU.KOI8-R KOI8-R
|
||||||
|
ru_RU ISO-8859-5
|
||||||
|
ru_RU.CP1251 CP1251
|
||||||
|
ru_UA.UTF-8 UTF-8
|
||||||
|
ru_UA KOI8-U
|
||||||
|
pl_PL.UTF-8 UTF-8
|
||||||
|
nl_NL.UTF-8 UTF-8
|
||||||
|
pt_BR.UTF-8 UTF-8
|
||||||
|
da_DK.UTF-8 UTF-8
|
||||||
|
it_IT.UTF-8 UTF-8
|
||||||
|
fo_FO.UTF-8 UTF-8
|
||||||
|
ja_JP.UTF-8 UTF-8
|
@ -1,5 +1,4 @@
|
|||||||
; zend_extension=xdebug.so
|
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so
|
||||||
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so
|
|
||||||
|
|
||||||
[debug]
|
[debug]
|
||||||
; Remote settings
|
; Remote settings
|
Loading…
x
Reference in New Issue
Block a user