Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Simple Reverse Proxy Example
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dws
Simple Reverse Proxy Example
Commits
69acf3e2
Commit
69acf3e2
authored
3 months ago
by
Hoai Viet Nguyen
Browse files
Options
Downloads
Patches
Plain Diff
update index.html
parent
bc9f0b3d
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
caddy/Caddyfile
+14
-2
14 additions, 2 deletions
caddy/Caddyfile
caddy/Dockerfile
+7
-0
7 additions, 0 deletions
caddy/Dockerfile
docker-compose.yml
+3
-1
3 additions, 1 deletion
docker-compose.yml
todolist_spring/Dockerfile
+1
-1
1 addition, 1 deletion
todolist_spring/Dockerfile
with
25 additions
and
4 deletions
caddy/Caddyfile
+
14
−
2
View file @
69acf3e2
{
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
This diff is collapsed.
Click to expand it.
caddy/Dockerfile
+
7
−
0
View file @
69acf3e2
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
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
3
−
1
View file @
69acf3e2
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
todolist_spring/Dockerfile
+
1
−
1
View file @
69acf3e2
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment