Bläddra i källkod

test: separate containers

Nicolas Duchon 5 månader sedan
förälder
incheckning
e0bbd59313

+ 3 - 1
test/stress_tests/test_unreachable_network/docker-compose.yml

@@ -2,9 +2,11 @@ networks:
   netA:
   netB:
 
+
 volumes:
   nginx_conf:
 
+
 services:
   reverseproxy:
     profiles:
@@ -15,7 +17,7 @@ services:
     image: nginxproxy/nginx-proxy:test
     volumes:
       - /var/run/docker.sock:/tmp/docker.sock:ro
-  
+
   reverseproxynginx:
     profiles:
       - separateContainers

+ 26 - 0
test/test_DOCKER_HOST_unix_socket.yml

@@ -1,3 +1,7 @@
+volumes:
+  nginx_conf:
+
+
 services:
   web1:
     image: web
@@ -16,8 +20,30 @@ services:
       VIRTUAL_HOST: web2.nginx-proxy.tld
 
   sut:
+    profiles:
+      - singleContainer
     image: nginxproxy/nginx-proxy:test
     volumes:
       - /var/run/docker.sock:/f00.sock:ro
     environment:
       DOCKER_HOST: unix:///f00.sock
+
+  sutnginx:
+    profiles:
+      - separateContainers
+    container_name: nginx-proxy
+    image: nginx:alpine
+    volumes:
+      - nginx_conf:/etc/nginx/conf.d:ro
+    labels:
+      - "com.github.nginx-proxy.nginx-proxy.nginx"
+
+  sutdockergen:
+    profiles:
+      - separateContainers
+    image: nginxproxy/nginx-proxy:test-dockergen
+    volumes:
+      - /var/run/docker.sock:/f00.sock:ro
+      - nginx_conf:/etc/nginx/conf.d
+    environment:
+      DOCKER_HOST: unix:///f00.sock

+ 2 - 1
test/test_acme_http_challenge_location/test_acme_challenge_location_disabled.yml

@@ -1,6 +1,7 @@
 volumes:
   nginx_conf:
 
+
 services:
   web1:
     image: web
@@ -48,7 +49,7 @@ services:
       - /var/run/docker.sock:/tmp/docker.sock:ro
       - ./certs:/etc/nginx/certs:ro
       - ./acme_root:/usr/share/nginx/html:ro
-  
+
   sutnginx:
     profiles:
       - separateContainers

+ 2 - 1
test/test_acme_http_challenge_location/test_acme_challenge_location_enabled_is_default.yml

@@ -1,6 +1,7 @@
 volumes:
   nginx_conf:
 
+
 services:
   web1:
     image: web
@@ -46,7 +47,7 @@ services:
       - /var/run/docker.sock:/tmp/docker.sock:ro
       - ./certs:/etc/nginx/certs:ro
       - ./acme_root:/usr/share/nginx/html:ro
-  
+
   sutnginx:
     profiles:
       - separateContainers

+ 2 - 1
test/test_acme_http_challenge_location/test_acme_challenge_location_legacy.yml

@@ -1,6 +1,7 @@
 volumes:
   nginx_conf:
 
+
 services:
   web1:
     image: web
@@ -29,7 +30,7 @@ services:
       - /var/run/docker.sock:/tmp/docker.sock:ro
       - ./certs:/etc/nginx/certs:ro
       - ./acme_root:/usr/share/nginx/html:ro
-  
+
   sutnginx:
     profiles:
       - separateContainers

+ 28 - 0
test/test_custom/test_defaults-location.yml

@@ -1,11 +1,39 @@
+volumes:
+  nginx_conf:
+
+
 services:
   nginx-proxy:
+    profiles:
+      - singleContainer
     image: nginxproxy/nginx-proxy:test
     volumes:
       - /var/run/docker.sock:/tmp/docker.sock:ro
       - ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/default_location:ro
       - ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/web3.nginx-proxy.example_location:ro
 
+  nginx-proxy-nginx:
+    profiles:
+      - separateContainers
+    container_name: nginx-proxy
+    image: nginx:alpine
+    volumes:
+      - nginx_conf:/etc/nginx/conf.d:ro
+      - ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/default_location:ro
+      - ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/web3.nginx-proxy.example_location:ro
+    labels:
+      - "com.github.nginx-proxy.nginx-proxy.nginx"
+
+  nginx-proxy-dockergen:
+    profiles:
+      - separateContainers
+    image: nginxproxy/nginx-proxy:test-dockergen
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock:ro
+      - nginx_conf:/etc/nginx/conf.d
+      - ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/default_location:ro
+      - ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/web3.nginx-proxy.example_location:ro
+
   web1:
     image: web
     expose:

+ 26 - 0
test/test_custom/test_defaults.yml

@@ -1,10 +1,36 @@
+volumes:
+  nginx_conf:
+
+
 services:
   nginx-proxy:
+    profiles:
+      - singleContainer
     image: nginxproxy/nginx-proxy:test
     volumes:
       - /var/run/docker.sock:/tmp/docker.sock:ro
       - ./my_custom_proxy_settings_f00.conf:/etc/nginx/proxy.conf:ro
 
+  nginx-proxy-nginx:
+    profiles:
+      - separateContainers
+    container_name: nginx-proxy
+    image: nginx:alpine
+    volumes:
+      - nginx_conf:/etc/nginx/conf.d:ro
+      - ./my_custom_proxy_settings_f00.conf:/etc/nginx/proxy.conf:ro
+    labels:
+      - "com.github.nginx-proxy.nginx-proxy.nginx"
+
+  nginx-proxy-dockergen:
+    profiles:
+      - separateContainers
+    image: nginxproxy/nginx-proxy:test-dockergen
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock:ro
+      - nginx_conf:/etc/nginx/conf.d
+      - ./my_custom_proxy_settings_f00.conf:/etc/nginx/proxy.conf:ro
+
   web1:
     image: web
     expose:

+ 29 - 1
test/test_custom/test_location-per-vhost.yml

@@ -1,11 +1,39 @@
+volumes:
+  nginx_conf:
+
+
 services:
   nginx-proxy:
+    profiles:
+      - singleContainer
     image: nginxproxy/nginx-proxy:test
     volumes:
       - /var/run/docker.sock:/tmp/docker.sock:ro
       - ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example_location:ro
       - ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430_location:ro
 
+  nginx-proxy-nginx:
+    profiles:
+      - separateContainers
+    container_name: nginx-proxy
+    image: nginx:alpine
+    volumes:
+      - nginx_conf:/etc/nginx/conf.d:ro
+      - ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example_location:ro
+      - ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430_location:ro
+    labels:
+      - "com.github.nginx-proxy.nginx-proxy.nginx"
+
+  nginx-proxy-dockergen:
+    profiles:
+      - separateContainers
+    image: nginxproxy/nginx-proxy:test-dockergen
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock:ro
+      - nginx_conf:/etc/nginx/conf.d
+      - ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example_location:ro
+      - ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430_location:ro
+
   web1:
     image: web
     expose:
@@ -21,7 +49,7 @@ services:
     environment:
       WEB_PORTS: 82
       VIRTUAL_HOST: web2.nginx-proxy.example
-  
+
   regex:
     image: web
     expose:

+ 29 - 1
test/test_custom/test_per-vhost.yml

@@ -1,11 +1,39 @@
+volumes:
+  nginx_conf:
+
+
 services:
   nginx-proxy:
+    profiles:
+      - singleContainer
     image: nginxproxy/nginx-proxy:test
     volumes:
       - /var/run/docker.sock:/tmp/docker.sock:ro
       - ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example:ro
       - ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430:ro
 
+  nginx-proxy-nginx:
+    profiles:
+      - separateContainers
+    container_name: nginx-proxy
+    image: nginx:alpine
+    volumes:
+      - nginx_conf:/etc/nginx/conf.d:ro
+      - ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example:ro
+      - ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430:ro
+    labels:
+      - "com.github.nginx-proxy.nginx-proxy.nginx"
+
+  nginx-proxy-dockergen:
+    profiles:
+      - separateContainers
+    image: nginxproxy/nginx-proxy:test-dockergen
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock:ro
+      - nginx_conf:/etc/nginx/conf.d
+      - ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example:ro
+      - ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430:ro
+
   web1:
     image: web
     expose:
@@ -21,7 +49,7 @@ services:
     environment:
       WEB_PORTS: 82
       VIRTUAL_HOST: web2.nginx-proxy.example
-  
+
   regex:
     image: web
     expose:

+ 26 - 0
test/test_custom/test_proxy-wide.yml

@@ -1,10 +1,36 @@
+volumes:
+  nginx_conf:
+
+
 services:
   nginx-proxy:
+    profiles:
+      - singleContainer
     image: nginxproxy/nginx-proxy:test
     volumes:
       - /var/run/docker.sock:/tmp/docker.sock:ro
       - ./my_custom_proxy_settings_f00.conf:/etc/nginx/conf.d/my_custom_proxy_settings_f00.conf:ro
 
+  nginx-proxy-nginx:
+    profiles:
+      - separateContainers
+    container_name: nginx-proxy
+    image: nginx:alpine
+    volumes:
+      - nginx_conf:/etc/nginx/conf.d:ro
+      - ./my_custom_proxy_settings_f00.conf:/etc/nginx/conf.d/my_custom_proxy_settings_f00.conf:ro
+    labels:
+      - "com.github.nginx-proxy.nginx-proxy.nginx"
+
+  nginx-proxy-dockergen:
+    profiles:
+      - separateContainers
+    image: nginxproxy/nginx-proxy:test-dockergen
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock:ro
+      - nginx_conf:/etc/nginx/conf.d
+      - ./my_custom_proxy_settings_f00.conf:/etc/nginx/conf.d/my_custom_proxy_settings_f00.conf:ro
+
   web1:
     image: web
     expose: