From d1718115c38b0fee7d37818dbe9ea28eccab19d1 Mon Sep 17 00:00:00 2001 From: Joeri van Veen Date: Thu, 15 Aug 2024 16:18:29 +0200 Subject: [PATCH] wip --- docker-compose.yml | 3 +-- images/shopware/Dockerfile | 2 +- images/shopware/etc/nginx/http.d/default.conf | 9 +-------- images/shopware/scripts/_helpers.sh | 4 +--- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0ea7b2b..4fcf809 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ services: ### # Main php container # - # This container runs the php-fpm process and serves WordPress. + # This container runs the php-fpm process, optionally nginx, and serves Shopware. # # Requires the db container to be running. # @@ -11,7 +11,6 @@ services: # - WordPress installation (in volume web-data) # - Various tools: zsh, vim # - # See https://github.com/myparcelnl/docker-images/pkgs/container/wordpress ## shopware: image: ghcr.io/myparcelnl/shopware diff --git a/images/shopware/Dockerfile b/images/shopware/Dockerfile index 6b792fe..c14d45c 100644 --- a/images/shopware/Dockerfile +++ b/images/shopware/Dockerfile @@ -17,7 +17,7 @@ WORKDIR ${ROOT_DIR} RUN apk upgrade && \ # Add dependencies apk add --no-cache \ - # nginx for running on aws \ + # To run in AWS \ nginx \ # ext-gd freetype-dev \ diff --git a/images/shopware/etc/nginx/http.d/default.conf b/images/shopware/etc/nginx/http.d/default.conf index 0512b0d..5d47915 100644 --- a/images/shopware/etc/nginx/http.d/default.conf +++ b/images/shopware/etc/nginx/http.d/default.conf @@ -1,16 +1,9 @@ server { - listen 80; + root /var/www/html; - # Handle / to index.php index index.php; - # Where the code is located - root /var/www/html/public; - - # Redirect to https - add_header Content-Security-Policy upgrade-insecure-requests; - # Needed for Shopware install / update location /recovery/install { index index.php; diff --git a/images/shopware/scripts/_helpers.sh b/images/shopware/scripts/_helpers.sh index 47b5da9..31e78f1 100755 --- a/images/shopware/scripts/_helpers.sh +++ b/images/shopware/scripts/_helpers.sh @@ -32,11 +32,9 @@ link-paths() { # Ignore if path is not a directory. [ -d "${path}" ] || continue - # Overwrite existing symlinks. - unlink "$dest_path" 2> /dev/null h2 "Linking $path => $dest_path" - ln -sf "$path" "$dest_path" + ln -snf "$path" "$dest_path" done else h2 "No folders found in $source_dir"