Skip to content

Commit

Permalink
Removed nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
krakonos1602 committed Jun 2, 2024
1 parent fb023fc commit bcc3221
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 197 deletions.
4 changes: 3 additions & 1 deletion firefly-iii-addon/base-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ RUN apt update \

RUN apt-get update \
&& apt-get install --no-install-recommends -y \
apache2 nginx php8.3 php8.3-{bcmath,intl,curl,zip,gd,xml,mbstring,sqlite3} libapache2-mod-php8.3 \
apache2 php8.3 php8.3-{bcmath,intl,curl,zip,gd,xml,mbstring,sqlite3} libapache2-mod-php8.3 \
&& rm -rf /var/lib/apt/lists/*

RUN rm -rf /var/www/html && wget -q https://github.com/firefly-iii/firefly-iii/releases/download/v${FIREFLY_VERSION}/FireflyIII-v${FIREFLY_VERSION}.tar.gz && mkdir /var/www/html && tar -xzf FireflyIII-v${FIREFLY_VERSION}.tar.gz -C /var/www/html && rm FireflyIII-v${FIREFLY_VERSION}.tar.gz && rm -rf /var/www/html/storage/database && rm -rf /var/www/html/storage/upload && rm -rf /var/www/html/vendor && chmod a+x /var/www/html/artisan

RUN sed -i -r 's@Errorlog .*@Errorlog /dev/stderr@i' /etc/apache2/apache2.conf
RUN echo "Transferlog /dev/stdout" >> /etc/apache2/apache2.conf
RUN echo "LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so" >> /etc/apache2/apache2.conf
RUN echo "LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so" >> /etc/apache2/apache2.conf
RUN echo "LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so" >> /etc/apache2/apache2.conf

RUN chown -R www-data:www-data /var/www/html && find /var/www/html -type f -exec chmod 644 {} \; && find /var/www/html -type d -exec chmod 775 {} \;

Expand Down
2 changes: 1 addition & 1 deletion firefly-iii-addon/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "Firefly III"
description: "An unofficial add-on for a self-hosted manager for your personal finances."
url: https://docs.firefly-iii.org
version: "6.1.15-42"
version: "6.1.15-44"
slug: "fireflyiii"
arch: [aarch64, amd64]
init: false
Expand Down
9 changes: 2 additions & 7 deletions firefly-iii-addon/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#!/usr/bin/with-contenv bashio
set -e

declare ingress_interface
declare ingress_port

ingress_port=$(bashio::addon.ingress_port)
ingress_interface=$(bashio::addon.ip_address)
sed -i "s/%%port%%/${ingress_port}/g" /etc/nginx/servers/ingress.conf
sed -i "s/%%interface%%/${ingress_interface}/g" /etc/nginx/servers/ingress.conf
sed -i "s/%%port%%/${ingress_port}/g" /etc/apache2/sites-enabled/firefly-iii.conf

export SITE_OWNER="$(bashio::config 'SITE_OWNER')"

Expand Down Expand Up @@ -74,6 +71,4 @@ rm -rf bootstrap/cache/*
rm -rf storage/framework/cache/*
rm -rf storage/framework/views/*

composer dump-autoload -o

apachectl -D FOREGROUND & nginx
apachectl -D FOREGROUND
96 changes: 0 additions & 96 deletions firefly-iii-addon/nginx/includes/mime.types

This file was deleted.

55 changes: 0 additions & 55 deletions firefly-iii-addon/nginx/nginx.conf

This file was deleted.

35 changes: 0 additions & 35 deletions firefly-iii-addon/nginx/servers/ingress.conf

This file was deleted.

14 changes: 12 additions & 2 deletions firefly-iii-addon/sites-enabled/firefly-iii.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,24 @@
</Directory>

<Directory /var/www/html/public>

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

</Directory>
</VirtualHost>

Listen %%port%%
<VirtualHost *:%%port%%>
Require ip 172.30.32.2

ProxyRequests Off
ProxyPreserveHost On

RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}

ProxyPass / http://localhost:80/ nocanon
ProxyPassReverse / http://localhost:80/
</VirtualHost>

0 comments on commit bcc3221

Please sign in to comment.