Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
TomConner committed Nov 19, 2023
1 parent 927d759 commit a6f4eb2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ themes/**
server/.env
__pycache__
.hugo_build.lock
venv
venv
db/tree105.sqlite
17 changes: 16 additions & 1 deletion caddy/Caddyfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# {
# order l4 before http
# }

# l4 :5678 {
# route {
# forward_to tree105-server-1:5678
# }
# }

dev.troop105treedrive.com {
handle /api/* {
reverse_proxy tree105-server-1:4242
Expand All @@ -8,4 +18,9 @@ dev.troop105treedrive.com {
handle {
reverse_proxy tree105-generator-1:1313
}
}
}

# dev.troop105treedrive.com:5678 {
# reverse_proxy tree105-server-1:5678
# }

8 changes: 8 additions & 0 deletions caddy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM caddy:builder AS builder

RUN xcaddy build \
--with github.com/mholt/caddy-l4

FROM caddy:latest

COPY --from=builder /usr/bin/caddy /usr/bin/caddy
8 changes: 7 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ services:

caddy:
image: caddy:2.7.5
# build:
# context: ./caddy
restart: unless-stopped
cap_add:
- NET_ADMIN
ports:
- "80:80"
- "443:443"
- "443:443/udp"
# expose:
# - 5678
working_dir: /tree105/caddy
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
Expand All @@ -25,8 +29,10 @@ services:
context: ./server
working_dir: /tree105/server
command: python server.py
#command: python -m debugpy --listen 0.0.0.0:5678 server.py
ports:
- "4242:4242"
# - "5678:5678"
volumes:
- .:/tree105
networks:
Expand All @@ -43,7 +49,7 @@ services:
- .:/tree105
networks:
- default

volumes:
tree105:
caddy_data:
Expand Down
1 change: 1 addition & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ COPY ./requirements.txt .
RUN pip install -r requirements.txt
VOLUME /tree105
EXPOSE 4242
#EXPOSE 4242 5678

0 comments on commit a6f4eb2

Please sign in to comment.