diff --git a/docker-compose.yml b/docker-compose.yml index 0a5e316f0ea..75d17d3bc2d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ x-op-restart-policy: &restart_policy restart: unless-stopped x-op-image: &image build: . - image: openproject/community:10 + image: openproject/community:${TAG:-10-test} x-op-app: &app <<: *image <<: *restart_policy @@ -47,11 +47,22 @@ services: networks: - backend + proxy: + <<: *image + <<: *restart_policy + command: "./docker/proxy" + ports: + - "8080:80" + environment: + - APP_HOST=web + depends_on: + - web + networks: + - frontend + web: <<: *app command: "./docker/web" - ports: - - "8080:8080" networks: - frontend - backend diff --git a/docker/proxy.conf.erb b/docker/proxy.conf.erb index 8691a6a3860..bd534b193fe 100644 --- a/docker/proxy.conf.erb +++ b/docker/proxy.conf.erb @@ -3,6 +3,7 @@ DocumentRoot <%= ENV.fetch('APP_PATH') %>/public ProxyRequests off + ProxyPreserveHost On ProxyPass http://<%= ENV.fetch("APP_HOST", "127.0.0.1") %>:8080/ retry=0