Skip to content

Commit 01ec6c5

Browse files
committed
Docker composer links alias don't currently work as expected
1 parent 2d1d577 commit 01ec6c5

File tree

5 files changed

+57
-9
lines changed

5 files changed

+57
-9
lines changed

bin/dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ init() {
3838
DEV_YML='';
3939
dc yml 'docker-compose.yml';
4040
dc yml_if 'build/dist/docker-compose-blackfire.yml' 'conf/blackfire';
41-
dc yml_if 'build/dist/docker-compose-varnish.yml' 'conf/varnish.vcl' || dc yml 'build/dist/docker-compose-no-varnish.yml';
41+
dc yml_if 'build/dist/docker-compose-varnish.yml' 'conf/varnish.vcl';
4242
dc yml_if 'build/dist/docker-compose-elasticsearch.yml' 'conf/elasticsearch';
4343
dc yml_if 'build/dist/docker-compose-elasticsearch7.yml' 'conf/elasticsearch7';
4444
dc yml_if 'build/dist/docker-compose-elasticsearchhq.yml' 'conf/elasticsearchhq';

build/dist/docker-compose-no-varnish.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

build/dist/docker-compose-varnish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ services:
88
ssl:
99
depends_on:
1010
- varnish
11-
links:
12-
- "varnish:backend"
11+
volumes:
12+
- ./build/dist/varnish/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
1313

build/dist/ssl/nginx/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ http {
4444
proxy_set_header X-Forwarded-For $remote_addr;
4545
proxy_set_header X-Https $https;
4646

47-
proxy_pass http://backend:80;
47+
proxy_pass http://web:80;
4848

4949
proxy_buffer_size 32k;
5050
proxy_buffers 4 64k;
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
worker_processes 4;
3+
pid /run/nginx.pid;
4+
5+
error_log stderr;
6+
7+
events {
8+
worker_connections 1024;
9+
# multi_accept on;
10+
}
11+
12+
http {
13+
sendfile on;
14+
tcp_nopush on;
15+
tcp_nodelay on;
16+
17+
keepalive_timeout 65;
18+
proxy_connect_timeout 300;
19+
proxy_send_timeout 300;
20+
proxy_read_timeout 300;
21+
22+
types_hash_max_size 2048;
23+
24+
log_format docker '[$time_local] - $scheme://$host$uri '
25+
'"$request" $status $body_bytes_sent '
26+
'"$http_referer" "$http_user_agent"';
27+
access_log /dev/stdout docker;
28+
29+
client_max_body_size 32m;
30+
31+
gzip on;
32+
33+
34+
server {
35+
listen 80;
36+
listen 443 ssl http2;
37+
38+
http2_max_concurrent_streams 2048;
39+
40+
include "ssl.conf";
41+
42+
location / {
43+
proxy_set_header Host $host;
44+
proxy_set_header X-Forwarded-For $remote_addr;
45+
proxy_set_header X-Https $https;
46+
47+
proxy_pass http://varnish:80;
48+
49+
proxy_buffer_size 32k;
50+
proxy_buffers 4 64k;
51+
}
52+
}
53+
}

0 commit comments

Comments
 (0)