diff --git a/caddy/Caddyfile b/caddy/Caddyfile new file mode 100644 index 0000000000000000000000000000000000000000..42c9a6c46ff613eb5bca0a862dab03deb35401fc --- /dev/null +++ b/caddy/Caddyfile @@ -0,0 +1,23 @@ +:80 { + # http://localhost:9001/nginx -> http://nginx/nginx + # reverse_proxy /nginx nginx + # http://localhost:9001/nginx -> http://nginx/ + route /nginx* { + uri replace /nginx / + reverse_proxy nginx + } + + route /apache* { + uri replace /apache / + reverse_proxy apache + } + + route /todolist* { + uri replace /todolist / + reverse_proxy todolist:8080 + } +} + +todolist.org:80 { + reverse_proxy todolist:8080 +} diff --git a/caddy/Dockerfile b/caddy/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..399e907c9ead1f4cc33b00902d3d437aa5a67219 --- /dev/null +++ b/caddy/Dockerfile @@ -0,0 +1,2 @@ +FROM caddy:2.9.1 +COPY Caddyfile /etc/caddy/Caddyfile \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index b9a3bbd2dc571fe0861761fb7ebe4179b65952f3..ad2424c540c7ecea283fe9dceb10ec7ab43bff3a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,18 +1,16 @@ #Auflistung aller Dienste services: + caddy: + build: ./caddy + ports: + - 9001:80 #Dienstname bzw. Hostname innerhalb des Netzwerks nginx: #Pfad zum Dockerfile für diesen Container build: ./nginx #Port-Mapping von außen nach innen - ports: - - 8080:80 apache: #Basis-Image image: httpd:2.4 - ports: - - 207:80 todolist: - build: ./todolist_spring - ports: - - 8070:8080 \ No newline at end of file + build: ./todolist_spring \ No newline at end of file