remove ssl.conf when using http config
This commit is contained in:
parent
f9f3c919d6
commit
eed32a153c
|
@ -0,0 +1 @@
|
||||||
|
.git
|
|
@ -4,7 +4,6 @@ WORKDIR /var/www/html/4get
|
||||||
RUN apk update && apk upgrade
|
RUN apk update && apk upgrade
|
||||||
RUN apk add php apache2-ssl php83-fileinfo php83-openssl php83-iconv php83-common php83-dom php83-sodium php83-curl curl php83-pecl-apcu php83-apache2 imagemagick php83-pecl-imagick php-mbstring imagemagick-webp imagemagick-jpeg
|
RUN apk add php apache2-ssl php83-fileinfo php83-openssl php83-iconv php83-common php83-dom php83-sodium php83-curl curl php83-pecl-apcu php83-apache2 imagemagick php83-pecl-imagick php-mbstring imagemagick-webp imagemagick-jpeg
|
||||||
|
|
||||||
COPY ./docker/apache/ /etc/apache2/
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN chmod 777 /var/www/html/4get/icons
|
RUN chmod 777 /var/www/html/4get/icons
|
||||||
|
@ -14,4 +13,5 @@ EXPOSE 443
|
||||||
|
|
||||||
ENV FOURGET_PROTO=http
|
ENV FOURGET_PROTO=http
|
||||||
|
|
||||||
CMD ["./docker/docker-entrypoint.sh"]
|
ENTRYPOINT ["./docker/docker-entrypoint.sh"]
|
||||||
|
CMD ["start"]
|
||||||
|
|
|
@ -6,14 +6,15 @@ services:
|
||||||
image: luuul/4get:latest
|
image: luuul/4get:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
|
- FOURGET_PROTO=http
|
||||||
- FOURGET_SERVER_NAME=4get.ca
|
- FOURGET_SERVER_NAME=4get.ca
|
||||||
|
- FOURGET_INSTANCES=https://4get.ca
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
|
|
||||||
volumes:
|
# volumes:
|
||||||
- /etc/letsencrypt/live/domain.tld:/etc/4get/certs
|
# - /etc/letsencrypt/live/domain.tld:/etc/4get/certs # mount ssl
|
||||||
# mount custom banners and captcha
|
# - ./banners:/var/www/html/4get/banner # mount custom banners
|
||||||
- ./banners:/var/www/html/4get/banner
|
# - ./captcha:/var/www/html/4get/data/captcha # mount captcha images
|
||||||
- ./captcha:/var/www/html/4get/data/captcha
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
# intentionally blank
|
|
@ -8,18 +8,27 @@ FOURGET_PROTO="${FOURGET_PROTO#\"}"
|
||||||
# make lowercase
|
# make lowercase
|
||||||
FOURGET_PROTO=`echo $FOURGET_PROTO | awk '{print tolower($0)}'`
|
FOURGET_PROTO=`echo $FOURGET_PROTO | awk '{print tolower($0)}'`
|
||||||
|
|
||||||
|
FOURGET_SRC='/var/www/html/4get'
|
||||||
|
|
||||||
|
mkdir -p /etc/apache2
|
||||||
|
|
||||||
if [ "$FOURGET_PROTO" = "https" ]; then
|
if [ "$FOURGET_PROTO" = "https" ]; then
|
||||||
echo "Using https configuration"
|
echo "Using https configuration"
|
||||||
cp /etc/apache2/https.conf /etc/apache2/httpd.conf
|
cp -r ${FOURGET_SRC}/docker/apache/https/httpd.conf /etc/apache2
|
||||||
|
cp -r ${FOURGET_SRC}/docker/apache/https/conf.d/* /etc/apache2/conf.d
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "Using http configuration"
|
echo "Using http configuration"
|
||||||
cp /etc/apache2/http.conf /etc/apache2/httpd.conf
|
cp -r ${FOURGET_SRC}/docker/apache/http/httpd.conf /etc/apache2
|
||||||
|
cp -r ${FOURGET_SRC}/docker/apache/http/conf.d/* /etc/apache2/conf.d
|
||||||
fi
|
fi
|
||||||
|
|
||||||
php ./docker/gen_config.php
|
php ./docker/gen_config.php
|
||||||
|
|
||||||
|
if [ "$@" = "start" ]; then
|
||||||
echo "4get is running"
|
echo "4get is running"
|
||||||
exec httpd -DFOREGROUND
|
exec httpd -DFOREGROUND
|
||||||
|
else
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue