Skip to content

Commit

Permalink
add common Caddyfile and start script
Browse files Browse the repository at this point in the history
  • Loading branch information
gardenerik committed Aug 19, 2024
1 parent 57c7b2f commit 9101254
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ RUN chown appuser:appuser /app

ENV POETRY_VIRTUALENVS_CREATE=0
RUN pip install --upgrade poetry

COPY base /base
CMD ["/base/start.sh"]
15 changes: 15 additions & 0 deletions base/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:8000 {
handle_path /static/* {
root * /app/static
file_server
}

handle_path /uploads/* {
root * /app/uploads
file_server
}

reverse_proxy 127.0.0.1:8001 {
trusted_proxies private_ranges
}
}
2 changes: 2 additions & 0 deletions base/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
exec /bin/multirun "caddy run --config /app/Caddyfile" "$BASE_START"

0 comments on commit 9101254

Please sign in to comment.