Skip to content
Snippets Groups Projects
Commit 69acf3e2 authored by Hoai Viet Nguyen's avatar Hoai Viet Nguyen
Browse files

update index.html

parent bc9f0b3d
No related branches found
No related tags found
No related merge requests found
{
cache
}
:80 { :80 {
# http://localhost:9001/nginx -> http://nginx/nginx # http://localhost:9001/nginx -> http://nginx/nginx
# reverse_proxy /nginx nginx # reverse_proxy /nginx nginx
...@@ -12,12 +16,20 @@ ...@@ -12,12 +16,20 @@
reverse_proxy apache reverse_proxy apache
} }
route /todolist* { route /todolist {
uri replace /todolist / # cache
#uri replace /todolist /
reverse_proxy todolist:8080 reverse_proxy todolist:8080
#header Location / /todolist/
} }
} }
todolist.org:80 { todolist.org:80 {
reverse_proxy todolist:8080 reverse_proxy todolist:8080
} }
{
#lb_policy round_robin
#lb_policy ip_hash
#lb_policy weighted_round_robin 3 2 1
}
\ No newline at end of file
FROM caddy:2.9.1-builder AS builder
RUN xcaddy build \
--with github.com/caddyserver/cache-handler
FROM caddy:2.9.1 FROM caddy:2.9.1
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
COPY Caddyfile /etc/caddy/Caddyfile COPY Caddyfile /etc/caddy/Caddyfile
\ No newline at end of file
...@@ -8,11 +8,13 @@ services: ...@@ -8,11 +8,13 @@ services:
nginx: nginx:
build: ./nginx build: ./nginx
volumes: volumes:
- documentRoot:/usr/share/nginx/html - ./nginx/data:/usr/share/nginx/html
apache: apache:
image: httpd:2.4 image: httpd:2.4
todolist: todolist:
build: ./todolist_spring build: ./todolist_spring
ports:
- 8080:8080
ftp: ftp:
image: garethflowers/ftp-server image: garethflowers/ftp-server
ports: ports:
......
...@@ -5,4 +5,4 @@ USER app:app ...@@ -5,4 +5,4 @@ USER app:app
WORKDIR /app WORKDIR /app
COPY todolistH2.jar spring-boot-application.jar COPY todolistH2.jar spring-boot-application.jar
ENTRYPOINT ["java","-Dspring.profiles.active=prod","-jar","spring-boot-application.jar"] ENTRYPOINT ["java","-Dspring.profiles.active=prod","-jar","spring-boot-application.jar","--server.servlet.context-path=/todolist"]
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment