From 929c1b90d6b16706f9c63339f5f2a2b42332f3f3 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Wed, 6 Aug 2025 15:21:03 +0200 Subject: split into two standalone containers --- web/Dockerfile | 18 ++++++++++++++++++ web/default.conf.template | 18 ++++++++++++++++++ web/index.php | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 web/Dockerfile create mode 100644 web/default.conf.template create mode 100644 web/index.php (limited to 'web') diff --git a/web/Dockerfile b/web/Dockerfile new file mode 100644 index 0000000..d80a89e --- /dev/null +++ b/web/Dockerfile @@ -0,0 +1,18 @@ +FROM mtg-print AS mtg-print +FROM nginx:alpine + +RUN \ + mkdir -p /var/www/html/print && \ + mkdir -p /var/www/html/print/vendor && \ + chmod 557 /var/www/html/print + +COPY --from=mtg-print \ + /var/www/html/AllPrintings.sqlite /var/www/html/print.php \ + /var/www/html/print/ + +COPY --from=mtg-print \ + /var/www/html/vendor/ \ + /var/www/html/print/vendor/ + +COPY default.conf.template /etc/nginx/templates/ +COPY index.php /var/www/html/ diff --git a/web/default.conf.template b/web/default.conf.template new file mode 100644 index 0000000..888aa04 --- /dev/null +++ b/web/default.conf.template @@ -0,0 +1,18 @@ +server { + server_name localhost; + listen 80; + + root /var/www/html; + index index.php; + + location / { + try_files $uri $uri/ /index.php$query_string; + } + + location ~ \.php$ { + fastcgi_pass php:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } +} diff --git a/web/index.php b/web/index.php new file mode 100644 index 0000000..2aec31f --- /dev/null +++ b/web/index.php @@ -0,0 +1,38 @@ + + + + + + + + + + +
+ + +
+
+ Source + + -- cgit v1.2.3