Skip to content

Commit

Permalink
feat(shopware): add nginx to container for aws environment
Browse files Browse the repository at this point in the history
  • Loading branch information
joerivanveen committed Oct 28, 2024
1 parent f057d30 commit b21af5d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ DOCKER_CACHE_MODE=max
# TODO: Find a way to set this based on the architecture of the runner.
DOCKER_BUILD_PLATFORMS=linux/arm64

###
# Set to 0 for a separate Nginx container, to 1 to include Nginx in the platform (php) container
###
WITH_NGINX=1

# Don't try and push the image to Docker Hub.
DOCKER_PUSH=0

Expand Down
2 changes: 1 addition & 1 deletion images/shopware/etc/nginx/http.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ server {

# Let php-fpm handle .php files
location ~ \.php$ {
fastcgi_pass localhost:9000;
fastcgi_pass php:9000;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi.conf;
fastcgi_param HTTP_PROXY "";
Expand Down
4 changes: 4 additions & 0 deletions images/shopware/scripts/_start-nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ start-nginx() {
return
fi

# replace docker php fpm location with local one in nginx default config
sed -i -e 's|php:9000;|localhost:9000;|g' /etc/nginx/http.d/default.conf

# start nginx
nginx;

if [ "$?" -eq 0 ]; then
Expand Down

0 comments on commit b21af5d

Please sign in to comment.