diff options
| author | throwaway <developerthrowaway@protonmail.com> | 2025-01-24 00:53:34 -0800 |
|---|---|---|
| committer | throwaway <developerthrowaway@protonmail.com> | 2025-01-24 00:53:34 -0800 |
| commit | eed32a153c862cec31d1353ea0ed6e01fc70b8da (patch) | |
| tree | f1e4c3b7df3e1d06b1af387d4184e5b978a38957 | |
| parent | f9f3c919d6df45da859ba46d3ba823e543ca636e (diff) | |
remove ssl.conf when using http config
| -rw-r--r-- | .dockerignore | 1 | ||||
| -rw-r--r-- | Dockerfile | 4 | ||||
| -rw-r--r-- | docker-compose.yaml | 11 | ||||
| -rw-r--r-- | docker/apache/http/conf.d/ssl.conf | 1 | ||||
| -rw-r--r-- | docker/apache/http/httpd.conf (renamed from docker/apache/http.conf) | 0 | ||||
| -rw-r--r-- | docker/apache/https/conf.d/ssl.conf (renamed from docker/apache/conf.d/ssl.conf) | 0 | ||||
| -rw-r--r-- | docker/apache/https/httpd.conf (renamed from docker/apache/https.conf) | 0 | ||||
| -rwxr-xr-x | docker/docker-entrypoint.sh | 19 |
8 files changed, 24 insertions, 12 deletions
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..6b8710a --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.git @@ -4,7 +4,6 @@ WORKDIR /var/www/html/4get 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 -COPY ./docker/apache/ /etc/apache2/ COPY . . RUN chmod 777 /var/www/html/4get/icons @@ -14,4 +13,5 @@ EXPOSE 443 ENV FOURGET_PROTO=http -CMD ["./docker/docker-entrypoint.sh"] +ENTRYPOINT ["./docker/docker-entrypoint.sh"] +CMD ["start"] diff --git a/docker-compose.yaml b/docker-compose.yaml index 2bba4ca..3797294 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,14 +6,15 @@ services: image: luuul/4get:latest restart: unless-stopped environment: + - FOURGET_PROTO=http - FOURGET_SERVER_NAME=4get.ca + - FOURGET_INSTANCES=https://4get.ca ports: - "80:80" - "443:443" - volumes: - - /etc/letsencrypt/live/domain.tld:/etc/4get/certs - # mount custom banners and captcha - - ./banners:/var/www/html/4get/banner - - ./captcha:/var/www/html/4get/data/captcha + # volumes: + # - /etc/letsencrypt/live/domain.tld:/etc/4get/certs # mount ssl + # - ./banners:/var/www/html/4get/banner # mount custom banners + # - ./captcha:/var/www/html/4get/data/captcha # mount captcha images diff --git a/docker/apache/http/conf.d/ssl.conf b/docker/apache/http/conf.d/ssl.conf new file mode 100644 index 0000000..1357f56 --- /dev/null +++ b/docker/apache/http/conf.d/ssl.conf @@ -0,0 +1 @@ +# intentionally blank diff --git a/docker/apache/http.conf b/docker/apache/http/httpd.conf index f496ba5..f496ba5 100644 --- a/docker/apache/http.conf +++ b/docker/apache/http/httpd.conf diff --git a/docker/apache/conf.d/ssl.conf b/docker/apache/https/conf.d/ssl.conf index 7b0dd15..7b0dd15 100644 --- a/docker/apache/conf.d/ssl.conf +++ b/docker/apache/https/conf.d/ssl.conf diff --git a/docker/apache/https.conf b/docker/apache/https/httpd.conf index ca5edf5..ca5edf5 100644 --- a/docker/apache/https.conf +++ b/docker/apache/https/httpd.conf diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 66d4067..53e7654 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -8,18 +8,27 @@ FOURGET_PROTO="${FOURGET_PROTO#\"}" # make lowercase FOURGET_PROTO=`echo $FOURGET_PROTO | awk '{print tolower($0)}'` +FOURGET_SRC='/var/www/html/4get' + +mkdir -p /etc/apache2 if [ "$FOURGET_PROTO" = "https" ]; then 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 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 php ./docker/gen_config.php - -echo "4get is running" -exec httpd -DFOREGROUND +if [ "$@" = "start" ]; then + echo "4get is running" + exec httpd -DFOREGROUND +else + exec "$@" +fi |
